Advertisement
clickio

frasimania.it skin + mirror

Feb 12th, 2021 (edited)
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.92 KB | None | 0 0
  1. <script>
  2. (function(){
  3.     function lx_isMatchingDeviceType(device) {
  4.         if (typeof device === 'undefined') {return true;}
  5.         if (['ALL', 'MOBILE', 'PHONE', 'DESKTOP', 'TABLET'].indexOf(device) == -1 || device === "ALL") {return true;}
  6.         var md = new MobileDetect(window.navigator.userAgent);
  7.         var isMobile = md.mobile() !== null, isPhone = md.phone() !== null, isTablet = md.tablet() !== null;
  8.         if (device === "DESKTOP" && !isMobile) {return true;}
  9.         if (device === "MOBILE" && isMobile) {return true;}
  10.         if (device === "TABLET" && isTablet) {return true;}
  11.         if (device === "PHONE" && isPhone) {return true;}
  12.         return false;
  13.     }
  14.     var lx_md_script = document.createElement('script');
  15.     var currentpage = window.location.href;
  16.     lx_md_script.onload = function () {
  17.         if (lx_isMatchingDeviceType('DESKTOP')&& currentpage !== "https://www.tasse-fisco.com") {  
  18.            if (!(lx_isMatchingDeviceType('DESKTOP') && window.screen.width < 1200)) {
  19.                setTimeout(function(){
  20.                    var lx_body = document.getElementsByTagName('body').item(0);
  21.                     var lx_script = document.createElement('script');
  22.                     lx_script.setAttribute('type', 'text/javascript');
  23.                     lx_script.setAttribute('data-cfasync', 'false');
  24.                     lx_script.setAttribute('src', 'https://sac.ayads.co/sublime/33057');
  25.                     lx_body.insertBefore(lx_script, lx_body.firstChild);
  26.                 }, 100);
  27.             }
  28.         }
  29.     };
  30.     lx_md_script.setAttribute('type', 'text/javascript');
  31.     lx_md_script.setAttribute('src', 'https://clickiocdn.com/t/fst/mobile-detect.min.js');
  32.     lx_md_script.setAttribute('async', 'true');
  33.     document.head.appendChild(lx_md_script);
  34. })();
  35.  
  36.  
  37.  
  38. function receiveMessage(event)
  39. {
  40.   if (event.data == "cl_mirror_enable")
  41.       clAddMirrorSticky();
  42. }
  43. window.addEventListener("message", receiveMessage, false);
  44.  
  45. function clAddMirrorSticky() {
  46.     var s = document.currentScript;
  47.  
  48.     function showCode(parentSelector, parentWindow, code, divId) {
  49.         var div = document.createElement('div');
  50.         if (divId) div.id = divId;
  51.         var divForScripts = document.createElement('div');
  52.         divForScripts.innerHTML = code;
  53.         div.appendChild(divForScripts);
  54.         var p = parentWindow.document.querySelector(parentSelector);
  55.         p.appendChild(div);
  56.         var scripts = divForScripts.getElementsByTagName("script");
  57.         Array.from(scripts).forEach(function(script, index, array) {
  58.             var newScript = document.createElement('script');
  59.             if(script !== s)
  60.             {
  61.                 if(typeof script.src !== "undefined" && script.src && script.sr !== "")
  62.                {
  63.                    newScript.src = script.src;
  64.                     newScript.className = script.className;
  65.                     div.appendChild(newScript);
  66.                 }
  67.                 else
  68.                 {
  69.                     var data = (script.text || script.textContent || script.innerHTML || "");
  70.                     newScript.className = script.className;
  71.                     newScript.type = script.type;
  72.                     newScript.appendChild(document.createTextNode(data));
  73.                     div.appendChild(newScript);
  74.                 }
  75.                 divForScripts.removeChild(script);
  76.             }
  77.         });
  78.  
  79.         div.removeChild(divForScripts);
  80.     }
  81.     var adUnitCode = "<scr" + "ipt async type='text/javascript' src='//s.clickiocdn.com/t/common_258.js'><\/scr" + "ipt>" +
  82.             "<scr" + "ipt class='__lxGc__' type='text/javascript'>" +
  83.             "((__lxGc__=window.__lxGc__||{'s':{},'b':0})['s']['_217337']=__lxGc__['s']['_217337']||{'b':{}})['b']['_666691']={'i':__lxGc__.b++};" +
  84.             "<\/scr" + "ipt>";  // code to insert
  85.  
  86.     showCode('body', window, adUnitCode, 'clickio_sticky_wrapper');
  87. }
  88. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement