Closed MegaApuTurkUltra closed 10 years ago
See my new idea for an outline: http://scratch.mit.edu/discuss/topic/57450/?page=1#post-487136
I'm hoping base.user.js can eventually manage the settings GUI to enable and disable features, and act as a loader for the parts of the script needed.
If it could do all that, I would (be impressed, but also) be willing to say it's the best option there is.
Anyone willing to comment out what things do?
(as said I've never done userscripts although I'm familiar with JS)
Also, how do I run the script(s)?
You'll need Greasemonkey (FF) or Tampermonkey (Chrome), then just install them on the extension options page
Once you install a userscript manager (one of the ones MegaApuTurkUltra mentioned above), just click the "raw" button on any userscript in this repo. Your manager should open a page or popup or something allowing you to install the userscript. Just click "yes" or "install" or whatever and it should start working immediately. :)
How do I create a userscript? I know how to work with jQuery (and all Scratch pages load it) but do I need any special setup?
Not really. Just write a regular js file, and then save it with the extension .user.js The only difference is that you have to add a "Metadata Block" to the top of your code. See the userscripts in the "originals" folder, or go here.
Whoops, just realized I forgot the metadata block in my own scripts. :3 I'll add them in tomorrow... I have quite a lot of homework tonight.
yay first userscript!
$('<li><a href="//wiki.scratch.mit.edu">Wiki</a></li>').insertBefore('.site-nav .last');
:P
Any ideas on extensions? I know that one's already been made.
I was gonna say "I already made that", except then I saw that you saw that I did it. :P
Yeah :P Gotta love instant chat!
crap closed
See my suggestion here: https://github.com/MegaScratchUserscript/Mega-Scratch-Userscript/issues/4#issuecomment-59137698
Yes, do see it. I'm getting very excited about the idea of having readable code. Possibly overkill, but still, it's quite exciting. xD
See it +1
Yep I think readable code is a good thing. In the spirit of open source we should make this easy to fork, should anyone want to. Also we each should be able to read everyone's code. So, make sure your var names are descriptive and add plenty of comments!
I'm closing this because it seems modularization is what we will do.
As I said on the forum topic, I think we should modularize this for development. This will make the code easier to understand (not so much scrolling!) and will enable us to be able to work on different things at the same time without having to
git pull
all the time. Then for the release, we can put all the code together.