Advertisement
clickio

AdFox mobile sticky for shkolazhizni.ru

Mar 11th, 2020
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.49 KB | None | 0 0
  1. <!-- Head code -->
  2. <script>(function(){function a(){__clADF__.adxAllowed(0)}var b=window,c=b.document,d=c.getElementsByTagName('head')[0];d||(d=c.createElement('head'),b.appendChild(d)),b.__clADF__={state:0,loaded:0,adxAllowed:function(a){if(1!=this.loaded){n='adfoxAsyncParams',b[n]&&b[n].forEach(function(b){b.params.pk=a}),n1=n+'Scroll',b[n1]&&b[n1].forEach(function(b){b[0].params.pk=a}),n1=n+'Adaptive',b[n1]&&b[n1].forEach(function(b){b[0].params.pk=a}),n='Adaptive',b[n]&&b[n].forEach(function(b){b[0].params.pk=a}),this.state=a;var d=document.createElement('script');d.setAttribute('src','https://yastatic.net/pcode/adfox/loader.js'),d.setAttribute('async','async');var e=c.getElementsByTagName('head')[0];e||(e=c.createElement('head'),b.appendChild(e)),e.appendChild(d),this.loaded=1}}};var e=c.createElement('script');e.setAttribute('src','//clickiocdn.com/hbadx/?f=__clADF__&rt='+new Date().getTime()+'&site_id=203461&title='+encodeURIComponent(c.title)+'&r='+encodeURIComponent(c.referrer)),e.setAttribute('async','async'),e.onreadystatechange=function(){'loaded'!=this.readyState&&'complete'!=this.readyState&&setTimeout(a,0)},e.onerror=function(){setTimeout(a,0)},d.appendChild(e),setTimeout(a,3e3)})();</script>
  3.  
  4. <!-- Body code -->
  5. <!-- CLICKIO AdFox unit 655465 -->
  6. <div id="lx_sticky">
  7.     <button id="lx_close_button">X</button>
  8.     <div id='adfox_158385139148659184'></div>
  9. </div>
  10. <script>
  11.     (function(w, n) {
  12. w[n] = w[n] || [];
  13. w[n].push([{
  14.         ownerId: 257193,
  15.         containerId: 'adfox_158385139148659184',
  16.                 params: {
  17.             pk: __clADF__.state,
  18.             pp: 'ksu',
  19.             ps: 'djlk',
  20.             p2: 'fpxb'
  21.         }
  22.     }, [ 'phone'], {
  23.         tabletWidth: 1024,
  24.         phoneWidth: 767,
  25.         isAutoReloads: false
  26.     }]);})(window, 'adfoxAsyncParamsAdaptive');
  27. </script>
  28. <style>
  29.     :root {
  30.         --lx-bg-color: #fff;
  31.         --lx-cross-color: #000;
  32.     }
  33.  
  34.     #lx_sticky {
  35.         width: 100%;
  36.         max-height: 104px;
  37.         padding-top: 4px;
  38.         z-index: 2147483647;
  39.         position: fixed;
  40.         bottom: 0px;
  41.         background: var(--lx-bg-color);
  42.         text-align: center;
  43.         transition: 300ms ease-in;
  44.         line-height: 0px;
  45.         box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2) !important;
  46.     }
  47.  
  48.     #lx_close_button {
  49.         position: absolute;
  50.         width: 28px;
  51.         height: 28px;
  52.         top: -28px;
  53.         right: 0px;
  54.         background-size: 13px 13px;
  55.         background-position: 9px;
  56.         background-color: var(--lx-bg-color);
  57.         background-repeat: no-repeat;
  58.         box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.2);
  59.         border: none;
  60.         border-radius: 12px 0 0 0;
  61.         outline: none;
  62.         font-family: verdana;
  63.         font-size: 12pt;
  64.         color: var(--lx-cross-color);
  65.     }
  66.  
  67.     #lx_close_button:before {
  68.         position: absolute;
  69.         content: "";
  70.         top: -20px;
  71.         right: 0px;
  72.         left: -20px;
  73.         bottom: 0px;
  74.     }
  75.     @media screen and (min-width: 769px)  {
  76.         #lx_sticky {
  77.             display:none;
  78.         }
  79.     }
  80. </style>
  81. <script>
  82.     (function(){
  83.         var lxAdUnit      = document.querySelector("#lx_sticky");
  84.         var lxCloseButton = document.querySelector("#lx_close_button");
  85.  
  86.         function lxCloseUnit() {
  87.             while (lxAdUnit.hasChildNodes()) {
  88.                 lxAdUnit.removeChild(lxAdUnit.lastChild);
  89.             }
  90.         }
  91.  
  92.         lxCloseButton.onclick = lxCloseUnit;
  93.     })();
  94. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement