A Firefox WebExtension for blocking <noscript> tags.
Note: This extension is built using the WebExtensions API for cross-browser compatibility. However, it uses the webRequest.filterResponseData() function, which is currently only supported by Firefox.
- Clone this repository
git clone https://github.com/ggabarrin/noscript-tag-blocker.git
- Install dependencies
yarn install --dev
- Build!
This command will create the zip file you need to install in the browser
yarn build
- A zip file should have been created in the
noscript-tag-blocker/dist
directory
In order to permanently install in Firefox, please follow these steps:
- Open Firefox
- Go to
about:config
and set thexpinstall.signatures.required
key tofalse
(this will allow you to install unsigned extensions) - Go to
about:addons
, click on the ⚙️ icon, and click onInstall Add-on From File...
option - In case you are building the plugin yourself, select the built zip file, which is located by default in the
noscript-tag-blocker/dist
directory. If not, you may download an already built zip file from the Releases page. - You should see the extension's icon in your browser's toolbar
The following command allows you to install temporarily the browser plugin on Firefox for testing.
yarn test
This extension uses the webRequest.filterResponseData() function, which allows to modify the HTTP responses before they are rendered by the browser.
Specifically, it replaces the tags with hidden <textarea> tags, avoiding the alternate content to be displayed.
<noscript>
<p>This is a test</p>
</noscript>
<textarea style="display: none !important;" noscript-tag-blocker="">
<p>This is a test</p>
</textarea>
This project is based on Mozilla Developer Network's http-response WebExtensions example.