Browse Source

Merge pull request #625 from DanKeeling/master

Updated VMM.Browser to better determine IE7/8 Versions
pull/631/head
Joe Germuska 11 years ago
parent
commit
09a2ab70b1
  1. 6
      source/js/Core/Core/VMM.Browser.js
  2. 2
      source/js/VMM.Timeline.js

6
source/js/Core/Core/VMM.Browser.js

@ -8,6 +8,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Browser == 'undefined') {
this.version = this.searchVersion(navigator.userAgent) this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion) || this.searchVersion(navigator.appVersion)
|| "an unknown version"; || "an unknown version";
this.tridentVersion = this.searchTridentVersion(navigator.userAgent);
this.OS = this.searchString(this.dataOS) || "an unknown OS"; this.OS = this.searchString(this.dataOS) || "an unknown OS";
this.device = this.searchDevice(navigator.userAgent); this.device = this.searchDevice(navigator.userAgent);
this.orientation = this.searchOrientation(window.orientation); this.orientation = this.searchOrientation(window.orientation);
@ -57,6 +58,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Browser == 'undefined') {
if (index == -1) return; if (index == -1) return;
return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
}, },
searchTridentVersion: function (dataString) {
var index = dataString.indexOf("Trident/");
if (index == -1) return 0;
return parseFloat(dataString.substring(index + 8));
},
dataBrowser: [ dataBrowser: [
{ {
string: navigator.userAgent, string: navigator.userAgent,

2
source/js/VMM.Timeline.js

@ -411,7 +411,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
/* GET DATA /* GET DATA
================================================== */ ================================================== */
if (VMM.Browser.browser == "Explorer" || VMM.Browser.browser == "MSIE") { if (VMM.Browser.browser == "Explorer" || VMM.Browser.browser == "MSIE") {
if ( parseInt(VMM.Browser.version, 10) <= 7 ) { if (parseInt(VMM.Browser.version, 10) <= 7 && (VMM.Browser.tridentVersion == null || VMM.Browser.tridentVersion < 4)) {
ie7 = true; ie7 = true;
} }
} }

Loading…
Cancel
Save