Skip to content

Instantly share code, notes, and snippets.

@aNd1coder
Created January 6, 2016 09:07
Show Gist options
  • Save aNd1coder/55acad7de8a26407a69e to your computer and use it in GitHub Desktop.
Save aNd1coder/55acad7de8a26407a69e to your computer and use it in GitHub Desktop.
// 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