detect-zoom
detect-zoom copied to clipboard
Use Feature Detection instead of Browser Sniffing
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.
This unfortunately doesn't work within iframes.
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...
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.
any updates on this?
@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.