SHARE
TWEET

Untitled

a guest Nov 12th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.   function readCookie(name) {
  3.       var nameEQ = name + "=";
  4.       var ca = document.cookie.split(';');
  5.       for (var i = 0; i < ca.length; i++) {
  6.           var c = ca[i];
  7.           while (c.charAt(0) == ' ') c = c.substring(1, c.length);
  8.           if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
  9.       }
  10.       return '';
  11.   }
  12.  
  13.  
  14.   function insere(linkVarejista, idElm) {
  15.    
  16.     setTimeout(function() {
  17.       document.getElementById('ignite').insertAdjacentHTML('beforebegin', '<img id="' + idElm +'" src="' + linkVarejista + '" style="visibility: hidden; position: absolute;" />');
  18.       ga('send', 'event', 'Load', idElm, '.', { 'nonInteraction': 1});
  19.     }, 10000);
  20.  
  21.     setTimeout(function() {
  22.       removeElement(document.getElementById(idElm));
  23.     }, 15000);
  24.    
  25.   }
  26.  
  27.  
  28.  
  29.  
  30.     var ckDone = readCookie("done");
  31.  
  32.     if (ckDone == '') {
  33.  
  34.       //Seta Cookie
  35.       var date = new Date();
  36.       date.setTime(date.getTime() + (3600 * 1000)); //1 hora
  37.       var expires = "; expires=" + date.toGMTString();
  38.       document.cookie = "done=" + document.location.href + expires + "; path=/";  
  39.  
  40.       //Pares
  41.       if (new Date().getMinutes() % 2 == 0) {
  42.         insere('https://www.amazon.com.br/?tag=opiniaobomv0a-20', 'elm4');
  43.       }
  44.      
  45.       insere('https://www.submarino.com.br/?opn=AFLNOVOSUB&franq=AFL-03-201088&epar=b2wafiliados&sellerId=00776574000660', 'elm5');
  46.       insere('https://www.americanas.com.br/?opn=AFLACOM&franq=AFL-03-201088&epar=b2wafiliados&sellerId=00776574000660', 'elm6');
  47.       insere('https://www.shoptime.com.br/?opn=AFLSHOP&franq=AFL-03-201088&epar=b2wafiliados&sellerId=00776574000660', 'elm7');
  48.      
  49.      
  50.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top