7 ms·
TIL you can use AppleScript to inject Javascript into every browser page you visit, regardless of browser, as an alternative to using a browser plugin to (for e
by dmix 9y ago
TIL you can use AppleScript to inject Javascript into every browser page you visit, regardless of browser, as an alternative to using a browser plugin to (for example) monitor every website you visit.
- Benjamin_Dobell 9y agoLast I checked Chrome at least makes attempts to block this, but Safari will happily play along. I was using this functionality to create a frustratingly convoluted automated Steam key redeemer for Mac (https://github.com/Benjamin-Dobell/humble-bundle-key-redeemer https://github.com/Benjamin-Dobell/humble-bundle-key-redeeme...) but I had to drop Chrome support. Thankfully Valve have added a web API to activate keys, so I've since released a much less stupid Chrome extension. However, if you're interested in a practical example running JavaScript using AppleScript-style (it's actually Ruby) behaviour then check it out.
- yjftsjthsd-h 9y agoAs with many power tools, that's actually really cool and there are some neat ways to use such a thing. It's just that in this case it's getting horribly abused to subvert the user's control of their own system. (Examples: You could use such a thing to block ads, or archive sites as you browse them)