anthonyec / powerlet

⚡️ Chrome Extension to quickly find and run bookmarklets
MIT License
61 stars 1 forks source link

Readability Bookmarklet Fails to Run #81

Open taylordolan opened 11 months ago

taylordolan commented 11 months ago

Hi there, thanks so much for your work on this extension! Without it I'd have to switch from Arc back to Chrome.

For some reason I can’t get this Readability bookmarklet to work in Powerlet. (For reference, the source is here on GitHub.)

It works as a normal bookmarklet in Chrome, but when I try to run the script from Powerlet, I get Uncaught ReferenceError: Readability is not defined in the console. This happens in both Arc and Chrome.

anthonyec commented 8 months ago

Thanks for reporting! This is related to how Chrome executes custom scripts in their own "world", they don't have access to global variables.

There is a way to execute scripts in the same world as the page in the latest version of Chrome's extension API (manifest v3), though currently I can't upgrade Powerlet to that until some APIs are supported.

Soo there would need to be some other way execute the scripts, possibly injecting a <script> tag into the page. I'll need to experiment!

taylordolan commented 4 days ago

Hiya! I missed your earlier response, but I noticed just today that it works in the latest version. Thanks for the fix!