Home Forums Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Arcade Chat
Go Back   ClubPenguinHQ Forums > General Discussion > Programming > Other
Reload this Page JavaScript for Ad Blocking - Google Chrome and others.
Other Discussion of programming languages that don't fall into the other categories belongs here.

JavaScript for Ad Blocking - Google Chrome and others.

Reply
 
LinkBack Thread Tools Display Modes
JavaScript for Ad Blocking - Google Chrome and others.
Old
  (#1)
Donkey is Offline
Podcaster
Donkey
 
Donkey's Avatar
 
Posts: 2,052
Join Date: Jul 2007
Location: Up Sly's ass
Rep Power: 0
  Send a message via AIM to Donkey Send a message via MSN to Donkey Send a message via Yahoo to Donkey Send a message via Skype™ to Donkey 
Default JavaScript for Ad Blocking - Google Chrome and others. - Wednesday, October 8th, 2008

Code:
javascript:(function(){function R(w){try{var d=w.document,j,i,t,T,N,b,r=1,C;for(j=0;t=["object","embed","applet","iframe"][j];++j){T=d.getElementsByTagName(t);for(i=T.length-1;(i+1)&&(N=T[i]);–i)if(j!=3||!R((C=N.contentWindow)?C:N.contentDocument.defaultView)){b=d.createElement(”div”);b.style.width=N.width; b.style.height=N.height;b.innerHTML=”<del>”+(j==3?”third-party “+t:t)+”</del>”;N.parentNode.replaceChild(b,N);}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x)})()
IE and FF: Paste into address bar and enter.
Chrome: Drag this link on this site into your bookmarks and press or paste into address bar or enter.

It's best for Chrome, as if you enter an annoying site with loads of ads but good content they can be removed quick and easy. Google Chrome doesn't have many proper plugins yet, enjoy.
  
Reply With Quote
Re: JavaScript for Ad Blocking - Google Chrome and others.
Old
  (#2)
yo2boy is Offline
Senior Member
yo2boy is an unknown quantity at this point
 
yo2boy's Avatar
 
Posts: 516
Join Date: Apr 2008
Location: #iamthewalrus and/or Canada.
Rep Power: 0
  Send a message via MSN to yo2boy Send a message via Skype™ to yo2boy 
Default Re: JavaScript for Ad Blocking - Google Chrome and others. - Tuesday, January 13th, 2009

Since no one else replied,

Very niice. ;)


http://clubpenguinhq.com/forums/image.php?type=sigpic&userid=11373&dateline=124020  0589
  
Reply With Quote
Re: JavaScript for Ad Blocking - Google Chrome and others.
Old
  (#3)
Donkey is Offline
Podcaster
Donkey
 
Donkey's Avatar
 
Posts: 2,052
Join Date: Jul 2007
Location: Up Sly's ass
Rep Power: 0
  Send a message via AIM to Donkey Send a message via MSN to Donkey Send a message via Yahoo to Donkey Send a message via Skype™ to Donkey 
Default Re: JavaScript for Ad Blocking - Google Chrome and others. - Tuesday, January 13th, 2009

link updated
  
Reply With Quote
your ad blocker
Old
  (#4)
madaco is Offline
Member
madaco has a little shameless behaviour in the past
 
Posts: 175
Join Date: Mar 2009
Location: on the computer in a house, sometimes i travel tooter parts of the house, like my bed
Rep Power: 0
   
Default your ad blocker - Wednesday, April 8th, 2009

this seems to work very well! will it work if i put it in a html file to remove all adson that page? also kind of of topic, can java script be used to block screen names on penguinchat?(if it is on your host?

Last edited by madaco; Wednesday, April 8th, 2009 at 01:51pm.
  
Reply With Quote
Reply

Lower Navigation
Go Back   ClubPenguinHQ Forums > General Discussion > Programming > Other

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
vBulletin Skin developed by: vBStyles.com
Copyright ©2006 - 2009, RancidKraut Industries