torcAddons, an addon package for the glitch editor!

no, the watch.json addon i made…

it does not work, and i do not know why?

Are you getting any errors in the console?

nope

nothing at all…

@J-Tech-Foundation Would you be able to send a project invite link in PM’s? I would love to help out!

uhhh sure… i don’t have the code with meh, i’m at school, not at home,

if u could get the code, on greasy fork, i would be able to show you it

Sorry about the late reply

I have downloaded the base driver script and checked but no signs of it working at all. And it is enabled aswell

if you open the console, do you see a log like torcAddons v1.4.1 loaded!?

there are several small issues with your script

  1. the code is not called at all, which explains why you wouldn’t see any console errors. you are wrapping it in a function but are never calling the function. the fix for this is to simply append () to the code
  2. the script runs earlier than glitch’s application is available. one solution might be to change @run-at to “document-end”. I would opt for the safer solution of just listening to torcAddon’s load event
  3. application.newFile is now async, so FI would be a promise if the file doesnt exist, causing FI.writeToFile to fail. the fix for this is to wait for the promise to resolve before writing to the file

here is a script with all of these fixes: https://gist.github.com/torcado194/c1cff19ca14e0884994a638507b5c7cd

note: to anyone else wanting to use this script, be warned that installing this script will overwrite your project’s existing watch.json file, by J-Tech-Foundation’s design.

:heart:

ok, seems good then, ill fix it up

and yes, the overwrite i made automatic, so you can’t stop it

ok, all good to go, and thank you for re-implementing the search bar!

1 Like

This stopped working, there’s an error in the console:
image

same, i’m experiencing this aswell, from the looks of it, jquery is initialized after document load now…

1 Like

Man, this is cool have you tried enhancing the console a bit more? Or maybe you could enhance project pages with a new layout. I also think we should get autocomplete in the glitch editor. Sadly glitch seems to hide their codemirror object.

nope, the code mirror styles is under .Code-Mirror

1 Like

Thanks I’ll keep that in mind the next time I look for stuff

oh no!! looks like i might have to include jquery myself…
I’ll fix it up soon! thanks for the notification

1 Like

@torcado from the looks of it, it is fixable by changing when the addons inject themselves

ok, the main script torcAddon.js has been updated

it should automatically update in your userscript extension, otherwise get it here:

(note: this update uses a feature of userscript extensions themselves. I have only tested on greasemonkey, I’m not sure if it works on all extensions or not)

2 Likes

hm this doesnt seem to be the case on my end. jQuery seems to have been omitted from glitch entirely, so changing the inject location shouldnt matter. additionally, changing the inject location causes cross origin policy errors in some cases.

This update checks for the existence of jQuery first, and uses the fallback only if it is not found

2 Likes