Comments (3)
I tried to add one oneself. But failed due to some strange reason.
I download protobuf.min.js
from "https://cdn.jsdelivr.net/npm/[email protected]/dist/protobuf.min.js" and put it into packages folder in OKJSON scripts folder.
And write the following code on my OKJSON scripts
...
$include('protobuf.min');
function main(object) {
if (!(typeof object === 'string')) {
$alert.modal('Error', 'Please only run this plugin with single string object')
return
}
load("./idl/src/v1/lvideo_common.proto", function(err, root) {
// Logic
});
}
It just give me an error message saying "ReferenceError: Can't find variable: load". But it indeed was defined in the corresponding file.
from everything-okjson.
I didn’t check for this myself. But I think you need to add protobuf
or some other name space to load
function.
Regarding predefined packages, I don’t think it’s a good idea.
from everything-okjson.
Regarding predefined packages, I don’t think it’s a good idea.
Got it. We already have https://docs.okjson.app/scripts/examples and https://github.com/anyboxhq/okjson-scripts. And I agree it's fine.
But one question left is that did you forget to set the permission of okjson-scripts repo to public? Looks like I can't access the repo or make a PR.
![image](https://private-user-images.githubusercontent.com/43724855/237677945-4e8aace9-13ef-40cf-bbc9-8f34cb63c7de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTczMTM1NjksIm5iZiI6MTcxNzMxMzI2OSwicGF0aCI6Ii80MzcyNDg1NS8yMzc2Nzc5NDUtNGU4YWFjZTktMTNlZi00MGNmLWJiYzktOGYzNGNiNjNjN2RlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjAyVDA3Mjc0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg3N2FmMmFmMjM2MGEzYTA5ZmQ5MTRjNjQxNjdkNDViZGU2OGNjOTY3ZGRlMDMxNmI4ZmUwOThlZjQ0OWNlZWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SacMpkn9eU_zqXxHsC_v_4Z5ktTALc60-gzO0TQqfmU)
I didn’t check for this myself. But I think you need to add
protobuf
or some other name space toload
function.
It seems that this is a common front-end problem on protobuf.js
and has nothing to do with this app. I can use other packaged "xx.js" or "xx.min.js" normally.
The protobuf.js
I download use some "prelude" to wrap it. So it will be empty on the OKJSON script side.
https://cdn.jsdelivr.net/npm/[email protected]/dist/protobuf.js
from everything-okjson.
Related Issues (20)
- [Feature request] Tab name should reflect the file name after "Save As..." HOT 1
- Crashes when opening from Finder HOT 1
- while editing subsection view of json doc, cursor always moves to the end of doc HOT 2
- Support Adding and Removing Fields in the Tree View
- Tab names are broken when adding a new tab in the middle of existing tabs HOT 1
- Pasting new content into already named tab, resets the tab name HOT 1
- Opening a file with: File -> Open replaces current window content causing loss of data HOT 2
- Left pane breaks when using disclosure triangles with large object HOT 1
- Persist JSON data when app is quit and reload JSONs which were open from previous session when app relaunched HOT 1
- Feature request: Single left click to follow hyperlink HOT 1
- Typo in OKJSON scripts doc HOT 1
- Be able to read `jsonl` format, 支持 `jsonl` 格式的文件 HOT 1
- 打开本地文件的 json 时,修改后保存更改能同时修改本地文件 HOT 1
- JSONPath expressions modify the structure being queried. HOT 1
- Restore the JSON diff feature HOT 1
- Not OK Json! The Editor Fails to display any text! HOT 1
- Please add editing support HOT 3
- Support for loading ndjson content from clipboard HOT 2
- 设置页面,导航 tab 页里面,字体设置项,字体大小无法调节,永远 13 号 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from everything-okjson.