I have written this userscript.
It's for the site metal-archives.com.
When opening a band page (example) you land to DISCOGRAPHY>COMPLETE DISCOGRAPHY.
My script applies to that DISCOGRAPHY tab and it's sub-tabs
(COMPLETE DISCOGRAPHY, MAIN, LIVES, DEMOS, MISC):
It splits the column "Reviews" in two and makes the table sortable.
The problem that, whenever I open such a band page for the first time
the script is not executed, unless I do a page reload (F5) - then it always executed.
I've already tried:
enclosing the whole script with either of these:
window.addEventListener('load', function() {
or
window.onload = function () { ... MY CODE... }, false);
or, based on this answer
window.addEventListener ("load", Greasemonkey_main, false);
function Greasemonkey_main () {
//***** MY CODE
}
or, additionally, even enclosing only line 104 of the script
(which initially calls two functions, to add the column and make it sortable) with
window.addEventListener('load', function() {... MY CODE... }, false);
but without success.