var OS_DETECT = new Os_detect_class();
OS_DETECT.switch_os();
/**
* OS detection class
*/
function Os_detect_class() {
this.config = [
{s: 'windows-10', r: /(Windows 10.0|Windows NT 10.0)/},
{s: 'windows-8', r: /(Windows 8|Windows NT 6.2|Windows NT 6.3)/},
{s: 'windows-7', r: /(Windows 7|Windows NT 6.1)/},
{s: 'windows-vista', r: /Windows NT 6.0/},
{s: 'windows-xp', r: /(Windows NT 5.1|Windows XP)/},
{s: 'windows', r: /Windows /},
{s: 'android', r: /Android/},
{s: 'linux', r: /(Linux|X11)/},
{s: 'ios', r: /(iPad|iPhone|iPod)/},
{s: 'mac', r: /(Mac OS X|MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},
{s: 'unix', r: /UNIX/},
];
//add class support to DOM
this.switch_os = function() {
var active_os_list = this.detect_os();
//disable all
var elements = document.querySelectorAll(".tabs.os a");
for(var j=0; j
for(var j=0; j
targets.remove(targets[i]);
}
}
document.querySelector('body').classList.add('tab-active-' + unique_name);
}
//find content
var content_element = document.querySelector(active_block).parentNode;
//hide all
for(var child in content_element.childNodes) {
if(content_element.childNodes[child].nodeType == 1) {
content_element.childNodes[child].classList.add('hidden');
}
}
//make visible selected
document.querySelector(active_block).classList.remove('hidden');
if(typeof on_tab_change != 'undefined') {
on_tab_change(active_block);
}
return false;
}
//switch to active tab if we can find target
if(window.location.hash != '' && window.location.hash != '#'
&& window.location.hash != '#error' && window.location.hash != '#success'){
var name = window.location.hash.substr(1);
var name_alt = '';
if(name.indexOf("+") > -1){
//there are 2 hashes, first - tab/OS selector, second - scroll to element
var parts = name.split('+');
name = parts[0];
name_alt = parts[1];
}
var targets = document.querySelectorAll('body .tabs .' + name);
var target_selector = null;
if(typeof auto_switch_config != "undefined" && auto_switch_config[name]) {
target_selector = auto_switch_config[name];
}
for(var i = 0; i < targets.length; i++) {
if(targets[i].classList.contains(name) == false || target_selector == null){
continue;
}
switcher(targets[i], target_selector);
break;
}
if(name_alt != ''){
//scroll to element
var target = document.querySelector('#' + name_alt);
if(target != undefined){
target.scrollIntoView();
}
}
}
//on hash change
window.addEventListener("hashchange", function(e){
var name = window.location.hash.substr(1);
var targets = document.querySelectorAll('body .tabs .' + name);
var target_selector = null;
if(typeof auto_switch_config != "undefined" && auto_switch_config[name]) {
target_selector = auto_switch_config[name];
}
for(var i = 0; i < targets.length; i++) {
if(targets[i].classList.contains(name) == false || target_selector == null){
continue;
}
switcher(targets[i], target_selector);
break;
}
}, false);
//==================================================================================================================
//init
init_eproducts();
/**
* register event handlers on js-download links.
*/
function init_eproducts(){
var elements = document.querySelectorAll(".js-download");
for(var i=0; i < elements.length; i++) {
elements[i].addEventListener("click", eproducts_click_listener, false);
}
}
function eproducts_click_listener(e){
window.location.href = this.href;
ep_redirect_action(this);
}
function ep_redirect_action(object){
if(object.dataset.redirect != undefined && object.dataset.redirect != '') {
//redirect
setTimeout(function(){
window.location.href = object.dataset.redirect;
}, 5000);
}
}
Windows...
Download

Download SpyHuter & Scan Your Computer for FREE Now!