(In continuance to this question of mine).
I've been writing this userscript 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.
I want initially (using the waitForKeyElements
utility in my script in greasemonkey)
a function (which adds a column to the table, based on it's contents, appendColumn(x)
)
to be called after the table inside DISCOGRAPHY > COMPLETE DISCOGRAPHY has been completely displayed (I think this as: after the last header of the table has been displayed).
The id
value of the last header of that table (MISC.) is already stored in this array position: myArray[end]
So, my failed tries so far (based on this answer that user Brock Adams kindly suggested in my initial question) are variants of:
function appendColumn(x){....}
function triggerCall(jNode) {
appendColumn(0); or --> jNode.appendColumn(0);
}
waitForKeyElements (myArray[end], triggerCall); // no parentheses after triggerCall