NoNameCracksInc

direct_analytics

Oct 3rd, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       var dx = {
  2.  
  3.                                open : function()
  4.                                {
  5.                            
  6.                                 var spacer = "<font color='blue'><strong> | </strong></font>";
  7.                                 var q = document.getElementsByTagName('*');
  8.                                 var k = q.length;
  9.                                 var active_x = '';
  10.                                 var el = [];
  11.  
  12.                                 container = document.createElement('div');
  13.                                 container.style.position = 'absolute';
  14.                                 container.style.top = 20 + 'px';
  15.                                 container.style.left = 20 + 'px';
  16.                                 container.style.width = window.innerWidth /2 + 'px';
  17.                                 container.style.height = window.innerHeight /3 + 'px';
  18.                                 container.style.zIndex = 1000;
  19.                                 container.style.backgroundColor = 'rgba(255,255,255,0.9)';
  20.                                 container.style.border = '1px solid';
  21.                                 container.id='dx_container_v_88661_92701uniq.9';
  22.  
  23.                                  document.body.appendChild(container);
  24.  
  25.                                    var hd = document.createElement('div');
  26.                                    hd.style.position = 'absolute';
  27.                                    hd.style.top = 5 + 'px';
  28.                                    hd.style.left = 10 + 'px';
  29.                                    hd.style.height = 15 + 'px';
  30.                                    hd.style.fontFamily = "‘Lucida Console’, Monaco, monospace";
  31.                                    hd.style.fontSize = '70%';
  32.                                    container.appendChild(hd);
  33.  
  34.                                    var itemstore = document.createElement('div');
  35.                                    itemstore.style.top = 21 + 'px';
  36.                                    itemstore.style.left = 10 + 'px';
  37.                                    itemstore.style.position = 'absolute';
  38.                                    itemstore.style.width = container.offsetWidth -25 + 'px';
  39.                                    itemstore.style.height = container.offsetHeight - 10 - 21*2 + 'px';
  40.                                    itemstore.style.overflow = 'scroll';
  41.                                    container.appendChild(itemstore);
  42.  
  43.                                   cnv = document.createElement('canvas');
  44.                                   cnv.style.position = 'absolute';
  45.                                   cnv.style.left = 2 + 'px';
  46.                                   cnv.style.top = 10 + 'px';
  47.                                   cnv.height = k*17-5;
  48.                                   cnv.width = 30;
  49.                                   itemstore.appendChild(cnv);
  50.  
  51.                                     var changer = document.createElement('div');
  52.                                     changer.style.position = 'absolute';
  53.                                     changer.style.left = 10 + 'px';
  54.                                     changer.style.bottom = 2 + 'px';
  55.                                     changer.style.width = container.offsetWidth-25 + 'px';
  56.                                     changer.style.height = 18 + 'px';
  57.                                     container.appendChild(changer);
  58.  
  59.                                     var idf = document.createElement('input');
  60.                                     idf.type='text';
  61.                                     idf.placeholder = 'Id';
  62.                                     idf.style.position = 'absolute';
  63.                                     idf.style.top = 0;idf.style.left = 0;
  64.                                     idf.style.fontSize = '60%';
  65.                                     idf.style.height = 7 + 'px';
  66.                                     idf.style.width = 100 + 'px';
  67.                                     idf.style.fontFamily = "‘Lucida Console’, Monaco, monospace";
  68.                                     changer.appendChild(idf);
  69.  
  70.                                     var clf = document.createElement('input');
  71.                                     clf.type='text';
  72.                                     clf.placeholder = 'Class';
  73.                                     clf.style.position='absolute';
  74.                                     clf.style.top = 0;clf.style.left = idf.offsetWidth + 5 + 'px';
  75.                                     clf.style.fontSize = '60%';
  76.                                     clf.style.height = 7 + 'px';
  77.                                     clf.style.width = 100 + 'px';
  78.                                     clf.style.fontFamily = "‘Lucida Console’, Monaco, monospace";
  79.                                     changer.appendChild(clf);
  80.  
  81.                                     var evf = document.createElement('input');
  82.                                     evf.type='text';
  83.                                     evf.placeholder = 'Eval';
  84.                                     evf.style.position='absolute';
  85.                                     evf.style.top = 0;evf.style.left = clf.offsetLeft + clf.offsetWidth + 5 + 'px';
  86.                                     evf.style.fontSize = '60%';
  87.                                     evf.style.height = 7 + 'px';
  88.                                     evf.style.width = 100 + 'px';
  89.                                     clf.style.fontFamily = "‘Lucida Console’, Monaco, monospace";
  90.                                     changer.appendChild(evf);
  91.  
  92.                                     idf.onkeyup = function(e)
  93.                                     {
  94.                                      active_x.id = idf.value;
  95.                                      hd.innerHTML = "ID='"+active_x.id+"'"+spacer+"Class='"+active_x.className+"'"+spacer+'Children='+active_x.children.length+spacer+"Parent Node='"+active_x.parentNode.tagName+"'"+spacer;
  96.                                     }
  97.  
  98.                                     clf.onkeyup = function(e)
  99.                                     {
  100.                                      active_x.className = clf.value;
  101.                                      hd.innerHTML = "ID='"+active_x.id+"'"+spacer+"Class='"+active_x.className+"'"+spacer+'Children='+active_x.children.length+spacer+"Parent Node='"+active_x.parentNode.tagName+"'"+spacer;
  102.                                     }
  103.  
  104.                                     evf.onkeypress = function(e)
  105.                                     {
  106.  
  107.                                      if(e.keyCode == 13)
  108.                                      {
  109.                                       var query = evf.value;
  110.                                       eval("active_x"+query);
  111.                                       hd.innerHTML = "ID='"+active_x.id+"'"+spacer+"Class='"+active_x.className+"'"+spacer+'Children='+active_x.children.length+spacer+"Parent Node='"+active_x.parentNode.tagName+"'"+spacer; ;
  112.                                      }                  
  113.                                     }
  114.                                    
  115.                                 window.onresize = function(e)
  116.                                 {
  117.  
  118.                                  container.style.top = 20 + 'px';
  119.                                  container.style.left = 20 + 'px';
  120.                                  container.style.width = window.innerWidth /2 + 'px';
  121.                                  container.style.height = window.innerHeight /3 + 'px';
  122.                                  itemstore.style.width = container.offsetWidth -25 + 'px';
  123.                                  itemstore.style.height = container.offsetHeight - 10 - 21*2 + 'px';
  124.                                  changer.style.width = container.offsetWidth-25 + 'px';
  125.                                  for(var i=0;i<=k-1;i++){el[i].style.width = itemstore.offsetWidth-20-10 + 'px';}
  126.                                 };
  127.  
  128.                                   for(var i=0;i<=k-1;i++)
  129.                                   {
  130.  
  131.                                    el[i] = document.createElement('div');
  132.                                    el[i].style.position = 'absolute';
  133.                                    el[i].style.top = 10+ i*17 + 'px';
  134.                                    el[i].style.height = 15 + 'px';
  135.                                    el[i].style.width = itemstore.offsetWidth-20-10 + 'px';
  136.                                    el[i].style.cursor = 'pointer';
  137.                                    el[i].style.textAlign = 'center';
  138.                                    el[i].style.fontFamily = "‘Lucida Console’, Monaco, monospace";
  139.                                    el[i].style.fontSize = '60%';
  140.                                    el[i].innerHTML = '< ' +q[i].tagName.toLowerCase() + '>';
  141.                                    el[i].onmouseover = function(e){e.target.style.backgroundColor='rgba(128,128,128,0.5)';e.target.style.color='white';q[parseInt(e.target.id)].style.border = '1px solid black';}
  142.                                    el[i].onmouseout = function(e){e.target.style.backgroundColor='inherit';e.target.style.color='black';q[parseInt(e.target.id)].style.border = 'inherit';}
  143.                                    el[i].onclick = function(e){
  144.  
  145.                                                                             active_x=q[parseInt(e.target.id)];
  146.                                                                             idf.value=q[parseInt(e.target.id)].id;
  147.                                                                             clf.value=q[parseInt(e.target.id)].className;1
  148.  
  149.                                                                             e.target.innerHTML = '* '+'< ' +q[parseInt(e.target.id)].tagName.toLowerCase() + '>'+' *';
  150.                                                                             for(var d=0;d<=k-1;d++){if(d!=parseInt(e.target.id))el[d].innerHTML='< ' +q[d].tagName.toLowerCase() + '>';}
  151.  
  152.                                                                                var ctx = cnv.getContext('2d');
  153.                                                                                var child = e.target.offsetTop-3;
  154.                                                                                var passtru = false;
  155.                                                                                for(var i=0;i<=el.length-1;i++){if(q[i] == q[e.target.id].parentNode){parent=el[i].offsetTop-3;passtru=true;break;}}
  156.  
  157.                                                                                cnv.width = cnv.width;
  158.  
  159.                                                                                if(passtru)
  160.                                                                                {
  161.                                                                                 ctx.beginPath();
  162.                                                                                 ctx.strokeStyle = 'blue';
  163.  
  164.                                                                                 ctx.moveTo(10,child);                                                                            
  165.                                                                                 ctx.lineTo(1,child);
  166.                                                                                 ctx.moveTo(10,parent);
  167.                                                                                 ctx.lineTo(1,parent);
  168.                                                                                 ctx.moveTo(1,parent);
  169.                                                                                 ctx.lineTo(1,child);
  170.  
  171.                                                                                 ctx.stroke();
  172.                                                                                 ctx.closePath();
  173.                                                                                }
  174.  
  175.                                                                             var kids = [];
  176.                                                                             for(var b=0;b<=q[parseInt(e.target.id)].children.length-1;b++)
  177.                                                                             {
  178.                                            
  179.                                                                              for(var m=0;m<=k-1;m++)
  180.                                                                              {
  181.                                                                               if(q[m] == q[parseInt(e.target.id)].children[b]){kids.push(el[m].offsetTop-3);}
  182.                                                                              }
  183.                                                                             }
  184.  
  185.                                                                              var ctx = cnv.getContext('2d');                                                                        
  186.                                                                              ctx.beginPath();
  187.  
  188.                                                                             for(var i=0;i<=kids.length-1;i++)
  189.                                                                             {
  190.                                                                            
  191.                                                                               ctx.strokeStyle='red';
  192.                                                                               ctx.moveTo(30,kids[i]);
  193.                                                                               ctx.lineTo(20,kids[i]);
  194.                                                                               ctx.moveTo(20,kids[i]);
  195.                                                                               ctx.lineTo(20,kids[i+1]);
  196.                                                                               ctx.moveTo(20,kids[i+1]);
  197.                                                                              
  198.                                                                             }  
  199.  
  200.                                                                             ctx.stroke();          
  201.                                                                             ctx.closePath();                                                              
  202.  
  203.                                                                             hd.innerHTML = "ID='"+q[parseInt(e.target.id)].id+"'"+spacer+"Class='"+q[parseInt(e.target.id)].className+"'"+spacer+'Children='+q[parseInt(e.target.id)].children.length+spacer+"Parent Node='"+q[parseInt(e.target.id)].parentNode.tagName+"'"+spacer;}
  204.                                                                             el[i].id = i.toString();
  205.                                   }
  206.  
  207.                                    for(var c=0;c<=el.length-1;c++){itemstore.appendChild(el[c]);}
  208.                                },
  209.  
  210.                                kill : function(){document.body.removeChild(container);},
  211.                                count : document.getElementsByTagName('*').length
  212.                              }
Advertisement
Add Comment
Please, Sign In to add comment