css-usage icon indicating copy to clipboard operation
css-usage copied to clipboard

Added navigator.languages usage recipe

Open scottlow opened this issue 8 years ago • 4 comments

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

scottlow avatar Jul 17 '17 22:07 scottlow

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 ;)

FremyCompany avatar Jul 17 '17 22:07 FremyCompany

@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.

scottlow avatar Jul 17 '17 22:07 scottlow

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

FremyCompany avatar Jul 17 '17 23:07 FremyCompany

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.

gregwhitworth avatar Nov 21 '17 16:11 gregwhitworth