Fixed a bug that most people would never have seen.
• What's the bug?
•• The bug appears when tampermonkey itself is activated with a delay. This can happen if you load the website with tampermonkey disabled and then enable tampermonkey after the page is fully loaded. The script then executes with a fault and some JS elements don't appear, even though the colors change. On Firefox 68, extensions have a short delay before they start working upon first start. So, if you left a tab with torrentbd open, closed the browser, and opened the browser again, this tab will show the same bug, i.e., fault execution of the script. In both cases, a refresh of the page was required for the script to work properly again.
• What went wrong?
•• A major part of my script looked for the load status of the page before executing the script. This was done to ensure a quick replacement of the theme, the need for being immersive. So, I'd never considered what would happen if the script was executed on a fully loaded page. There was no instruction for such a situation, which caused this bug to exist.
• How did I fix it?
•• I placed new instructions for when the document is fully loaded or interactive at the time of execution. This ensures that the script executes as intended and removes this bug.