Blocking Javascript Animations

Discussion of features in Mozilla Firefox
Post Reply
User avatar
Tom Austin
Posts: 141
Joined: December 17th, 2005, 5:19 pm

Blocking Javascript Animations

Post by Tom Austin »

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
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Blocking Javascript Animations

Post by trolly »

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.
User avatar
Tom Austin
Posts: 141
Joined: December 17th, 2005, 5:19 pm

Re: Blocking Javascript Animations

Post by Tom Austin »

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
User avatar
Tom Austin
Posts: 141
Joined: December 17th, 2005, 5:19 pm

Re: Blocking Javascript Animations

Post by Tom Austin »

I found something that works!

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

Tom
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Blocking Javascript Animations

Post by trolly »

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

Re: Blocking Javascript Animations

Post by e2711 »

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
Post Reply