How to make a redirect in Firefox page-mod?
问题 I'm trying to port my Google Chrome extension to Firefox Add-On SDK and I need the extension to filter pages from my website and make redirects. For example, if the user opens " http://example.com/special " I need to send him to " http://example.com/redirect " in the same browser tab. This is how I tried to do this: var pageMod = require("page-mod").PageMod({ include: "*", contentScriptWhen: "start", contentScript: "", onAttach: function(worker) { if (worker.tab.url == worker.url && worker