3 ms·
I try to do that all the time to disable or modify annoying JS features but it's so hard now that everybody minimizes their libraries. Any tips to deal with thi
by ad404b8a372f2b9 5y ago
I try to do that all the time to disable or modify annoying JS features but it's so hard now that everybody minimizes their libraries. Any tips to deal with this?
- aww_dang 5y agoLast I checked, Chrome offers a build in deminifier.
- klibertp 5y agoThat doesn't help if declaration of all variables used in the code looks like this: var a,a2,aa,b,c,z,x,c,cc,l2,ll,$_2, $_3; Which is, unfortunately, a popular option minifiers offer (renaming variables and function names to shorter ones).
- Brybry 5y agoOften you can think of how the code you want to stop probably works and then bypass it a different way. Change the id/classes on the element that code applies to. Make a copy of the elements, delete the original, and insert the copy. Then reimplement any JS that's actually needed yourself. Use fetch API if you need an original version of the HTML before JS. Override getters/setters of properties on elements/nodes. The offending JS can make all the calls it wants but that doesn't matter if you control what the calls do. (Or similar redefinition/extension/hooking of base JS classes). Web 2.0/widespread use of closures/minification/libraries like React made userscripting a lot more work. It was nice when you could easily hook/wrap anything :(
- pwdisswordfish9 5y agoNoScript
- goohle 5y agoDeveloper In The Middle[0] extension for Firefox may help. You can substitute obfuscated library with properly formatted one. [0]: https://addons.mozilla.org/en-US/firefox/addon/ditm/ https://addons.mozilla.org/en-US/firefox/addon/ditm/