Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox extension currently destroys embed.js script includes by the site #1689

Closed
BigBlueHat opened this issue Nov 14, 2014 · 7 comments
Closed

Comments

@BigBlueHat
Copy link
Contributor

If you load this JEP post in a Firefox that has the add-on loaded, the embed.js will be removed during the "pageshow" event.

We need a way to distinguish the intent of the site, and keep from both double embedding (re: #1688) or auto-removing (re: this bug).

@BigBlueHat
Copy link
Contributor Author

Found via #1434

@BigBlueHat
Copy link
Contributor Author

Also note that the AnnotateIt add-on (also by me 😛) will do the same thing.

Accessing JS variables that live in the actual page from an extension is painfully error fraught, complicated, and full of false positives/negatives. You can jump through unsafeWindow if you care too, but that's exactly how it sounds...

Have fun! 🎉

@tilgovi
Copy link
Contributor

tilgovi commented Nov 14, 2014

You're using the checked state of the button to decide what to inject. The Chrome extension uses its own local storage to maintain that. Maybe you can share that code?

@BigBlueHat
Copy link
Contributor Author

Yeah. That seems to be the best (only?) approach that would really cover (or give the opportunity to cover) all the edge cases. I'm going to let @aron tackle this one if he wants.

I'm off to other things, but drag me back if needed.

@csillag
Copy link
Contributor

csillag commented Apr 16, 2015

@BigBlueHat, this should be re-evaluated, now that #1688 (double embedding) has been fixed.

@tilgovi
Copy link
Contributor

tilgovi commented Apr 16, 2015

Different problem. Firefox injects the destroy script on all tabs for which it isn't activated. What's needed is for the extension to keep state per tab like the chrome extension does and inject nothing when it's not active.

@nickstenning
Copy link
Contributor

The old Firefox extension is no more, so I'm going to close this issue. Hopefully a new WebExtensions-based Firefox extension will not have the same problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants