Discuss Scratch

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
(☁ 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)

DeleteThisAcount
Scratcher
1000+ posts

JS Bridge: Sync a Scratch variable and a JS variable.

removed because sarcasm is no longer allowed on scratch - Scratch Team

Last edited by DeleteThisAcount (Feb. 13, 2020 19:18:17)




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.

A-E- wrote:

I thought I read that if the meaning of the code was clear it was OK…
It should be, I don't see why not. Your code looks legitimate to me, at least.
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.

SimpleScratch wrote:

I see nothing in #2 or #5
Thanks, I figured it out/asked for help in another thread
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.

SimpleScratch wrote:

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?
It's in a actual repo now: easrng/jsbridge

Powered by DjangoBB