firefox-addon

Download and save file inside my extension folder in Firefox?

不羁的心 提交于 2021-01-28 04:48:00
问题 I would like to do the following from my firefox addon: a). Determine my addons folder location. b). Prompt the user to initiate a download. c). Download and save the download All the code examples available are for older API's and I have no clue on how to get them working for recent E10 (multi-process) code changes. 回答1: A - Get addons folder location var OSPath_addons = Services.dirsvc.get('XREUSysExt', Ci.nsIFile).path B - Trigger download with path with no user notification How to

Event Fired by YouTube When Video Page is Loaded

爱⌒轻易说出口 提交于 2021-01-28 00:08:56
问题 I am building a Firefox add-on that parses the URL when YouTube loads a video page (e.g. https://www.youtube.com/watch?v=6tOQsswD4Tc). Using Firefox's Add-on api for Tabs, I can't catch the event when the video page is finished loading. This might be due to YT's new asynchronous loading. Because if I hit F5, I can capture the event. I am using this code: tabs.on("ready", function(tab) { if(tab.url.search(/youtube\.com\/watch\?v=/)!=-1){ // do stuff } }); I tried changing it to 'ready', 'load'

DOM Changed Event Firefox Extension

◇◆丶佛笑我妖孽 提交于 2021-01-27 17:29:43
问题 So I have created a Firefox extension and it works great, however when I submitted it (although it was accepted) it came up with one security warning. It said setTimeout() was removed in an else clause. So, is there a way to listen for any DOM change? (or even a specific element changing, I have an ID for both). However, divs do not have an onChange event so any ideas? I don't mind if it's ANY change, doesn't have to be div-specific. 回答1: DOMSubtreeModified event sound like something you want

Firefox addon development, how to change about:config setting

孤人 提交于 2021-01-27 10:34:01
问题 Hi I'm trying to develop a simple addon which opens a web page different from firefox default page in new tab. I want to change two of the default settings values in about:config, but it seems I cannot achieve this through my current configuration. I'm using the Add-On SDK recommended by firefox to develop the add-on.(creating a simple add-on using the SDK By looking into the about:config setting, I found that if I set "browser.newtab.url" to the web page url, and "moa.ntab.openInNewTab" from

how to create .txt in local file system using Firefox extension

寵の児 提交于 2021-01-27 04:54:17
问题 I am currently working on ffsniff extension code. In that I have to save data containing password information into a file in my local system. I have written my code but it is not even creating the file in my local system. (working in mozilla firefox) Here is my code please help me out. //// here data variable contains all the information var fso = new ActiveXObject("Scripting.FileSystemObject"); varFileObject = fso.OpenTextFile("C:\\logs.txt", 2, true,0); varFileObject.write(data);

How do I use Wasm in the content script of a Firefox web extension?

北慕城南 提交于 2021-01-21 04:41:26
问题 I am building a Firefox addon using Rust. I am trying to insert HTML and do stuff on specific pages. Apparently, a content script is the thing I want to use. My content script is: import("../crate/pkg").then(({ Addon }) => { const addon = Addon.new(); console.log(addon.where_am_i()); }).catch(e => console.error("Error importing:", e)); The error I am getting is: TypeError: "0125c9960050e7483877.module.wasm is not a valid URL." I tried to add to manifest.json : "web_accessible_resources": [

How to install my .xpi on firefox android

青春壹個敷衍的年華 提交于 2021-01-21 03:59:44
问题 I work on a firefox addon using JPM. I want to install it on my android phone, i've run "jpm xpi" and copy xpi on my sdcard. When i browse to file://path/to/my/xpi in android firefox nothing happen. Same issue if i upload xpi on my server and browse to url. i've tested with google play firefox up to date version and nighty. where is my mistake? 回答1: Neither ES File Explorer nor X-plore worked for me (as per Trasd's comment). I saw the three Firefox's, but none of them triggered to install the

How to edit or remove cookies in Firefox DevTools?

丶灬走出姿态 提交于 2020-12-01 08:32:50
问题 In Firebug I am able to remove and edit any cookies using the Cookies panel. But in the Firefox DevTools I can't find any way to remove or edit cookies. Where can I do that? 回答1: To edit cookies in the Firefox DevTools you have to ensure the Storage Inspector is enabled via the settings. Within the Storage Inspector you'll then be able to edit existing cookies by double-clicking the values within the list: You can also remove cookies by right-clicking them and choosing one of the options from

How to edit or remove cookies in Firefox DevTools?

此生再无相见时 提交于 2020-12-01 08:28:20
问题 In Firebug I am able to remove and edit any cookies using the Cookies panel. But in the Firefox DevTools I can't find any way to remove or edit cookies. Where can I do that? 回答1: To edit cookies in the Firefox DevTools you have to ensure the Storage Inspector is enabled via the settings. Within the Storage Inspector you'll then be able to edit existing cookies by double-clicking the values within the list: You can also remove cookies by right-clicking them and choosing one of the options from

How to edit or remove cookies in Firefox DevTools?

ε祈祈猫儿з 提交于 2020-12-01 08:28:10
问题 In Firebug I am able to remove and edit any cookies using the Cookies panel. But in the Firefox DevTools I can't find any way to remove or edit cookies. Where can I do that? 回答1: To edit cookies in the Firefox DevTools you have to ensure the Storage Inspector is enabled via the settings. Within the Storage Inspector you'll then be able to edit existing cookies by double-clicking the values within the list: You can also remove cookies by right-clicking them and choosing one of the options from