Header

From Wikivida

(Difference between revisions)
 
(6 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">
-
 
-
iframe[name='google_ads_frame'],
 
-
a[href^='http://pagead2.googlesyndication.com']
 
-
{ display: none ! important; }
 
-
 
-
iframe[src^='http://ypn-js.overture.com']
 
-
{ display: none ! important; }
 
   /*
   /*
       Notes:  
       Notes:  
Line 20: Line 14:
     color: green;
     color: green;
  }
  }
-
   */  
+
   */
 +
aus {
 +
  display: none
 +
}
  </style>
  </style>
  <script type="text/javascript">
  <script type="text/javascript">
-
  function addGlobalStyle(css) {
+
window.onload=function(){
-
    var head, style;
+
(function() {
-
    head = document.getElementsByTagName('head')[0];
+
-
    if (!head) { return; }
+
-
    style = document.createElement('style');
+
-
    style.type = 'text/css';
+
-
    style.innerHTML = css;
+
-
    head.appendChild(style);
+
-
}
+
-
var scripts = document.getElementsByTagName('body')[0];
+
    var RemoveGoogleAds =
-
if (!scripts) return;
+
    {
-
scripts = scripts.getElementsByTagName('script');
+
        checkPage: function()
-
if (!scripts) return;
+
        {
 +
            currentDoc = document;
-
var google_url = 'http://pagead2.googlesyndication.com/pagead/show_ads.js';
+
            try {
-
var yahoo_url = 'http://ypn-js.overture.com/partner/js/ypn.js';
+
                if (currentDoc.getElementsByTagName("body")[0].innerHTML.match(/google_ads_frame/i))
 +
                {
 +
                    this.injectCSS("iframe[name='google_ads_frame'] { display: none; }");
 +
                }
 +
            }
 +
            catch(e) {}
 +
        },
-
var len = scripts.length;
 
-
for (var i = len-1; i >= 0; i--) {
+
        injectCSS: function(css)
-
var f = scripts[i];
+
        {
-
var replace_text = '';
+
            head = document.getElementsByTagName("head")[0];
 +
            style = document.createElement("style");
 +
            style.setAttribute("type", 'text/css');
 +
            style.innerHTML = css;
 +
            head.appendChild(style);
 +
        }
 +
    }
-
if (f.src == google_url) {
+
    RemoveGoogleAds.checkPage();
-
replace_text = 'Google Ads Removed';
+
-
} else if (f.src == yahoo_url) {
+
-
replace_text = 'Yahoo Ads Removed';
+
-
}
+
-
if (replace_text != '')
+
-
{
+
-
var ad_notice = document.createElement("div");
+
-
f.parentNode.insertBefore(ad_notice, f);
+
-
ad_notice.innerHTML = replace_text;
+
-
ad_notice.className = 'removed-ads';
+
-
f.parentNode.removeChild(f);
+
-
}
+
-
}
+
-
  addGlobalStyle("iframe[name='google_ads_frame'], a[href^='http://pagead2.googlesyndication.com'] { display: none ! important; }");
+
  })();
-
addGlobalStyle("iframe[src^='http://ypn-js.overture.com'] { display: none ! important; }");
+
  }
-
  addGlobalStyle("div.removed-ads, " +
+
-
              " a.ad_origin[href='http://www.google.com/ads_by_google.html']:link, " +
+
-
  " a.ad_origin[href='http://www.google.com/ads_by_google.html']:visited, " +
+
-
  " a.ad_origin[href='http://www.google.com/ads_by_google.html']:hover, " +
+
-
  " a.ad_origin[href='http://www.google.com/ads_by_google.html']:active { width: 100%; border: 1px solid black; text-align: center; color: yellow; background-color: #666; font-weight: bold; text-decoration: none ! important; }");
+
-
addGlobalStyle("a.ad_origin[href='http://www.google.com/ads_by_google.html']:after { content: ' Removed'; }");
+
  </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