Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title></title>
  5. <script>
  6. injectDOM = function() {
  7.     setTimeout(function() {
  8.         var u = window.location.href;
  9.         var sessionid = getParam(u, 'session_id');
  10.         var org_id = getParam(u, 'org_id');
  11.         var suppressFlash = getParam(u, 'suppressFlash');
  12.        
  13.         var div = document.createElement('p');
  14.         document.body.appendChild(div);
  15.         div.style.width = "0px";
  16.         div.style.height = "0px";
  17.         div.style.background = "url(https://src.ebay-us.com/fp/clear.png?org_id="+org_id+"&session_id="+sessionid+"&m=1)";
  18.  
  19.         // NOTE: Don't use new Image() it delays onload (in chrome at least)
  20.         var img = document.createElement("img");
  21.         img.src = "https://src.ebay-us.com/fp/clear.png?org_id="+org_id+"&session_id="+sessionid+"&m=2";
  22.         document.body.appendChild(img);
  23.         var js = document.createElement("script");
  24.         js.src ="https://src.ebay-us.com/fp/check.js?org_id="+org_id+"&session_id="+sessionid;
  25.         this.document.body.appendChild(js);
  26.  
  27.         // Get OS and UA
  28.         var u = navigator.userAgent.toLowerCase(),
  29.         p = navigator.platform.toLowerCase(),
  30.         win = p ? /win/.test(p) : /win/.test(u);
  31.         var ie = false;
  32.         try{
  33.             ie = !+"\v1";
  34.             if (!ie)
  35.                 ie = /*@cc_on!@*/false;
  36.         }
  37.         catch(e){
  38.            
  39.         }
  40.         if(suppressFlash == '' || suppressFlash == 'false'){
  41.         if (ie && win) {
  42.             //var divx = document.createElement("div");
  43.             var divx = document.getElementById("tmxobject");
  44.             divx.outerHTML =
  45.               '<object type="application/x-shockwave-flash" data="https://src.ebay-us.com/fp/fp.swf?org_id='+org_id+'&session_id='+sessionid+'" width="1" height="1"><param name="movie" value="https://src.ebay-us.com/fp/fp.swf?org_id='+org_id+'&session_id='+sessionid+'" /> <param name="wmode" value="transparent" /></object>';
  46.         } else {
  47.             var obj = document.createElement('object');
  48.             obj.setAttribute("type", "application/x-shockwave-flash");
  49.             obj.setAttribute("data", "https://src.ebay-us.com/fp/fp.swf?org_id="+org_id+"&session_id="+sessionid);
  50.             obj.setAttribute("width", "1");
  51.             obj.setAttribute("height", "1");
  52.  
  53.             var param1 = document.createElement('param');
  54.             param1.setAttribute("name", "movie");
  55.             param1.setAttribute("value", "https://src.ebay-us.com/fp/fp.swf?org_id="+org_id+"&session_id="+sessionid);
  56.             var param2 = document.createElement('param');
  57.             param2.setAttribute("name", "wmode");
  58.             param2.setAttribute("value", "transparent");
  59.             obj.appendChild(param1);
  60.             obj.appendChild(param2);
  61.             document.body.appendChild(obj);
  62.  
  63.             //obj.appendChild(document.createElement("div"));
  64.             }
  65.         }
  66.         var div1 = document.createElement('div');
  67.         document.body.appendChild(div1);
  68.  
  69.     }, 0);
  70. }
  71. function getParam(u, p)
  72. {
  73.     var s = u.indexOf(p) + p.length +1;
  74.     var e = u.indexOf('&', s);
  75.  
  76.     if (e == -1)
  77.         e = u.length;
  78.     var v =  u.substring(s, e);
  79.     var isOk  = /^[0-9A-Z]*$/i.test(v);
  80.     if(isOk)
  81.         return v;
  82.     else
  83.        return "";
  84. }
  85. </script>
  86. </head>
  87. <body onload="injectDOM();">
  88. <div id="tmxobject"></div>
  89. </body>
  90. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement