GM_xmlhttpRequest response changes after "onload" event??
Without a sample of the html the most obvious&dumb answer would be that the excluded nodes are SCRIPT, TITLE, LINK, STYLE, IFRAME because of the IF clause you have written. I'd recommend using a more obvious indenting.
@wOxxOm: Indentation was lost despite the use of the HTML CODE tag. I've fixed that for you now using the PRE tag.
Excluded nodes by the IF statement obviously does not get altered. I thought that went without saying. For the sake of clarity, I could remove that IF statement and still encounter the same issue.
Okay, is it random or every time the same nodes are skipped? If it's the latter, post the html after applyClass() here, please. Also, what happens in other browsers (FF/Chrome/IE)?
GM_xmlhttpRequest response changes after "onload" event??
I'm pulling data from a site using GM_xmlhttpRequest. On "onload" an anonymous function copies the response text into a new node as innerHTML, loops through all nodes and adds a class to these. After this, the result gets appended to the main document.
The funny thing here is that not all nodes gets the new class added. Can someone explain?