Created
January 6, 2016 09:07
-
-
Save aNd1coder/55acad7de8a26407a69e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://taobaofed.org/blog/2015/10/28/jstracker-how-to-collect-data/ | |
var is360 = function(){ | |
try { | |
if(/UBrowser/i.test(navigator.userAgent)){ | |
return ''; | |
} | |
if (typeof window.scrollMaxX !== 'undefined') { | |
return ''; | |
} | |
var _track = 'track' in document.createElement('track'); | |
var webstoreKeysLength = window.chrome && window.chrome.webstore ? Object.keys(window.chrome.webstore).length : 0; | |
if (window.clientInformation && window.clientInformation.languages && window.clientInformation.languages.length > 2) { | |
return ''; | |
} | |
if (_track) { | |
return webstoreKeysLength > 1 ? ' QIHU 360 EE' : ' QIHU 360 SE'; | |
} | |
return ''; | |
}catch(e){ | |
return ''; | |
} | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment