4 ms·
Huh, I'm surprised this gets past the symbol mangling done by most js minifiers. Though maybe they don't mangle attribute fields everywhere. However this is a
by c0balt 3y ago
Huh, I'm surprised this gets past the symbol mangling done by most js minifiers. Though maybe they don't mangle attribute fields everywhere.
However this is a nice hack around "modern" page structures and kudos to the author for making a proper tool out of it.
- bugsliker 3y agoIt's the JSON data payload that has unminified keys. Though YouTube is one of the few google sites that still use JSON, most use protocol buffers which generate JS interfaces which would indeed be mangled by minifiers.
- madeofpalk 3y agoMost/all minifiers won't actually mangle object property names as those often have observable side effects. You want to grab all the keys for an object and do something different depending on the name of the key - you can no longer do that if the minifier has mangled all the object keys. Not to mention I imagine it would be significantly harder track all references to object keys across an application (as opposed to just local variables).
- btown 3y agoAs I recall, the only minifier that went this far was Closure Compiler [0] - the caveats documented there still apply! (Fun fact: I believe that Closure Library, and by extension the Closure Compiler, are still used for the Gmail rich text editor! [1]) [0] https://developers.google.com/closure/compiler/docs/api-tutorial3 https://developers.google.com/closure/compiler/docs/api-tuto... [1] https://google.github.io/closure-library/source/closure/goog/demos/editor/editor.html https://google.github.io/closure-library/source/closure/goog...
- nathell 3y agoAnd ClojureScript.
- deleted 3y ago[deleted]