Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to disable a specific JS script from a specific website without disabling the javascript completely. Is there a way to do that ?

share|improve this question

migrated from May 3 '11 at 15:12

This question came from our site for professional and enthusiast programmers.


After installing NoScript, open its option (by opening context menu on the small icon on the status bar/add-on bar, or through Addons Manager)

Go to Advanced tab. In that page, go to ABE tab. Under Rulesets, click on USER. Here is an example ruleset, put it in the textbox on the right:

# User-defined rules. Feel free to experiment here.

I'm not sure how URL matching works, whether it uses regexp or not. Some examples on the FAQ does show regexp usage, but my example above seems to also match ads.js?foobarbaz.

share|improve this answer

If you are using Firefox, you can also use AdBlock Plus to block all functions in a specific file. (Instructions below are for Windows.)

  • In the toolbar, click the AdBlock Plus icon, and select Open blockable items from the menu.
  • A window will appear, listing everything that ABP can block. You can scroll through the list to find the particular script file or you can type in the Search box to narrow the list down. Once you've found the file to block, right-click the file and select Block this item ....
  • ABP will create a new filter based on that file and will list several options for you:
    1. The complete path to the file (
    2. Any file in that subdomain (
    3. Any file in that domain (
    4. A custom rule that you can define; by default, this starts off the same as 1.
  • Click the radio button next to the first option and click Add filter. This will close the window and add that JavaScript file to the list of blocked items.

You may need to refresh the page to ensure that file is blocked.

share|improve this answer

If you're using Firefox, the NoScript plugin will allow you to do this.

share|improve this answer
+1 - NoScript is exactly what you seek. As far as I know you'll need the Firefox browser to use it. Great extension. – boehj May 4 '11 at 6:41

You may use uBlock Origin in Chrome and Firefox:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .