Flash Ads Remover - Boosts Internet Speed

By dkhal Last update Oct 3, 2008 — Installed 1,075 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 8 posts, 4 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
dkhal Script's Author

great

 
Avindra V.G. Scriptwright

actually, document.embeds exists, so you should use it instead:

for(i=0;i<document.embeds.length;i++) document.embeds[i].parentNode.removeChild(document.embeds[i])

 
dkhal Script's Author

yes i am using xp now but when i made this script i had no idea what that meant

 
dkhal Script's Author

ok this is one of my very old scripts
i will do this in the new ones :)

 
JoeSimmons Scriptwright

Ew.. You call 3 commands every time you loop. Extremely slow and inefficient. Do this...

e = document.evaluate("//embed", document, null, 6, null);
for(i=0; i<e.snapshotLength; i++){
e.snapshotItem(i).src="";
e.snapshotItem(i).width="0";
e.snapshotItem(i).height="0";
} 

You need to stop using document.getElementsByTagName and use document.evaluate, and use variables correctly. Try to call as few commands as possible.

 
dkhal Script's Author

thanks
its the same amount of lines :P and useful too thanks

 
dkhal Script's Author

this could help in removing flash ads on any site

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel