torcAddons, an addon package for the glitch editor!

#1

hi there!

i’ve been using glitch for a while and i love it, but over time there were a few features i’ve really wanted to see. so i decided to add them myself!

feel free to use them as you’d like: https://github.com/torcado194/glitch-torcAddons

here is a list of addons i have implemented currently:

filetree

adds a (real) filetree view to the file browser, including directory collapsing.
it also comes with a file searchbar, automatically hiding files not matching the search.

favorite

adds a “favorite” star button next to each file, allowing you to add or remove files to a favorites list.
a list of favorited files is displayed above the filetree. favorites are saved to local storage and are tied to the project.

indentGuides

adds visual guides to indentation in the code

pasteAndIndent

automatically correctly indents code when you paste it. you can prevent this behavior with ctrl+shift+v.

colors

adds a visual color component next to css colors

wrapSelection

allows certain characters to wrap selections rather than replace the selection, such as (parentheses)


any feedback or suggestions is welcome!
thanks :heart:

8 Likes
#2

This is so cool!
Hype!

3 Likes
#4

wow these are all really incredible changes!

1 Like
#5

I have implemented another addon, wrapSelection! it allows characters like parenthesis and quotes to wrap selected text rather than replacing the selection:

feel free to get it from the github :blush: :heart:

1 Like
Will a collapsable file tree view be in the next editor update?
#6

Hey @torcado this looks very cool. However my tamper monkey says its not valid. Would anyone be able to help?

#7

sorry about that! to be fair i hadn’t actually tested with tampermonkey before now. the main issue is that the script needs to run at ‘document-start’, which you can define in the settings tab of the script

but now that’s not necessary as i have updated all the scripts in the repository to the UserScript format, which includes details about when the script needs to run on the page.

you can install the UserScripts from this page: https://openuserjs.org/users/torcado/scripts
additionally, these will auto-update in your extension when i push updates to the repository :smile:

let me know if you have any issues!

#8

Works like a charm. Thanks so much!

1 Like
What are some cool Tampermonkey scripts?
#9

For some reason the UserScripts aren’t working…


EDIT: I managed to fix it by changing the order of when the torcAddons main script was executed.

#10

yep, the base driver needs to be executed first. though it’s not a super elegant solution, I may update the add-ons so that they wait an arbitrary amount of time for the base to load.
for now, tampermonkey allows you to change the order they execute, either by dragging them on the main extension page or changing their order number in their individual settings tabs