Sorry if this is a little off-topic! I’m an incoming college computer science student and only have a fundamental knowledge of Java (read: I don’t have any real experience building programs or other real-world applications). I would like to learn how to make scripts, but I have no idea where to start I thought that since there appear to be many programmers in this forum, I should just give it a go. does anybody have any pointers on where to start learning to do this? I’m assuming these are mostly programmed in Python (correct me if I’m wrong).
I don’t think you will have trouble to get started, once you got the basics you just need a good idea for a script.
First you need to understand what is happening. The basis is a browser extension (for example one called Tampermonkey) that will execute your script. If you load a web page, Tampermonkey will look at a list of URLs that it should modify (so-called
includes). Every script must mention what pages it works on.
Then, every script that matches a page (say
https://www.wanikani.com/dashboard) is executed (edit: to be clear, the browser executes it, Tampermonkey basically just appends the scripts to the loaded page) after the page loaded, in the context of the DOM, so you can access the content (“give me all
I suggest you look at a very simple script (say https://greasyfork.org/en/scripts/15781-wanikani-golden-burn/code
class, or …”)
* [That code creates an anonymous function that is directly executed, basically anything inside that
function(gobj) will be executed at
@run-at document-end. It just adds a CSS style to WK and the forums.]
I didn’t have any JS knowledge when I started making scripts either. The only experience I had was with simpler Python programming. What I did to start was look at the code of the scripts I had installed, to understand the syntax and how things worked. From there it’s pretty easy to Google your way.
Learning to make userscripts is like learning another language. It’s a lot of fun.
If you have a little bit of money like around, Udacity is good too. But there are loads of free resources if you’re okay with less structure
I’m an incoming computer science undergraduate too! Always been interested with how the others in the community write userscripts. Great to know that someone else is in a similar position as I am