diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-27 12:42:48 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-27 12:42:48 -0400 |
| commit | 210e8feae2fb4842bfb2de38666e6c41671fef3c (patch) | |
| tree | cbdafa34b1a6260bb20236d7e9de9eb1b690a1c5 /www/lib/vis/docs/js/ie-emulation-modes-warning.js | |
| parent | e7e7baeaad90229ccb3e0f45f4ebd77be7d79b14 (diff) | |
removed lib
Diffstat (limited to 'www/lib/vis/docs/js/ie-emulation-modes-warning.js')
| -rw-r--r-- | www/lib/vis/docs/js/ie-emulation-modes-warning.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/www/lib/vis/docs/js/ie-emulation-modes-warning.js b/www/lib/vis/docs/js/ie-emulation-modes-warning.js deleted file mode 100644 index 896ed622..00000000 --- a/www/lib/vis/docs/js/ie-emulation-modes-warning.js +++ /dev/null @@ -1,51 +0,0 @@ -// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT -// IT'S JUST JUNK FOR OUR DOCS! -// ++++++++++++++++++++++++++++++++++++++++++ -/*! - * Copyright 2014 Twitter, Inc. - * - * Licensed under the Creative Commons Attribution 3.0 Unported License. For - * details, see http://creativecommons.org/licenses/by/3.0/. - */ -// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes. -(function () { - 'use strict'; - - function emulatedIEMajorVersion() { - var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent) - if (groups === null) { - return null - } - var ieVersionNum = parseInt(groups[1], 10) - var ieMajorVersion = Math.floor(ieVersionNum) - return ieMajorVersion - } - - function actualNonEmulatedIEMajorVersion() { - // Detects the actual version of IE in use, even if it's in an older-IE emulation mode. - // IE JavaScript conditional compilation docs: http://msdn.microsoft.com/en-us/library/ie/121hztk3(v=vs.94).aspx - // @cc_on docs: http://msdn.microsoft.com/en-us/library/ie/8ka90k2e(v=vs.94).aspx - var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line - if (jscriptVersion === undefined) { - return 11 // IE11+ not in emulation mode - } - if (jscriptVersion < 9) { - return 8 // IE8 (or lower; haven't tested on IE<8) - } - return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode - } - - var ua = window.navigator.userAgent - if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) { - return // Opera, which might pretend to be IE - } - var emulated = emulatedIEMajorVersion() - if (emulated === null) { - return // Not IE - } - var nonEmulated = actualNonEmulatedIEMajorVersion() - - if (emulated !== nonEmulated) { - window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!') - } -})(); |
