Page 1 of 1

Blocking some types of animation

Posted: Mon Sep 28, 2015 6:39 pm
by wakkamole
I want to block a JS animation. The site triggers your antispam filter so I can't actually post the URL... so... uhh... Well, anyway it's the top hit in a duckduckgo search for: azithromycin action

About 1/8th the way down the page on the right side. It's a smooth scrolling box. I've seen this kind of ad/attention grab on several sites and want to filter it off. Disabling all scripts globally works but I was hoping for a more fine-tuned approach. Thanks for any help here!

Re: Blocking some types of animation

Posted: Mon Sep 28, 2015 8:22 pm
by barbaz
This URL?

Code: Select all

http://www.rxlist.com/zithromax-drug/clinical-pharmacology.htm
I don't randomly allow scripts on random sites.
So if that's it, is the animated part the "Popular Collections" sidebar element on the right?

BTW, one possible approach to zap it is a custom surrogate script.

Re: Blocking some types of animation

Posted: Mon Sep 28, 2015 9:54 pm
by wakkamole
Yes that is the site and the animated graphic I'd like to block.

Re: Blocking some types of animation

Posted: Mon Sep 28, 2015 10:59 pm
by Thrawn
The simplest approach is to remove the entire box from the page.
  1. Open a new tab and go to about:config. This will warn you that what you're doing is dangerous (which is true; follow instructions carefully!).
  2. Right-click anywhere on the page and select New - String.
    • Name: noscript.surrogate.rxlist.sources
    • Value: !@.rxlist.com
    This tells NoScript to apply a surrogate to rxlist.com and all subdomains, before running any other scripts.
  3. Right-click again and add another string value.
    • Name: noscript.surrogate.rxlist.replacement
    • Value: var demoBox = document.getElementById('demo_container'); demoBox.parentNode.removeChild(demoBox);
      This tells NoScript to remove the element named 'demo_container' from the page.