Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Added navigator.languages usage recipe #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

scottlow
Copy link

@scottlow scottlow commented Jul 17, 2017

The best way I could think of to do this was to search for .languages followed by a valid line termination character ( either "," ";" or ")" )

@FremyCompany
Copy link
Contributor

I'd expect at lot of sites to use "languages" as a property for their custom objects. I would not expect a lot of sites to "shorten" the navigator object. I think searching for "navigator.languages" will yield to a way better precision at the cost of a minor recall decrease only. My opinion is not binding however ;)

@MicrosoftEdge MicrosoftEdge deleted a comment from msftclas Jul 17, 2017
@scottlow
Copy link
Author

scottlow commented Jul 17, 2017

@FremyCompany I wrote it this way since the only site I know of where this bug appeared (story.adobe.com) did in fact shorten the navigator object :( I'm happy to change the heuristic if you think that navigator.languages would prove more accurate overall.

@FremyCompany
Copy link
Contributor

/navigator(.|\r|\n){0,200)\.languages/ ?

@gregwhitworth
Copy link
Contributor

Hey @scottlow we only take merges for archived recipes that you wish to archive. So please place them in the /archive folder and do not try to merge Recipe.min.js and cssUsage.src.js.

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

Successfully merging this pull request may close these issues.

5 participants