google-chrome-extension

Porting Chrome extension to Firefox : equivalent to chrome.storage

被刻印的时光 ゝ 提交于 2021-02-19 01:25:47
问题 I'm trying to port Chrome extension to Firefox and I would like to know what's the equivalent to chrome.storage.local.set and chrome.storage.local.get in Firefox add on sdk. I think, it's simple-storage . Here is my code : chrome.storage.local.set({'tokenFU': token}); [...] chrome.storage.local.get('tokenFU',function(result){ token=result.tokenFU; if(token && token != 'undefined'){ hideLog(); } else showLog(); }); Thanks in advance ! 回答1: Yes exactly, it is simple-storage. You can use it like

Chrome Extension: On browser action, create a pop up and execute a script

☆樱花仙子☆ 提交于 2021-02-19 00:52:21
问题 I'm building a Chrome extension and would like to show a pop up and run a script when the user clicks on a browser action icon in Chrome. I can get the popup to occur by putting '"default_popup": "popup.html"' in manifest.json. However, when I do, background.js doesn't seem to run. When I remove '"default_popup": "popup.html"', background.js seems to run. How can I get both the popup to appear and the script to run? manifest.json { "manifest_version": 2, "name": "Typo Blaster", "description":

Chrome Extension: On browser action, create a pop up and execute a script

只愿长相守 提交于 2021-02-19 00:46:18
问题 I'm building a Chrome extension and would like to show a pop up and run a script when the user clicks on a browser action icon in Chrome. I can get the popup to occur by putting '"default_popup": "popup.html"' in manifest.json. However, when I do, background.js doesn't seem to run. When I remove '"default_popup": "popup.html"', background.js seems to run. How can I get both the popup to appear and the script to run? manifest.json { "manifest_version": 2, "name": "Typo Blaster", "description":

chrome:// Invalid Scheme

做~自己de王妃 提交于 2021-02-18 19:41:37
问题 I've enabled "chrome://flags/#extensions-on-chrome-urls" which should allow me to create extensions that can run on chrome:// sites. When I try to unpack my extension, however, it fails with the error message: "Invalid value for 'content_scripts[0].matches[0]': Invalid scheme." I don't believe my script.js is a problem since the unpacking doesn't fail when I replace the "chrome://extensions" part with an http or https sites. Any help would be greatly appreciated, does anyone know a fix?

Import autofill data from a file into Chrome

五迷三道 提交于 2021-02-18 19:10:39
问题 I have a CSV file of users (with email and name). Google Chrome stores its autofill data and you can add them manually here: chrome://settings/addresses Is it possible to import the data automatically from the file? 回答1: The settings UI uses an internal API chrome.autofillPrivate.saveAddress (source). go to chrome://settings/addresses open devtools console paste and run the code below that adds an input button in the top right corner where you can select your CSV file: for (const el of

Import autofill data from a file into Chrome

两盒软妹~` 提交于 2021-02-18 19:09:53
问题 I have a CSV file of users (with email and name). Google Chrome stores its autofill data and you can add them manually here: chrome://settings/addresses Is it possible to import the data automatically from the file? 回答1: The settings UI uses an internal API chrome.autofillPrivate.saveAddress (source). go to chrome://settings/addresses open devtools console paste and run the code below that adds an input button in the top right corner where you can select your CSV file: for (const el of

Import autofill data from a file into Chrome

放肆的年华 提交于 2021-02-18 19:09:46
问题 I have a CSV file of users (with email and name). Google Chrome stores its autofill data and you can add them manually here: chrome://settings/addresses Is it possible to import the data automatically from the file? 回答1: The settings UI uses an internal API chrome.autofillPrivate.saveAddress (source). go to chrome://settings/addresses open devtools console paste and run the code below that adds an input button in the top right corner where you can select your CSV file: for (const el of

Chrome extension to open up a specific URL in a different browser [closed]

落花浮王杯 提交于 2021-02-18 12:55:09
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Improve this question Thank you for any help in advance! I was wondering if there was a Chrome extension out there that would allow me to have a specific URL (when it was accessed) open up in a different browser all together (Firefox for example). The issue I have is that I need the

Sending message from content script to background script breaks chrome extension

ε祈祈猫儿з 提交于 2021-02-18 03:50:04
问题 I am trying to send a message from a content script to the background script in a chrome extension that triggers a rich notification to open. I can already achieve this but it breaks the rest of my extension. In my content script I have a call to chrome.extension.sendMessage inside of which I load my extension code. This was all working fine until I added my notification code, I decided to use chrome Rich Notifications API as I would like to have buttons in my notification eventually, and I

Override Chrome Storage API

风流意气都作罢 提交于 2021-02-17 05:44:07
问题 I would like to override chrome.storage.local.set in order to log the value of a storage key when the Chrome Storage API is called: var storage_local_set = chrome.storage.local.set; chrome.storage.local.set = function(key, value) { console.log(key); storage_local_set(key); } But I get Illegal invocation: Function must be called on an object of type StorageArea when storage_local_set(key) gets called. How can I store the data after logging the key? For chrome.storage.sync.set this is what I