google-chrome-extension

Cross-origin permissions from chrome-extension:// pages?

試著忘記壹切 提交于 2019-12-25 02:22:36
问题 I want to "proxy" web pages through a chrome-extension:// page (using an full-frame iframe), so that they show up as an extension page, instead of a webpage. I still want to apply content scripts to them, however, and have not had any success doing this. Is there a way to allow the chrome-extension page to access the contents of the iframe because it's "privileged" and should be allowed to get around XSS limitations? Whenever I try to executeScript( { code : blah , allFrames: true }) I get an

How to make speech webkit work in Chrome extension popup?

戏子无情 提交于 2019-12-25 02:16:55
问题 A simple code like this <html> <body> <input type="text" id="txtSearch" x-webkit-speech /> </body> </html> works correctly in an HTML page. I am trying to use the same code in the popup of my Google Chrome extension. But on clicking the mic icon, nothing happens in the popup. Are there some restrictions to use code like this for popups? Or am I missing something else? 回答1: It's being worked on, apparently, but I can't parse out from this any progress since Dec 15, 2011. http://code.google.com

How to extract the loaded javascript files from Dev Tools extension

人盡茶涼 提交于 2019-12-25 02:04:48
问题 I'm working on a chrome extension that wants to load javascript files from the current page, modify them (prettify), then update the Dev Tools Sources panel. As a fall-back option - I don't override the usual Sources panel - But rather put them in a custom panel. (With this option, all I'd need is a list of the network resources loaded -results in the Network panel) Ideally I'd like to override the source's pages though, in the hopes of using the debugging tools available to the dev tools.

Port error: Could not establish connection. Error in event handler for 'undefined'. (chrome extension)

此生再无相见时 提交于 2019-12-25 01:55:47
问题 I'm basically trying to execute the code found in Chrome's Extension documentation. And that's where I'm stuck. I'm trying to pass values from Content script >> background page (for XHR). And the error im getting in the console is : Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:236 Error in event handler for 'undefined': Cannot read property 'farewell' of undefined TypeError: Cannot read property 'farewell' of undefined at chrome-extension:/

Chrome: message content-script on runtime.onInstalled

假如想象 提交于 2019-12-25 01:53:28
问题 I'm the maker of an addon called BeautifyTumblr which changes the apperance of Tumblr. I wish for my Chrome extension to automatically detect when it has been updated and display changelog to the user. I use an event page with the chrome.runtime.onInstalled.addListener hook to detect when an update has occured, retrieve the changelog from a text file in the extension.. this all works fine, then when I want to forward it to my content script via chrome.tabs.sendmessage it just wont work,

How to really isolate stylesheets in the Google Chrome extension?

大城市里の小女人 提交于 2019-12-25 01:42:41
问题 I wrote a Google Chrome extension, which popups a dialog with an autocomplete field and it's own style, but there are some sites where my CSS gets totally broken, which doesn't look very nice. I know about isolating styles with iFrames, but in Google Chrome extension there is no way to isolate my HTML and CSS in this way. Another method is to wrap all my stuff into a separated div with it's own id and relative styles for that id, and I do so, but it seems that it doesn't work on some sites

inline javascript stacktrace: better origin than @<anonymous>

余生颓废 提交于 2019-12-25 01:38:27
问题 I'm working on a Chrome extension. I need to append Javsacript as inline-script for content security purposes. The issue now is that, because script is inlined, the stacktrace shows @ as source, instead of the file name: ReferenceError: asdf is not defined fetchContactByEmail@<anonymous>:5439:1 I need to distinguish between the source of the caller in the stack trace, to tell if it's from my script. Is there a way to tell the source of inline script? (P.S. the problem I'm trying to solve is:

How to prevent stack overflows when intercepting local storage in a Chrome Extension

拥有回忆 提交于 2019-12-25 01:10:32
问题 I'm trying to add a "tab namespace" to all local storage keys so that I can achieve a uniqueness of local storage for sites between multiple tabs. In a simple HTML5 page, let's say a web page has the following script: Storage.prototype._setItem = Storage.prototype.setItem; Storage.prototype.setItem = function(key, value) { console.log("intercepted set local storage " + key + " = " + value); this._setItem(key, value); } Storage.prototype._getItem = Storage.prototype.getItem; Storage.prototype

Using JQuery's post function in chrome extension

柔情痞子 提交于 2019-12-25 01:06:39
问题 I'm trying to post to localhost server from within a chrome extension and it doesn't seem to work. Here are my files: manifest: { "name": "Send to server", "version": "1.1", "background": { "page": "background.html"}, "permissions": ["experimental", "tabs", "<all_urls>"], "browser_action": {"name": "Send to server", "default_icon": "icon.png", "default_popup":"popup.html" }, "icons": { "16": "16.png" }, "manifest_version": 2 } The background.html is very brief, it just points to "http://ajax

Reading current settings of Chrome via Chrome Extension

被刻印的时光 ゝ 提交于 2019-12-25 00:45:23
问题 Is there an easy way to read the user's current settings? No modification needed, verily I simply only need harmless read access. For example I need to discover the setting for flag &Lt;New omnibox answers in suggest types&Gt; I need to know the current default search engine (per chrome://settings/searchEngines ) 来源: https://stackoverflow.com/questions/46712951/reading-current-settings-of-chrome-via-chrome-extension