Advertisement
clickio

CLICKIO AdFox sticky unit

Sep 22nd, 2021
1,380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.43 KB | None | 0 0
  1. <!-- CLICKIO AdFox sticky unit -->
  2. <style>
  3.     :root {
  4.         --lx-bg-color: #fff;
  5.         --lx-cross-color: #000;
  6.     }
  7.  
  8.     #adfox_sticky {
  9.         width: 100%;
  10.         max-height: 104px;
  11.         padding-top: 4px;
  12.         z-index: 2147483647;
  13.         position: fixed;
  14.         bottom: 0px;
  15.         left: 0;
  16.         background: var(--lx-bg-color);
  17.         text-align: center;
  18.         transition: 300ms ease-in;
  19.         line-height: 0px;
  20.         box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2) !important;
  21.     }
  22.  
  23.     #adfox_sticky #lx_close_button {
  24.         position: absolute;
  25.         width: 44px;
  26.         height: 30px;
  27.         top: -30px;
  28.         left: 0px;
  29.         background-size: 13px 13px;
  30.         background-position: 9px;
  31.         background-color: var(--lx-bg-color);
  32.         background-repeat: no-repeat;
  33.         box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.2);
  34.         border: none;
  35.         border-radius: 0 12px 0 0;
  36.         outline: none;
  37.         font-family: verdana;
  38.         font-size: 0px;
  39.         color: var(--lx-cross-color);
  40.     }
  41.  
  42.     #adfox_sticky #lx_close_button:before {
  43.       content: "";
  44.       display: inline-block;
  45.       width: 10px;
  46.       height: 10px;
  47.       transform: rotate(-45deg);
  48.       border-left: 2px solid var(--lx-cross-color);
  49.       border-bottom: 2px solid var(--lx-cross-color);
  50.       position: relative;
  51.       top: -3px;
  52.     }
  53.     #adfox_sticky #lx_close_button span {
  54.       width: 28px;
  55.       height: 28px;
  56.       line-height: 28px;
  57.       text-align: center;
  58.       display: block;
  59.       position: relative;
  60.       color: var(--lx-cross-color);
  61.       z-index: 1;
  62.     }
  63.  
  64.     #adfox_sticky #lx_noclick {
  65.     position: absolute;
  66.     top: -55px;
  67.     left: 0px;
  68.     height: 85px;
  69.     width: 66px;
  70.     }
  71. </style>
  72.  
  73. <div id="adfox_sticky">
  74.     <div id="lx_noclick"></div>
  75.     <button id="lx_close_button"></button>
  76.     <div id='adfox_163217085202839373-1<%swipe_random%>'>
  77. </div>
  78. </div>
  79. <script>
  80. (function(w) {
  81.     var refreshContainer = function(){
  82.         setTimeout(function(){ w.Ya.adfoxCode.reload('adfox_163217085202839373-1<%swipe_random%>'); }, 30000);
  83.     };
  84.  
  85.     w.yaContextCb.push(()=>{
  86.         Ya.adfoxCode.createScroll({
  87.             ownerId: 257193,
  88.             containerId: 'adfox_163217085202839373-1<%swipe_random%>',
  89.             params: {
  90.                 pp: 'biwg',
  91.                 ps: 'djlk',
  92.                 p2: 'hbhw'
  93.             }
  94.             onRender: function() { refreshContainer(); },
  95.             onError: function(error) { refreshContainer(); },
  96.             onStub: function() { refreshContainer(); }
  97.         }, ['phone'],{
  98.           tabletWidth: 1024,
  99.           phoneWidth: 767,
  100.           isAutoReloads: false
  101.         })
  102.     });
  103. })(window);
  104. </script>
  105. <script>
  106.     (function(){
  107.         var lxAdUnit      = document.querySelector("#adfox_sticky");
  108.         var lxCloseButton = document.querySelector("#lx_close_button");
  109.  
  110.         function lxCloseUnit() {
  111.             while (lxAdUnit.hasChildNodes()) {
  112.                 lxAdUnit.removeChild(lxAdUnit.lastChild);
  113.             }
  114.         }
  115.  
  116.         lxCloseButton.onclick = lxCloseUnit;
  117.  
  118.         var noClick = document.querySelector("#adfox_sticky #lx_noclick");
  119.  
  120.         function lxNoClickHndlr(e) {
  121.             e.preventDefault();
  122.             e.stopPropagation();
  123.             return false;
  124.         }
  125.  
  126.         noClick.addEventListener("click", lxNoClickHndlr);
  127.  
  128.     })();
  129. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement