// 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).htm // @cc_on docs: http://msdn.microsoft.com/en-us/library/ie/8ka90k2e(v=vs.94).htm 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!') } })();