Thread:User talk:Yair rand/MediaWiki:Gadget-FastRevert.js

How does changing ".innerHTML = .innerHTML + ..." to ".innerHTML += ..." fix anything? For all I know, JavaScript treats these two as equivalent (and if it does not, this language is even more fucked up than I thought): the DOM is still being thrashed, and event handlers forgotten (which is why the radio buttons do not disappear and reappear properly after that script fires). You should probably avoid innerHTML entirely, and just use document.createElement/.createTextNode and appendChild. (Though there is also insertAdjacentHTML, but I am not sure how widely it is supported.)

Also, I have read somewhere that addOnloadHook is deprecated, but I am not sure what the replacement should be.