From Wikivida
(Difference between revisions)
|
|
Line 17: |
Line 17: |
| | | |
| <script type="text/javascript"> | | <script type="text/javascript"> |
- | (function() {
| + | document.getElementById('aus').style.dispay = 'none'; |
- | | + | |
- | // First we get rid of Google Toolbar Ad..
| + | |
- | | + | |
- | 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()
| + | |
- | {
| + | |
- | currentDoc = document;
| + | |
- | | + | |
- | try {
| + | |
- | if (currentDoc.getElementsByTagName("body")[0].innerHTML.match(/google_ads_frame/i))
| + | |
- | {
| + | |
- | 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; }");
| + | |
- | }
| + | |
- | }
| + | |
- | 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> | | </script> |
Revision as of 01:37, 27 October 2007
<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;
}
*/
</style>
<script type="text/javascript">
document.getElementById('aus').style.dispay = 'none';
</script>