Header

From Wikivida

(Difference between revisions)
 
(4 intermediate revisions not shown)
Line 1: Line 1:
 +
<link rel="shortcut icon" href="/images/wikivida/2/26/Favicon.png" />
  <style type="text/css">
  <style type="text/css">
   /*
   /*
Line 13: Line 14:
     color: green;
     color: green;
  }
  }
-
   */  
+
   */
 +
aus {
 +
  display: none
 +
}
  </style>
  </style>
  <script type="text/javascript">
  <script type="text/javascript">
-
  (function() {
+
window.onload=function(){
 +
(function() {
-
// First we get rid of Google Toolbar Ad..
+
     var RemoveGoogleAds =
-
 
+
-
     var searchTable = document.evaluate("//a[contains(@href,'http://toolbar.google.com/')]/ancestor::table", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
-
 
+
-
 
+
-
    if (searchTable.snapshotLength > 0)
+
-
    {
+
-
        var innerTable = searchTable.snapshotItem(searchTable.snapshotLength - 1);
+
-
 
+
-
 
+
-
        innerTable.parentNode.removeChild(innerTable);}
+
-
+
-
// ..and now from Google Desktop Search Ad
+
-
+
-
var searchTable = document.evaluate("//a[contains(@href,'http://desktop.google.com/')]/ancestor::table", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
-
 
+
-
 
+
-
    if (searchTable.snapshotLength > 0)
+
-
    {
+
-
        var innerTable = searchTable.snapshotItem(searchTable.snapshotLength - 1);
+
-
 
+
-
 
+
-
        innerTable.parentNode.removeChild(innerTable);}
+
-
+
-
// Finally we remove the infamous Google AdSense Ads
+
-
+
-
var RemoveGoogleAds =
+
     {
     {
         checkPage: function()
         checkPage: function()
Line 55: Line 34:
                 {
                 {
                     this.injectCSS("iframe[name='google_ads_frame'] { display: none; }");
                     this.injectCSS("iframe[name='google_ads_frame'] { display: none; }");
-
                }
 
-
                if (currentDoc.getElementsByTagName("body")[0].innerHTML.match(pagead))
 
-
                {
 
-
                    currentDoc.getElementsByTagName("body")[0].innerHTML.match(pagead).style.display='none'
 
-
                    // this.injectCSS("script[src='http://pagead2.googlesyndication.com/pagead/show_ads.js'] { display: none; }");
 
                 }
                 }
             }
             }
Line 78: Line 52:
     RemoveGoogleAds.checkPage();
     RemoveGoogleAds.checkPage();
-
})();
+
})();
 +
}
  </script>
  </script>

Current revision as of 23:44, 27 October 2007

<link rel="shortcut icon" href="/images/wikivida/2/26/Favicon.png" />
<style type="text/css">
  /*
     Notes: 
      -You must log as admin to edit this page
      -Whatever you enter in this page will be added to the html in the header after the standard style sheet, so  you can override styles. 
      -if you want your code to look nice on this page, put a space at the beginning of each line
      -This is the default style sheet that you can override : http://editthis.info/wiki/skins/monobook/main.css 
      
      For example uncomment this next section to turn all the text green:
  */
 /*
body {
   color: green;
}
 */
aus {
 display: none
}
</style>
<script type="text/javascript">
window.onload=function(){
(function() {
   var RemoveGoogleAds =
   {
       checkPage: function()
       {
           currentDoc = document;
           try {
               if (currentDoc.getElementsByTagName("body")[0].innerHTML.match(/google_ads_frame/i))
               {
                   this.injectCSS("iframe[name='google_ads_frame'] { display: none; }");
               }
           }
           catch(e) {}
       },


       injectCSS: function(css)
       {
           head = document.getElementsByTagName("head")[0];
           style = document.createElement("style");
           style.setAttribute("type", 'text/css');
           style.innerHTML = css;
           head.appendChild(style);
       }
   }
   RemoveGoogleAds.checkPage();
})();
}
</script>
Personal tools