by rcfox · 14y ago · 0 comments
javascript:void(document.body.innerHTML = document.getElementsByTagName("pre")[0].innerHTML.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ /g," "));
(Note: I've only tested this on Chrome.)Try your code on this page: https://raw.github.com/mrdoob/three.js/46c0a8434d3f269741a88...
And compare it with githtml on the /blob/ version of the same page: https://github.com/mrdoob/three.js/blob/master/examples/canv...
I suspect that JS that didn't depend on the page-load to trigger it would work too. I had never considered looking at JS-enabled pages though. When I wrote my bookmarklet, I just needed to view static documentation.
Edit: I found a page with only on-click JS events, and they didn't work. Oh well...