detect-zoom icon indicating copy to clipboard operation
detect-zoom copied to clipboard

Use Feature Detection instead of Browser Sniffing

Open willsp opened this issue 10 years ago • 5 comments

While the previous implementation used feature detection, it was using it wrong. It was, essentially using feature detection as a more advanced browser sniffer.

  • Updated this to detect the features actually being used to measure zoom.
  • Moved the functions to the same place as the checks, to make it easier to keep the 2 connected.
  • Made some adjustments so it passes jshint.
  • This fixes a bug with iOS8 Safari.

willsp avatar Sep 18 '14 21:09 willsp

This unfortunately doesn't work within iframes.

bradvogel avatar Nov 10 '15 01:11 bradvogel

Ah, that's not cool... Not really a use case for us. Did the original work with iframes?

If you have any suggestions (or better yet, code), let me know and I'll see if I can make it work...

willsp avatar Nov 10 '15 02:11 willsp

Never tried the original. Seems to be a couple of years out date. Lack of iframe support shouldn't prevent you from merging though - this PR is still very useful! I'll look into adding support for iframes.

bradvogel avatar Nov 10 '15 03:11 bradvogel

any updates on this?

ericsaboia avatar Apr 19 '16 11:04 ericsaboia

@ericsaboia Nope... Sorry. I'm no longer using it, so have little reason to get it working for iframes. If you fix it and submit a pull request to my fork, I'll merge it.

willsp avatar Apr 21 '16 16:04 willsp