3 ms·
The ES6 bookmarklet can be easily shrunk by 13 characters, taking it to 121: javascript:for(let e of document.querySelectorAll('link,style,[style]'))e.style.cs
by chrismorgan 11y ago
The ES6 bookmarklet can be easily shrunk by 13 characters, taking it to 121:
javascript:for(let e of document.querySelectorAll('link,style,[style]'))e.style.cssText?e.style.cssText='':e.outerHTML=''
- thekaleb 11y agoThis does not seem to work. It needs to be in an IIFE with a "use strict" statment, but even then, I run into this bug on Chrome: https://code.google.com/p/v8/issues/detail?id=3953 https://code.google.com/p/v8/issues/detail?id=3953
- ahoge 11y agoIt does work, but you need a browser which supports all of the used ES6 features (even in sloppy mode). As far as I can tell, it should work in Microsoft Edge. It will work in Firefox once they enable `let` without specifying the script version. It will work in Chrome once they fix for-of and once they make `let` work outside of strict mode.