google-chrome-extension

How to set variable key and value in Google Chrome local storage sync? [duplicate]

三世轮回 提交于 2020-04-30 06:24:40
问题 This question already has answers here : How to use a variable for a key in a JavaScript object literal? (15 answers) Closed 3 years ago . I'm using Chrome's version of localStorage (chrome.storage.sync) and I want to use a variable key and value when setting what data to store with it. I'd like to be able to do something like this: chrome.storage.sync.set({ user: id }, callback); where the user and id are dynamically generated. This: var user = "Bob"; var id = "81256309"; chrome.storage.sync

How to set variable key and value in Google Chrome local storage sync? [duplicate]

两盒软妹~` 提交于 2020-04-30 06:23:47
问题 This question already has answers here : How to use a variable for a key in a JavaScript object literal? (15 answers) Closed 3 years ago . I'm using Chrome's version of localStorage (chrome.storage.sync) and I want to use a variable key and value when setting what data to store with it. I'd like to be able to do something like this: chrome.storage.sync.set({ user: id }, callback); where the user and id are dynamically generated. This: var user = "Bob"; var id = "81256309"; chrome.storage.sync

Is pendingURL always defined for tabs.onCreated(function(tab){})?

限于喜欢 提交于 2020-04-18 02:38:54
问题 Will the pendingURL property always be defined for tab argument of a tabs.onCreated callback function? I'm trying to decide whether or not I also need to check tab.url, as in this chrome.tabs.onCreated.addListener(function (newTab) { if(newTab.pendingUrl === extensionURL || newTab.url === extensionURL) { //... } } Thanks for any insight you can give. This is my first question here so any feedback on how to better post questions is welcome. 回答1: It's defined only when there's a pending

React Chrome Extension not rendering

最后都变了- 提交于 2020-04-16 04:15:28
问题 I am beginning to build a Chrome Extension using React. My first goal is just to get the React logo to open in the browser extension just like any React project would after its initial build. I followed a few tutorials and set up my manifest file: { "short_name": "React App", "name": "React Extension", "manifest_version": 2, "browser_action": { "default_popup": "public/index.html", "default_title": "React Ext" }, "version": "1.0" } I haven't edited any other files so the index.html looks like

Chrome Extension upload error - default_locale missing

[亡魂溺海] 提交于 2020-04-13 04:29:28
问题 Whenever I try to upload my updated extension to the Chrome Web Store I get a "default_locale field is missing in manifest." error, yet it is clearly located in my manifest (pasted below). Any pointers for how I can resolve this? { "manifest_version": 2, "name": "####", "version": "1.1.0", "default_locale": "en-US", "description": "####", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "64": "icons/icon64.png", "128": "icons/icon128.png" }, "homepage_url": "http://####.com",

Extension icons are missing once it is being uploaded to Chrome Web Store

无人久伴 提交于 2020-04-12 20:39:45
问题 I'm trying to upload my first Google Chrome extension, but I have a strange issue. My manifest file is as follows: { "manifest_version": 2, "name": "Chat About", "description": "Chat about the content of the web page you're currently visiting with other visitors.", "version": "0.0.1.1", "icons": { "16": "icon16.png", "32": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "activeTab" ] }

Extension icons are missing once it is being uploaded to Chrome Web Store

两盒软妹~` 提交于 2020-04-12 20:39:32
问题 I'm trying to upload my first Google Chrome extension, but I have a strange issue. My manifest file is as follows: { "manifest_version": 2, "name": "Chat About", "description": "Chat about the content of the web page you're currently visiting with other visitors.", "version": "0.0.1.1", "icons": { "16": "icon16.png", "32": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "activeTab" ] }

Extension icons are missing once it is being uploaded to Chrome Web Store

若如初见. 提交于 2020-04-12 20:38:49
问题 I'm trying to upload my first Google Chrome extension, but I have a strange issue. My manifest file is as follows: { "manifest_version": 2, "name": "Chat About", "description": "Chat about the content of the web page you're currently visiting with other visitors.", "version": "0.0.1.1", "icons": { "16": "icon16.png", "32": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "activeTab" ] }

Extension icons are missing once it is being uploaded to Chrome Web Store

别来无恙 提交于 2020-04-12 20:38:06
问题 I'm trying to upload my first Google Chrome extension, but I have a strange issue. My manifest file is as follows: { "manifest_version": 2, "name": "Chat About", "description": "Chat about the content of the web page you're currently visiting with other visitors.", "version": "0.0.1.1", "icons": { "16": "icon16.png", "32": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "activeTab" ] }

Alternatives to Bootstrap JS does not work inside shadow dom

二次信任 提交于 2020-04-10 21:07:45
问题 I tried to create a shadow DOM for encapsulating the content Script elements and then apply Bootstrap styles and also make Bootstrap Modal work inside a shadow Dom so it can encapsulate itself from the Webpage styles and Scripts. It is successful in displaying the content but Bootstrap js scripts don't work. I tried injecting all the Styles and Script files inside the Shadow DOM. Bootstrap Styles work, Bootstrap Scripts don't work $(#id) //the usual way to access a id using jQuery