Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » JS Bridge: Sync a Scratch variable and a JS variable.
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
I made a script that when run before Scratch loads, basically puts itself in between Scratch and the Cloud Data server, and makes the
It may be useful for making extension-type things in the future, but right now it does nothing useful.
I will post the code in a subsequent post. Only use it if you know what your'e doing!
It has comments to help make the meaning clear, so I hope it is acceptable to post here.
(☁ jsbridge)cloud variable sync with the value of window.jsbridge.value
It may be useful for making extension-type things in the future, but right now it does nothing useful.
I will post the code in a subsequent post. Only use it if you know what your'e doing!
It has comments to help make the meaning clear, so I hope it is acceptable to post here.
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
Moved code to GitHub: easrng/jsbridge
Last edited by A-E- (Feb. 13, 2020 16:51:21)
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
I thought I read that if the meaning of the code was clear it was OK…
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
Last edited by A-E- (Feb. 6, 2020 18:50:48)
- rdococ
- Scratcher
500+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
It should be, I don't see why not. Your code looks legitimate to me, at least. I thought I read that if the meaning of the code was clear it was OK…
The royal blue colour scheme. Be aesthetic
Links: Search the forums | Autism PSA
Posts: Make cloud variables suck less | Recursive broadcasts | Sprite-local pen
Projects: YaSL tiny LISP with first-class functions & macros | Object-oriented language in Scratch | node logic simulator | The Powder Project
- Sheep_maker
- Scratcher
1000+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
DeleteThisAcount has an implied /s in their post. The only code that doesn't seem to be allowed on Scratch are standalone JavaScript functions
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
Can anyone see my edited posts? They are showing as blank for me after I edit.
- SimpleScratch
- Scratcher
500+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
I see nothing in #2 or #5
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
Thanks, I figured it out/asked for help in another thread I see nothing in #2 or #5
- SimpleScratch
- Scratcher
500+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
Moved code to a Gist so ST won't ban me: easrng/0e815beb507f24da94354a8892819d69
I can't work out how to get to your code using that reference - does it need extra info adding to it?
- A-E-
- Scratcher
100+ posts
JS Bridge: Sync a Scratch variable and a JS variable.
It's in a actual repo now: easrng/jsbridgeMoved code to a Gist so ST won't ban me: easrng/0e815beb507f24da94354a8892819d69
I can't work out how to get to your code using that reference - does it need extra info adding to it?
- Discussion Forums
- » Advanced Topics
- » JS Bridge: Sync a Scratch variable and a JS variable.