google-chrome-extension

Google Chrome extension - Webdb or IndexDB

橙三吉。 提交于 2019-12-23 03:12:36
问题 we are in process of developing google chrome extension, in which we need to store all the video information from a particular website. so we are considering the option of webdb. and now we are getting confused between to use webdb or indexdb.. As of now i think that, indexdb is still experimental, is that correct? and, if we use indexdb, the db even will not show up in dev. tools db section, where as webdb will show up, so that we can do query stuff in there.. please shed some light and put

How do I use Promise.all() with chrome.storage()?

走远了吗. 提交于 2019-12-23 02:38:37
问题 I have several async functions running. I want to wait for them all to finish before taking the next steps. Here's my code that I'm using to get all of the key/values from chrome.storage and the Promise.all() implementation. var promise1 = Promise.resolve(3); var promise2 = 42; var promise3 = new Promise(function(resolve, reject) { setTimeout(resolve, 100, 'foo'); }); var getAll = chrome.storage.sync.get(function(result) { console.log(result) }); Promise.all([promise1, promise2, promise3,

Browser - file writer extension?

故事扮演 提交于 2019-12-23 02:17:37
问题 Is there any chrome or firefox extension that allows javascript to create write files in client's PC? 回答1: What do you want to do? HTML5 has a File API. This is the best solution because it allows selection of the file to be wholly under user control. If you must, you can make your own NPAPI plugin which exposes itself to scripting (aka NPRuntime) and performs native local file operations on behalf of Javascript in the page. Or, in IE, new ActiveXObject("Scripting.FileSystemObject") may yield

Is it possible to fully mimic clipboard functionality using the chrome extension APIs?

蹲街弑〆低调 提交于 2019-12-23 02:17:17
问题 Subject: I'm in the process of creating a chrome extension and, for certain features, I would like to copy some text to the clipboard and automatically paste it into whatever element has the focus for the user. Getting my text into the clipboard is no problem. I can simply create a textarea in my background page, set its value accordingly and then select it's contents. Then, I can use document.execCommand("copy"); Problem: The problem comes when I try to use document.execCommand('paste') in

Sending messages from file system html page to a chrome extension

依然范特西╮ 提交于 2019-12-23 01:13:01
问题 I'm new to creating chrome extensions. I want to test sending messages from a web page to an extension as described here: https://developer.chrome.com/extensions/messaging#external-webpage. I'd like to just use an html file in my file system, like "file:///C:/Users/johng/Documents/TestExtensionCall.html", to do the initial testing but the developer documentation indicates that you need to include "externally_connectable" in your extension manifest to expose the messaging api and the url

Sending messages from file system html page to a chrome extension

帅比萌擦擦* 提交于 2019-12-23 01:12:38
问题 I'm new to creating chrome extensions. I want to test sending messages from a web page to an extension as described here: https://developer.chrome.com/extensions/messaging#external-webpage. I'd like to just use an html file in my file system, like "file:///C:/Users/johng/Documents/TestExtensionCall.html", to do the initial testing but the developer documentation indicates that you need to include "externally_connectable" in your extension manifest to expose the messaging api and the url

Can I use an external array to match URLs for content script injection?

烂漫一生 提交于 2019-12-23 00:44:11
问题 I'm working on a chrome extension where I'd like to inject a content script into a list of urls. Usually I'd use the regular syntax: { "name": "My extension", ... "content_scripts": [ { "matches": ["http://www.google.com/*"], "css": ["mystyles.css"], "js": ["jquery.js", "myscript.js"] } ], ... } But for the match patterns I'd like to pull the array from a server. Is there a way to programmatically set the "matches" array (from the background.js file for example)? 回答1: As far as I know, you

Can I use an external array to match URLs for content script injection?

感情迁移 提交于 2019-12-23 00:44:09
问题 I'm working on a chrome extension where I'd like to inject a content script into a list of urls. Usually I'd use the regular syntax: { "name": "My extension", ... "content_scripts": [ { "matches": ["http://www.google.com/*"], "css": ["mystyles.css"], "js": ["jquery.js", "myscript.js"] } ], ... } But for the match patterns I'd like to pull the array from a server. Is there a way to programmatically set the "matches" array (from the background.js file for example)? 回答1: As far as I know, you

how to customize rightclick on chrome devtools elements panel

杀马特。学长 韩版系。学妹 提交于 2019-12-22 18:56:08
问题 devtools elements panel right click look at the image above. right clicking on any node displays menu of options like 'add attribute' and 'edit attribute' etc... I want to be able to extend the right click menu to add my custom events. for example, I need to get the xpath of the node. I know I can extend the right click on actual page instead of extending right click on the source of the page. https://developer.chrome.com/extensions/devtools_panels#type-ElementsPanel API's only supports

Get gmail message body of an open mail with a chrome extension

喜你入骨 提交于 2019-12-22 18:56:07
问题 For a project I need to get the body of the currently open message and pass that message to a webservice for processing and storing some data of it. I thaught the best way to do it is to use an extension to grab the message body (and some additional information) and then send that as a webrequest to a service for insertion into the database. But I have no idea how I should handle this. I followed some tutorials to get me started on chrome plugins but I can't find how to get the body of the