Advertisement
clickio

Rotation scripts for technical.city & bizorg.su

Jan 26th, 2022
1,059
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Clickio rotator code for HEAD (for both sites) -->
  2. <script>
  3. /* src: 2018-10-23 21:09:28 */
  4. var V="function"==typeof Object.defineProperties?Object.defineProperty:function(t,f,l){t!=Array.prototype&&t!=Object.prototype&&(t[f]=l.value)},W="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function X(t){if(t){for(var f=W,l=["Number","MAX_SAFE_INTEGER"],x=0;x<l.length-1;x++){var d=l[x];d in f||(f[d]={});f=f[d]}l=l[l.length-1];x=f[l];t=t(x);t!=x&&null!=t&&V(f,l,{configurable:!0,writable:!0,value:t})}}X(function(){return 9007199254740991});
  5. (function(){function t(a){var c=null,b=Y("ClickioRotator");b&&(!e(a[b])||e(a[b].condition)&&!a[b].condition()?d("Variant read from url is not applicable ("+b+")"):(d("Variant read from url params: "+b),c=""+b));if(!c){var g=0;y(a,function(a,b){if(e(b.condition)&&b.condition()||!e(b.condition))a=b.weight,g+=""===a?0:parseInt(a,10)});if(0<g){var h=Math.floor(Math.random()*(Math.round(g)-1+1))+1;l("Random weight: "+h+" (1.."+g+")");var A=0;y(a,function(a,b){if(e(b.condition)&&b.condition()||!e(b.condition))if(b=
  6. parseInt(b.weight,10),A+=b,d("  "+a+" ("+b+"/"+g+")"),A>=h)return d("    Winner! ("+A+" >= "+h+")"),c=a,!1});f();c&&d("Randomly chosen variant: "+c)}else d("No active variants found")}return c}function f(a,c){p&&D&&(a&&d(a,c),p.groupEnd(),E--)}function l(a,c){p&&D&&(!F&&e(v)&&(F=!0,p.log("%c"+v,"color: "+z+";")),p.groupCollapsed("%c"+(c||E?"":v+": ")+a,"color: "+z+";"),E++)}function x(a){var c="";try{c=JSON.stringify(a,null,4)}catch(b){l("Error in JSON.stringify");f(a);return}d("\n"+c,!0)}function d(a,
  7. c,b){if(p&&D)if(c=c||!1,b=b||"log",!F&&e(v)&&(F=!0,p[b]("%c"+v,"color: "+z+";"),p[b]("%c   source:   2018-10-23 21:09:28","color: "+z+";"),p[b]("%c   compiled: <?= date('Y-m-d H:i:s') ?>","color: "+z+";")),"string"==typeof a)p[b]("%c"+(c||E?"":v+": ")+a,"color: "+z+";");else p[b](a)}function I(a,c,b,g){b=b||!1;g=g||!1;var h=Q("lx_debug_insertexecute",1);h&&(l("insertAndExecute called"),b&&d("append mode"),d("where: "),d(a),d("what:"),d(c),d("---"));if(!e(a)||!e(a.ownerDocument))return h&&f("Tried inserting executable into not-a-node"),
  8. !1;var A=a.ownerDocument;if(!Z(a,a.ownerDocument.defaultView))return h&&f("Tried inserting executable into not-a-node"),!1;if(c){var u=[];if(b||g){h&&d("Insert mode: "+(b?"append":"prepend"));b=a.firstChild;var q=B("div",A);for(q.innerHTML=c;q.firstChild;)G(q.firstChild)?u.push(q.firstChild):J(q.firstChild.childNodes,function(a){G(q.firstChild.childNodes[a])&&u.push(q.firstChild.childNodes[a])}),g?a.insertBefore(q.firstChild,b):a.appendChild(q.firstChild)}else h&&d("Replace mode"),a.innerHTML=c,h&&
  9. l("Scripts check"),J(a.childNodes,function(b){h&&(l("node "+b),d(a.childNodes[b]));G(a.childNodes[b])?(h&&d("   is script"),u.push(a.childNodes[b])):(h&&d("   not script"),J(a.childNodes[b].childNodes,function(c){h&&(l("sub.node "+c),d(a.childNodes[b].childNodes[c]));G(a.childNodes[b].childNodes[c])&&(h&&d("   is script"),u.push(a.childNodes[b].childNodes[c]));h&&f()}));h&&f()}),h&&f();u.length&&(h&&l("Total scripts to execute: "+u.length),y(u,function(b){var c=u[b].parentNode;c?c.removeChild(u[b]):
  10. c=a;b=u[b];var m=c;c=A;l("evalScript call");c=c||r;m=m||aa;d("parent: ");d(m);var k=B("script",c);k.type="text/javascript";if(e(b.src)&&b.src)k.src=b.src,k.className=b.className,d("src mode: "+k.src+(k.className?" (class: "+k.className+")":"")),f();else{var n=b.text||b.textContent||b.innerHTML||"";k.className=b.className;d("source mode"+(k.className?" (class: "+k.className+")":"")+":");d(n.trim());f();k.appendChild(c.createTextNode(n))}m.appendChild(k)}),h&&f())}else h&&(l("error insertAndExecute"),
  11. d("node:"),d(a),d("content:"),d(c),f());h&&f()}function Y(a,c){var b=H(w.location.search),g=null;e(b[a])?g=b[a]:(b=H(w.location.hash),e(b[a])?g=b[a]:g=c||null);return g}function Q(a,c){var b=H(w.location.search),g=e(b[a]);g||(b=H(w.location.hash),g=e(b[a]));g&&e(b[a])&&(g=K(b[a])==c);return g}function R(){e(r.body)&&r.body?S=r.body:setTimeout(R,10)}function T(a,c){return e(c)?(c=Math.pow(10,c),Math.round(a*c)/c):Math.round(a)}function ba(a){a=a||10;if(10<a){for(var c="",b=10;0<a;)c+=Math.round(Math.pow(36,
  12. b+1)-Math.random()*Math.pow(36,b)).toString(36).slice(1),a-=b,a<b&&(b=a);return c}return Math.round(Math.pow(36,a+1)-Math.random()*Math.pow(36,a)).toString(36).slice(1)}function e(a){return"undefined"!=typeof a}function K(a,c){c=e(c)?c:!1;return e(a)?a:c}function U(a,c,b){b=b||r;return c?b.getElementsByTagName(a):b.getElementsByTagName(a)[0]}function y(a,c){for(var b in a)if(a.hasOwnProperty(b)&&"length"!==b&&!1===c.call(a[b],b,a[b]))break}function J(a,c){for(var b=0;b<a.length&&(!a.hasOwnProperty(b)||
  13. "length"===b||!1!==c.call(a[b],b,a[b]));b++);}function H(a){if(!e(L[a])){a=a.split("+").join(" ");for(var c={},b=("?"===a[0]||"#"===a[0]?a.substr(1):a).split("&"),g=0;g<b.length;g++){var d=b[g].split("=");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1]||"")}L[a]=c}return L[a]}function B(a,c){c=c||r;return c.createElement(a)}function M(a,c){if(null==a||"object"!==typeof a)return a;if(void 0==c)c=[];else{var b,g=c.length;for(b=0;b<g;b++)if(a===c[b])return a}c.push(a);if("function"==typeof a.clone)return a.clone(!0);
  14. if("[object Array]"==Object.prototype.toString.call(a)){g=a.slice();for(b=g.length;b--;)g[b]=M(g[b],c);return g}if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return new RegExp(a);if(a.nodeType&&"function"==typeof a.cloneNode)return a.cloneNode(!0);b=Object.getPrototypeOf?Object.getPrototypeOf(a):a.__proto__;b||(b=a.constructor.prototype);g=N(b);for(var d in a)g[d]=M(a[d],c);return g}function Z(a,c){c=c||w;return e(a)?a instanceof c.HTMLElement:!1}function G(a){return e(a)&&
  15. a.nodeName&&"script"===a.nodeName.toLowerCase()&&(!a.type||"text/javascript"===a.type.toLowerCase())}var r=document,w=window,S=r.body,aa=function(a){a=a||r;var c=a.documentElement,b=U("head",!1,a);if(b)return b;for(b=c.firstChild;b&&"#text"==b.nodeName.toLowerCase();)b=b.nextSibling;if(b&&"#text"!=b.nodeName.toLowerCase())return b;a=B("head",a);c.appendChild(a);return a}(),v=null;R();var L={},N=Object.create;"function"!==typeof N&&(N=function(a){function c(){}c.prototype=a;return new c});var C=!1,
  16. O=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};w.insertAndExecute=I;v="ClickioRotator";var p=w.console||{},D=!0;e(p.groupCollapsed)||(C||(C=B("iframe"),C.style.display="none",S.appendChild(C)),p=C.contentWindow.console,e(p.groupCollapsed)||(w.alert((e(v)?v+": ":"")+"console not available"),p=!1));var z="white",F=!1;z=function(){function a(m){m=m||{};if(void 0!==m.a&&null!==m.a&&m.a===parseInt(m.a,10))l=m.a;else if("string"===typeof m.a){for(var k=m.a,n=0,
  17. d=0;d!==k.length&&!(n>=Number.MAX_SAFE_INTEGER);d++)n+=k.charCodeAt(d);l=n}else{if(void 0!==m.a&&null!==m.a)throw new TypeError("The seed value must be an integer or string");l=null}if(null!==m.count&&void 0!==m.count){k=m.count;n=[];for(m.count=null;k>n.length;)l&&m.a&&(m.a+=1),n.push(a(m));m.count=k;return n}a:{k=m.f;if("number"===typeof parseInt(k)&&(n=parseInt(k),360>n&&0<n)){k=[n,n];break a}if("string"===typeof k&&p[k]&&(k=p[k],k.b)){k=k.b;break a}k=[0,360]}k=g(k);0>k&&(k=360+k);n=m;if("random"===
  18. n.c)n=g([0,100]);else if("monochrome"===n.f)n=0;else{var e=b(k).h;d=e[0];e=e[1];switch(n.c){case "bright":d=55;break;case "dark":d=e-10;break;case "light":e=55}n=g([d,e])}a:{for(var f=b(k).g,h=0;h<f.length-1;h++){d=f[h][0];e=f[h][1];var q=f[h+1][0],u=f[h+1][1];if(n>=d&&n<=q){f=(u-e)/(q-d);d=f*n+(e-f*d);break a}}d=0}e=100;switch(m.c){case "dark":e=d+20;break;case "light":d=(e+d)/2;break;case "random":d=0,e=100}d=g([d,e]);return c([k,n,d],m)}function c(a,b){switch(b.format){case "hsvArray":return a;
  19. case "hslArray":return q(a);case "hsl":return a=q(a),"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)";case "hsla":return a=q(a),"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+Math.random()+")";case "rgbArray":return f(a);case "rgb":return"rgb("+f(a).join(", ")+")";case "rgba":return"rgba("+f(a).join(", ")+", "+Math.random()+")";default:return d(a)}}function b(a){334<=a&&360>=a&&(a-=360);for(var b in p){var c=p[b];if(c.b&&a>=c.b[0]&&a<=c.b[1])return p[b]}return"Color not found"}function g(a){if(null===l)return Math.floor(a[0]+
  20. Math.random()*(a[1]+1-a[0]));var b=a[1]||1;a=a[0]||0;l=(9301*l+49297)%233280;return Math.floor(a+l/233280*(b-a))}function d(a){function b(a){a=a.toString(16);return 1==a.length?"0"+a:a}a=f(a);return"#"+b(a[0])+b(a[1])+b(a[2])}function e(a,b,c){p[a]={b:b,g:c,h:[c[0][0],c[c.length-1][0]],i:[c[c.length-1][1],c[0][1]]}}function f(a){var b=a[0];0===b&&(b=1);360===b&&(b=359);b/=360;var c=a[1]/100;a=a[2]/100;var d=Math.floor(6*b),e=6*b-d;b=a*(1-c);var g=a*(1-e*c);c=a*(1-(1-e)*c);var f=e=256,h=256;switch(d){case 0:e=
  21. a;f=c;h=b;break;case 1:e=g;f=a;h=b;break;case 2:e=b;f=a;h=c;break;case 3:e=b;f=g;h=a;break;case 4:e=c;f=b;h=a;break;case 5:e=a,f=b,h=g}return[Math.floor(255*e),Math.floor(255*f),Math.floor(255*h)]}function q(a){var b=a[1]/100,c=a[2]/100,d=(2-b)*c;return[a[0],Math.round(b*c/(1>d?d:2-d)*1E4)/100,d/2*100]}var l=null,p={};e("monochrome",null,[[0,0],[100,0]]);e("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]);e("orange",[19,46],[[20,100],[30,93],[40,88],[50,86],
  22. [60,85],[70,70],[100,70]]);e("yellow",[47,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]);e("green",[63,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]);e("blue",[179,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]);e("purple",[258,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]);e("pink",[283,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);return a}()({c:"light"});
  23. var E=0;D=!Q("lx_debug_disable_clickio_rotator",1);var P=!1;"complete"!==r.readyState&&(P=!0,r.addEventListener("readystatechange",function(){"complete"==r.readyState&&(P=!1)},!1));w.ClickioRotator=function(a){a=M(a);l("Config");x(a);f();var c=t(a),b=ba(15)+((new Date).getTime()%1E7*100+T(99*Math.random()));return c?(e(a[c].head)&&I(U("head"),a[c].head,!0),{getSession:function(){return b},getChosenVariantId:function(){return c},install:function(){d("install call");var a=null,b=null;2==arguments.length?
  24. (b=arguments[0],a=arguments[1]):a=arguments[0];a&&e(a[c])&&(O(a[c])||(a[c]=[[a[c]]]),y(a[c],function(d){d=a[c][d];O(d)||(d=[d]);var e=K(d[0]),f=K(d[1]);!f&&e&&(f=e,e="html");O(f)||(f=[f]);if("track"==e)y(f,function(a){B("img").src=f[a]+"&_lxrnd_="+((new Date).getTime()%1E7*100+T(99*Math.random()))});else if(P&&!b)y(f,function(a){r.write(f[a])});else if(b){var g=r.querySelector(b);g&&y(f,function(a){I(g,f[a],!0)})}}))}}):null}})();
  25. </script>
  26. <script>
  27. var config1 = {
  28.     'custom':   {
  29.         'weight': 50
  30.     },
  31.     '300x250_2x':   {
  32.         'weight': 50
  33.     }
  34. };
  35. var config2 = {
  36.     'custom':   {
  37.         'weight': 50
  38.     },
  39.     '300x250_2x':   {
  40.         'weight': 50
  41.     }
  42. };
  43.  
  44. var clickioRotator1 = new ClickioRotator(config1);
  45. var clickioRotator2 = new ClickioRotator(config2);
  46. </script>
  47.  
  48.  
  49.  
  50.  
  51. <!-- technical.city clickio rotation 1 -->
  52. <div id="clickio_rotation_1">
  53.     <script type="text/javascript">
  54.         clickioRotator1.install(
  55.             '#clickio_rotation_1',
  56.             {
  57.                 'custom':   [ // custom size ad unit 1
  58.                     [
  59.                         'html',  
  60.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224640/360_light.js'><\/scr" + "ipt>" +
  61.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  62.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224640']=__lxGc__['s']['_224640']||{'b':{}})['b']['_681030']={'i':__lxGc__.b++};" +
  63.                         "<\/scr" + "ipt>"
  64.                     ]
  65.                 ],
  66.                 '300x250_2x':   [ // 300x250_2x ad unit 1
  67.                     [
  68.                         'html',  
  69.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224640/360_light.js'><\/scr" + "ipt>" +
  70.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  71.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224640']=__lxGc__['s']['_224640']||{'b':{}})['b']['_681243']={'i':__lxGc__.b++};" +
  72.                         "<\/scr" + "ipt>"
  73.                     ]
  74.                 ],
  75.             }
  76.         );
  77.     </script>
  78. </div>
  79.  
  80. <!-- technical.city clickio rotation 2 -->
  81. <div id="clickio_rotation_2">
  82.     <script type="text/javascript">
  83.         clickioRotator2.install(
  84.             '#clickio_rotation_2',
  85.             {
  86.                 'custom':   [ // custom size ad unit 2
  87.                     [
  88.                         'html',  
  89.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224640/360_light.js'><\/scr" + "ipt>" +
  90.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  91.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224640']=__lxGc__['s']['_224640']||{'b':{}})['b']['_681197']={'i':__lxGc__.b++};" +
  92.                         "<\/scr" + "ipt>"
  93.                     ]
  94.                 ],
  95.                 '300x250_2x':   [ // 300x250_2x ad unit 2
  96.                     [
  97.                         'html',  
  98.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224640/360_light.js'><\/scr" + "ipt>" +
  99.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  100.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224640']=__lxGc__['s']['_224640']||{'b':{}})['b']['_681241']={'i':__lxGc__.b++};" +
  101.                         "<\/scr" + "ipt>"
  102.                     ]
  103.                 ],
  104.             }
  105.         );
  106.     </script>
  107. </div>
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. <!-- bizorg.su clickio rotation 1 -->
  115. <div id="clickio_rotation_1">
  116.     <script type="text/javascript">
  117.         clickioRotator1.install(
  118.             '#clickio_rotation_1',
  119.             {
  120.                 'custom':   [ // custom size ad unit 1
  121.                     [
  122.                         'html',  
  123.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224681/360_light.js'><\/scr" + "ipt>" +
  124.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  125.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224681']=__lxGc__['s']['_224681']||{'b':{}})['b']['_681158']={'i':__lxGc__.b++};" +
  126.                         "<\/scr" + "ipt>"
  127.                     ]
  128.                 ],
  129.                 '300x250_2x':   [ // 300x250_2x ad unit 1
  130.                     [
  131.                         'html',  
  132.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224681/360_light.js'><\/scr" + "ipt>" +
  133.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  134.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224681']=__lxGc__['s']['_224681']||{'b':{}})['b']['_681247']={'i':__lxGc__.b++};" +
  135.                         "<\/scr" + "ipt>"
  136.                     ]
  137.                 ],
  138.             }
  139.         );
  140.     </script>
  141. </div>
  142.  
  143. <!-- bizorg.su clickio rotation 2 -->
  144. <div id="clickio_rotation_2">
  145.     <script type="text/javascript">
  146.         clickioRotator2.install(
  147.             '#clickio_rotation_2',
  148.             {
  149.                 'custom':   [ // custom size ad unit 2
  150.                     [
  151.                         'html',  
  152.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224681/360_light.js'><\/scr" + "ipt>" +
  153.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  154.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224681']=__lxGc__['s']['_224681']||{'b':{}})['b']['_681201']={'i':__lxGc__.b++};" +
  155.                         "<\/scr" + "ipt>"
  156.                     ]
  157.                 ],
  158.                 '300x250_2x':   [ // 300x250_2x ad unit 2
  159.                     [
  160.                         'html',  
  161.                         "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/224681/360_light.js'><\/scr" + "ipt>" +
  162.                         "<scr" + "ipt class='__lxGc__' type='text/javascript'> " +
  163.                         "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_224681']=__lxGc__['s']['_224681']||{'b':{}})['b']['_681245']={'i':__lxGc__.b++};" +
  164.                         "<\/scr" + "ipt>"
  165.                     ]
  166.                 ],
  167.             }
  168.         );
  169.     </script>
  170. </div>
  171.  
  172.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement