E-H Visited, combined with ExVisited, and then better.
I mean, I'll take what I can get, but most of the points raised here aren't that applicable. The majority of the repeated code is already in functions and the stuff that isn't is stuff I'm working on. Throwing an exclamation point in front of the main function simple and plainly breaks the code, which would probably be a good idea to find out why. I'm the only developer and I've put in enough comments for myself, and the majority of any of the customization is within either user created CSS stored in a very plainly labeled variable in browser storage, or in a giant block of CSS that definitely could be more readable.
I appreciate the tips for sure, but this is essentially basic best practices for any programming language. Perhaps it would be more elucidating to me if there were more concrete examples, rather than just samples. Do note that I am actively working on making this less of spaghetti code, it's just getting there slowly.
I made this to potentially help your "spaghetti code" to get cleaner.
A few tips...
To make clean code learn from a JavaScript beautifier. My Favorite: https://beautifier.io/
Include more functions and objects. (This makes your code look more professional) Ex:
Make code more undetectable. Ex:
Use commentation to describe parts of your code so in 4 months from now you can understand your code. Ex:
Make code dedicated for easy customization. Ex: