title: JavaScript finding, displaying nodes
body: <p>There is software which adds "powered by..." text and image to a link. In it's license it says that it's not forbidden to remove that addition. I could do it by hand, but when I refresh the page, the powered thing is added again, so I need something to hide it. There is couple ways, but I want to do it with javascript help. So here what I have in every page bottom:</p>
  
  <p><img src="https://i.stack.imgur.com/YflBx.gif" alt="logo"></p>
  
  <p>This is the code I can see:</p>
  
  <pre><code>&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;br/&gt;&lt;br/&gt;&lt;center&gt;&lt;small&gt; &lt;a href="http://pages.ebay.com/blackthorne/" target="_blank"&gt;&lt;img align=absbottom border=0 src="http://www.blackthornesw.com/bthome/BlackthorneB2Shade_GB.bmp"&lt;/img&gt;&lt;/a&gt;&lt;/small&gt;&lt;/center&gt;&lt;br/&gt;&lt;center&gt;&lt;font face=Arial,Helvetica size=2&gt;Powered by &lt;a href="http://pages.ebay.com/blackthorne/" target="_blank"&gt;eBay Blackthorne 04.11.017&lt;/a&gt;&lt;/font&gt;&lt;/center&gt;
  &lt;script&gt;
  function ErrorOff() {return true;}
  window.onerror = ErrorOff;
  setTimeout("document.images.eBayBig.style.display='none'",300);
  &lt;/script&gt;
  </code></pre>
  
  <p>Before this code (at the bottom of the HTML) I add javascript which I found on the internet and I get this result:
  <img src="https://i.stack.imgur.com/uHj3o.gif" alt="enter image description here"></p>
  
  <p>Here is full code (with javascript which I found):</p>
  
  <pre><code>&lt;SCRIPT type=text/javascript&gt;
  window.onload=function(){
  findcenter();
  }
  function findcenter()
  {
  nodes = document.getElementsByTagName("center");
  subnode = nodes[nodes.length-1];
  var link = subnode.getElementsByTagName("a")[0].href;
  if(link.indexOf("pages.ebay") != -1)
  {
  subnode.style.display="none";
  }
  }
  &lt;/SCRIPT&gt;
  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;br/&gt;&lt;br/&gt;&lt;center&gt;&lt;small&gt; &lt;a href="http://pages.ebay.com/blackthorne/" target="_blank"&gt;&lt;img align=absbottom border=0 src="http://www.blackthornesw.com/bthome/BlackthorneB2Shade_GB.bmp"&lt;/img&gt;&lt;/a&gt;&lt;/small&gt;&lt;/center&gt;&lt;br/&gt;&lt;center&gt;&lt;font face=Arial,Helvetica size=2&gt;Powered by &lt;a href="http://pages.ebay.com/blackthorne/" target="_blank"&gt;eBay Blackthorne 04.11.017&lt;/a&gt;&lt;/font&gt;&lt;/center&gt;
  &lt;script&gt;
  function ErrorOff() {return true;}
  window.onerror = ErrorOff;
  setTimeout("document.images.eBayBig.style.display='none'",300);
  &lt;/script&gt;
  </code></pre>
  
  <p>As you can see the text "Powered by..." is gone, but image still appears. How should I change this javascript that image would be gone too?</p>