google-chrome-extension

Light & Dark browserAction icons in Chrome 51

狂风中的少年 提交于 2020-01-22 18:45:12
问题 In Chrome 51, incognito windows now have a dark toolbar background, while previous versions used a light background. It's generally infeasible for a single 16x16 image to provide good contrast in both situations: When displaying information to the user through a browserAction icon, by what mechanism can an extension provide dark-themed and light-themed icons, and switch between them depending on the current toolbar color? Link to source code for the pictured extension 回答1: There is no such

How to clear `chrome.storage.local` cache when developing a Chrome Extension?

為{幸葍}努か 提交于 2020-01-22 13:12:28
问题 I've written a Chrome Extension for my library. It uses chrome.storage.local to cache things. Does anyone know how to drop the cache for testing purposes? I can't really test things anymore as all the data is now in cache. I'd like to drop it and make sure it gets repopulated correctly, etc. How do I do that? I tried "Refresh"-ing the extension but that did nothing. Removing and adding the extension doesn't appear to clean cache either. 回答1: Use chrome.storage.local.clear() To check the

How to clear `chrome.storage.local` cache when developing a Chrome Extension?

↘锁芯ラ 提交于 2020-01-22 13:12:05
问题 I've written a Chrome Extension for my library. It uses chrome.storage.local to cache things. Does anyone know how to drop the cache for testing purposes? I can't really test things anymore as all the data is now in cache. I'd like to drop it and make sure it gets repopulated correctly, etc. How do I do that? I tried "Refresh"-ing the extension but that did nothing. Removing and adding the extension doesn't appear to clean cache either. 回答1: Use chrome.storage.local.clear() To check the

What is Native Messaging between applications and how does it work?

时光总嘲笑我的痴心妄想 提交于 2020-01-22 12:29:25
问题 The Chrome developer docs refer to something called Native Messaging to communicate with other desktop applications directly from the Chrome extension or app. How can I tell when a desktop app has such native messaging available and what kind of communication it can accept? Is there a way to get the application to expose what it will communicate about? If I needed to talk to the original developers of that desktop app, is this even the most common terminology (native messaging) so they

Multiple JS files in Chrome Extension - how to load them?

人走茶凉 提交于 2020-01-22 05:40:17
问题 I've wrote a Chrome Extension. My background.js file is quite large, so I want to split it to smaller parts and load specified methods when required (some kind of lazy-loading). I've done this with Firefox: // ( call for load specified lib ) var libPath = redExt.basePath + 'content/redExt/lib/' + redExt.browser + '/' + libName + '.js'; var service = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); service.loadSubScript(

Programmatic method to let the user modify the manifest.json content of a Chrome extension

旧巷老猫 提交于 2020-01-22 02:34:16
问题 I am developing a Chrome extension for use with the Canvas LMS. A problem with this is that Canvas subscribers have different URLs which do not have a common top level domain. For instance, my University's Canvas site has the URL canvas.gu.se while another school might have canvas.myschool.edu . But I can't enter "matches":"https://canvas.*/*" in the manifest.json file, since top-level wildcards are not allowed (see this post for elaboration). Instead, I have to enter "matches":"https://*/*"

Can we retrieve our machine serial number in our chrome extension?

最后都变了- 提交于 2020-01-21 20:47:49
问题 Can we retrieve our machine serial number in our chrome extension? For example I can get the serial number in windows by executing following command in the shell wmic bios get serialnumber How can I fetch this serial number in my chrome extension? 回答1: No. Chrome extensions are designed to protect user privacy to the greatest practical extent, and one component of user privacy is controlling the ability of code to "fingerprint" the user. Read the EFF's discussion of fingerprinting for more. I

Can we retrieve our machine serial number in our chrome extension?

对着背影说爱祢 提交于 2020-01-21 20:43:48
问题 Can we retrieve our machine serial number in our chrome extension? For example I can get the serial number in windows by executing following command in the shell wmic bios get serialnumber How can I fetch this serial number in my chrome extension? 回答1: No. Chrome extensions are designed to protect user privacy to the greatest practical extent, and one component of user privacy is controlling the ability of code to "fingerprint" the user. Read the EFF's discussion of fingerprinting for more. I

Can we retrieve our machine serial number in our chrome extension?

喜欢而已 提交于 2020-01-21 20:43:40
问题 Can we retrieve our machine serial number in our chrome extension? For example I can get the serial number in windows by executing following command in the shell wmic bios get serialnumber How can I fetch this serial number in my chrome extension? 回答1: No. Chrome extensions are designed to protect user privacy to the greatest practical extent, and one component of user privacy is controlling the ability of code to "fingerprint" the user. Read the EFF's discussion of fingerprinting for more. I

Can we retrieve our machine serial number in our chrome extension?

ぐ巨炮叔叔 提交于 2020-01-21 20:43:10
问题 Can we retrieve our machine serial number in our chrome extension? For example I can get the serial number in windows by executing following command in the shell wmic bios get serialnumber How can I fetch this serial number in my chrome extension? 回答1: No. Chrome extensions are designed to protect user privacy to the greatest practical extent, and one component of user privacy is controlling the ability of code to "fingerprint" the user. Read the EFF's discussion of fingerprinting for more. I