google-chrome-extension

Chrome Extension API: chrome.tabs.captureVisibleTab on Background Page to Content Script

丶灬走出姿态 提交于 2019-12-20 03:05:07
问题 My overall goal was to take a screenshot via the background page using: http://developer.chrome.com/extensions/tabs.html#method-captureVisibleTab and pass it to the content script so I can use the page's HTML DOM to analyze the screenshot and cut it up the way I would like. However, I can't seem to pass the dataUrl back to the content script with Message Passing: http://developer.chrome.com/extensions/messaging.html I tried JSON.stringify() but to no avail. This works perfectly fine:

How do I manually clear cache for webview in Chrome app?

左心房为你撑大大i 提交于 2019-12-20 02:58:06
问题 I am developing a Chrome app that shows some web content in a webview tag. The content is being cached. When I edit the content files, clearing Chrome browsers' cache does not seem to actually clear the webview cache. One of the posts recommends to assign a unique partition ID every time Chrome app starts. Changing partition ID on the webview does help to clear (or re allocate) the cache, but I still would like to take advantage of caching 3MB of web content and clear it manually only if it

Chrome Extensions - Saving Settings

♀尐吖头ヾ 提交于 2019-12-20 02:56:34
问题 I'm building my first Chrome extension. It's a very simple thing I'm trying to do at this point so I can try and gain an understanding of how it works and build off of that. Anyway what I am trying to do right now is I have a extension button that opens up a page with a TEXTAREA. I want the user to be able to enter text into this textarea box and save this to be called later (this setting also needs to be available to be called again the next time Chrome is opened, whatever they enter into

chrome extension - ip domain permissions

ぃ、小莉子 提交于 2019-12-20 02:49:16
问题 My chrome extension needs to send requests to a server on my home LAN, where I don't have DNS setup, so I'm using raw IP's with everything. I'm sending these requests via my background page, so with proper permissions in the manifest file it should let me do it. This is what I have in the manifest: "permissions": [ "http://10.0.0.4:3000/*","http://*/*" ] However with the http sniffer I see that no requests are sent out to that destination. via logging I see that the jQuery $.ajax() call is

Background script messaging with javascript

我的未来我决定 提交于 2019-12-20 02:46:28
问题 I was messing around with communicating inside a Google Chrome extension and was using the following guide: https://developer.chrome.com/extensions/messaging It used to work but I have encountered an error : Error in response to tabs.query: TypeError: Cannot read property 'id' of undefined I compared my code and the Google Chrome code and I can't seem to find why my code produces that error: chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[1

Polymer in Chrome Extension content script

孤人 提交于 2019-12-20 02:44:08
问题 I'm trying to use Polymer in a chrome extension. The overall goal is to leverage styling encapsulation so my content scripts run isolated from the CSS of the page being visited. Beginning with a custom element in my-element.html I'm using Vulcanize like so: vulcanize -o build.html my-element.html If I try something like this in my content script: // content_script.js $.get(chrome.extension.getURL('build.html'), function(data) { var html = document.createElement('div'); html.innerHTML = data;

My Chrome Extension Keeps Saying Its Corrupted

こ雲淡風輕ζ 提交于 2019-12-20 02:39:07
问题 I recently got a Chrome Developer account, i paid the 5 bucks and stuff. I published my extension after extensive testing and it works perfectly, but after i uploaded the app and then downloaded it to test it, whenever i try to open it, it disappears from my chrome bar and then when i check my extensions it says it may be corrupted, i tested this without it on the chrome store and it works fine, iv tried re-uploading it and everything, nothings working. I paid 5 dollars to be able to do this

how not to lose data when closing and opening chrome extension popup

大憨熊 提交于 2019-12-20 02:36:17
问题 I'm new to chrome extension. I need to have data created when working with the popup, available after closing and re-opening it. Here're some more details about my specific problem: whenever my chrome extension popup is opened a script runs. in the popup there's an option to click a button which will add an item to an array, which is used in order to display this list of items in another tab in this popup. However, since every time the popup is opened the code runs all over again, the array

onMouseMove doesn't fire over <option> element in Chrome

不羁的心 提交于 2019-12-20 02:34:42
问题 Say I have an onMouseMove listener which just logs the x and y position of the mouse. If I expand a select element and move my mouse over the exposed <option> elements, the onMouseMove event never fires. I think it might have something to do with this: http://www.terminally-incoherent.com/blog/2009/01/12/ie-jquery-hovering-and-option-elements/ Does anybody know how to get around this? Specifically, I would like to get an instance of the <option> element I'm moving over at any given time. I

chrome.downloads.download ignores saveAs option and opens the dialog regardless

扶醉桌前 提交于 2019-12-20 02:32:34
问题 I'm trying to create an extension which downloads multiple files at once. In order to accomplish that, I'm using chrome downloads api, here is the code (with AngularJS): var fileDownloadProperties = function(raw) { return { url: "https:" + raw.url, filename: sharedDir + "/" + raw.name + "pdf", saveAs: false } }; $scope.status = ""; filesToDownload.forEach(function (raw) { chrome.downloads.download(fileDownloadProperties(raw)); }); The problem is that when the script runs it ignores the saveAs