I have no idea what I’m doing and the original script writer also doesn’t seem to know what they’re doing. Could anyone that has some idea about how this works comment if the userscript seems a bit off?
The page seems to take a bit longer to load with it enabled.
Install with Greasemonkey on Firefox or Tampermonkey on Chrome.
which should make it so that it just looks inside the thread’s title for the test “[Course Forum]”, instead of also searching the description, poster names, etc.
At the moment, the script is waiting 0.5 seconds and then changing the opacity of the course forum topics. With the change, it should change the opacity as soon as the page’s content is finished loading.
However, please note that this is untested. Please let me know if it works
It seems to work, some of the time, on the top of the page, but it doesn’t affect the titles that auto-load below the spinning icon after you scroll down. Perhaps they did know what they were doing.
but that’s probably overkill, and might actually be slower
You’re right; this function only runs once, as soon as the page is finished loading, so it wouldn’t hide the ones that are loaded later.
The other code that you posted is running the hiding function every 500 milliseconds (so twice a second). This isn’t ideal, but if you want to do things the “proper” way, you’d have to do a lot more work, because you’d have to track down the function that’s loading the posts and write code to modify it.
Indeed, it looks like the person that wrote the original code did perhaps know what they were doing
If you want, you could increase the interval to 1000 or 2000 milliseconds, which would probably delay the hiding of the topics but would also perhaps eat less battery power, etc.