I have created a simple Firefox add-on with an add-on SDK below, but it only works once . I'm using version 1.8 of Add-ons SDK.
$ mkdir test_ext $ cd test_ext $ cfx init $ cat & gt; Package. Jason {"name": "no2", "license": "ip": "iid", "description": "one original add-on": "MPL 2.0", "author": "", "version": "0.1", "full name": "test_ext", "id"} $ cat & gt; Lib / main.js & lt ;! - Language: lang-js - & gt; PageMode ("Page-Mod") is required. ({Includes: ["* .org"], Content Script: 'document.body.innerHTML =' + '" This page has been eaten & lt; / h1 & gt;"; '}); Run $ Cfx
Now if I go to w3.org in the browser, then it works. If I had to go again or go to a different .org domain like wwf.org nothing happens, how can I test this and apply any new pages?
The way I will write it is:
required ("Page-modern"). PageMod ({include: ["* .co.uk"], Content Script: 'document.body.innerHTML =' + '" This page has been eaten & lt; / h1 & gt;" ; '});
I think the problem with your code is the use of 'new' keywords?
Comments
Post a Comment