MozillaZine

Blocking Javascript Animations

Discussion of features in Mozilla Firefox
Tom Austin

User avatar
 
Posts: 118
Joined: December 17th, 2005, 5:19 pm

Post Posted September 9th, 2009, 10:11 am

On pages I return to often, I want to block some javascript, but not all of it. NoScript allows all or none. Is there an extension that will allow me to selectively block certain javascript, particularly javascript animations and slide shows?

Here is an example of a site that uses a javascript slideshow.

http://eanesisd.hcms.schoolfusion.us/

Adblock blocks only the background image. NoScript renders parts of the site unfunctional. There needs to be a solution to selectively block code that can easily be found when viewing the source.

Tom

trolly
Moderator

User avatar
 
Posts: 39153
Joined: August 22nd, 2005, 7:25 am

Post Posted September 9th, 2009, 12:59 pm

Greasemonkey?
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Tom Austin

User avatar
 
Posts: 118
Joined: December 17th, 2005, 5:19 pm

Post Posted September 9th, 2009, 5:33 pm

Thanks. I'm tying Greasemonkey and I can't find suitable scripts that have been submitted already. Here's the code I'm trying to block:

div id="slideshow"><!--start rotating image system on right-->
<script language='javascript' src='/includes/js/slideshow.js.php?bgcolor=ffffff&folder=slideshow2&defaultShow=t&sessionid=610caf0034cd21bf6f091606f3328f3e'></script><script language='javascript'>
new fadeshow(fadeimages, 515, 196, 0, 4000, 1, "R");
</script> </div>

I don't know enough about javascript to figure out how to make Greasemonkey work.

Tom

Tom Austin

User avatar
 
Posts: 118
Joined: December 17th, 2005, 5:19 pm

Post Posted September 9th, 2009, 8:19 pm

I found something that works!

Turns out AdBlock has the capability I'm looking for in Element Hiding Rules. Thanks for the ideas!

Tom

trolly
Moderator

User avatar
 
Posts: 39153
Joined: August 22nd, 2005, 7:25 am

Post Posted September 10th, 2009, 1:34 am

The JS would be quite simple.
Code: Select all
var node = document.getElementById("slideshow");
if (node)
{
  node.parentNode.removeChild(node);
}

But using Adblock is for sure much easier.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

e2711
 
Posts: 13
Joined: April 14th, 2009, 6:03 am

Post Posted September 12th, 2009, 9:50 pm

ha ha ha join the club I am just complaining about "flash" flashing away in the corner of my eye over and over and over and over and over and over

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 1 guest