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

Add method for a web page to know that whimsy is installed #102

Closed
pmclanahan opened this issue Dec 8, 2014 · 8 comments
Closed

Add method for a web page to know that whimsy is installed #102

pmclanahan opened this issue Dec 8, 2014 · 8 comments

Comments

@pmclanahan
Copy link

Whimsy could add an attribute to <html>, or add a property to window.navigator, or something else entirely. Let's discuss.

@mikeconley
Copy link
Collaborator

Instead of directly touching content, I would recommend having Whimsy send a message down to content with postMessage. Pages that care can then add a message listener for that message, and respond accordingly (by adding an attribute to the content, or what have you).

We could even write a simple importable .js library that does the message listening and adds such an attribute, so that consumers can just drop a <script> tag into their HTML.

@bwinton
Copy link
Owner

bwinton commented Dec 8, 2014

How does this look?
https://gist.github.com/bwinton/54da2a0b4bf01d205039

@pmclanahan
Copy link
Author

:shipit:

Sent from my mobile. Please excuse my brevity.

@bwinton
Copy link
Owner

bwinton commented Dec 8, 2014

Any opinions from anyone on putting it behind a pref (like everything else in the add-on so far)?
Privacy vs. uh not privacy or something? Privacy vs. coder laziness maybe?

@pmclanahan
Copy link
Author

We could do a pref for "domains allowed to know I'm whimsical" with "*.mozilla.org" as default.

Sent from my mobile. Please excuse my brevity.

@bwinton
Copy link
Owner

bwinton commented Dec 8, 2014

Shipped! 55a92a4
(I added chilloutandwatchsomecatgifs, just in case.)

@bwinton bwinton closed this as completed Dec 8, 2014
@mikeconley
Copy link
Collaborator

Fingerprinting is a thing. The user population of Whimsy is small enough that this message would be a pretty big stake through the heart of anti-fingerprinting efforts.

Whitelisting mozilla properties is one good step. Pref is another.

@bwinton
Copy link
Owner

bwinton commented Dec 8, 2014

Good thing I did both, then! ;)

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

No branches or pull requests

3 participants