google-chrome-extension

Chrome extension: How to remove orphaned script after chrom extension update

不羁的心 提交于 2020-12-15 05:20:08
问题 I have a chrome extension with a popup page which passes a boolean variable to my content page via simple one-time requests. The content page would then do some action based on the status of the boolean variable passed from the popup page. This was working perfectly until I accidentally removed the extension (still in developer mode, the extension is unpacked) and had to re-load it. This caused an extension context invalidated error to appear in the popup inspection console and the webpage

Copy multiple network responses in chrome devtools network console

拟墨画扇 提交于 2020-12-13 04:02:50
问题 I want to copy all network responses from the filtered list of requests from the network tab under Chrome's devtools. I read about the solution of copy all requests' URLs at Multiple URLs copy in Sources/Network tab But I can't figure out how to access the decoded response body from requests. The solution at Chrome Devtools: Save specific requests in Network Tab works, but I want a solution that only extracts responses from the filtered request list under the network tab. 回答1: Inspecting the

How to revoke Google account access from within an extension

筅森魡賤 提交于 2020-12-09 18:43:49
问题 I have a Chrome browser extension that requests access using chrome.identity.getAuthToken, and is working as expected. In the extension you can logout using: var do_logout = function() { chrome.identity.getAuthToken({'interactive': false}, function(token) { chrome.identity.removeCachedAuthToken({token:token}, function(){ display_login(); }); }); }; Which again is working fine. The issue is when you log back in. Ideally I want the extension to ask for permission again - mainly for testing from

How to revoke Google account access from within an extension

瘦欲@ 提交于 2020-12-09 18:40:34
问题 I have a Chrome browser extension that requests access using chrome.identity.getAuthToken, and is working as expected. In the extension you can logout using: var do_logout = function() { chrome.identity.getAuthToken({'interactive': false}, function(token) { chrome.identity.removeCachedAuthToken({token:token}, function(){ display_login(); }); }); }; Which again is working fine. The issue is when you log back in. Ideally I want the extension to ask for permission again - mainly for testing from

How to revoke Google account access from within an extension

好久不见. 提交于 2020-12-09 18:39:35
问题 I have a Chrome browser extension that requests access using chrome.identity.getAuthToken, and is working as expected. In the extension you can logout using: var do_logout = function() { chrome.identity.getAuthToken({'interactive': false}, function(token) { chrome.identity.removeCachedAuthToken({token:token}, function(){ display_login(); }); }); }; Which again is working fine. The issue is when you log back in. Ideally I want the extension to ask for permission again - mainly for testing from

How to insert text into selected textbox in JavaScript without ID?

半世苍凉 提交于 2020-12-06 12:56:13
问题 Context: Writing a google chrome extension using JavaScript Using context menus library User should be able to right click into a textbox, select chrome extension, select "insert text", and then that text will get inserted into the selected text box. I am using pure javascript, please no jquery or AJAX. I am unable to edit the HTML page as it could be any generic web page with an HTML text box or editable field. Code I have so far: //the menu item var menuItem_insert = chrome.contextMenus

Cannot use chrome_settings_overrides for overriding Search Provider

二次信任 提交于 2020-12-06 06:58:47
问题 I have the following declaration in my manifest.json , following Google's instructions: { ... "chrome_settings_overrides": { "search_provider": { "name": "My Name", "keyword": "My Keyword", "favicon_url": "icon32.png", "search_url": "http://example.com/Home/Search?keyword={searchTerms}", "encoding": "UTF-8", "is_default": true } }, ... } However, I cannot load the manifest with that part at all (removing it will make it work). The message is receive is: Failed to load extension from: D:

How to prevent chrome extension content script pausing when switching tab

自作多情 提交于 2020-12-06 06:32:45
问题 I develop chrome extension. As usual I have extension button in the tool bar. On the popup I have start button. When click start then message with 'start' is sending and some process in the content script is starting. The problem is that when I switch tab or roll up (hide) the chrome - the process is paused. When I switch to tab where extension is - the process continue executing. For testing I have made simple test, the result is the same - script is paused: var TTT = 0; function TEST() {

Chrome Extension: Extension context invalidated when getting URL

本小妞迷上赌 提交于 2020-12-05 11:35:11
问题 I'm retrieving some images from one of my chrome extension folders to the website DOM and everytime I reload the extension I'm getting a 'Extension Context Invalidated' error. Same thing happens when I do a 'chrome.storage.local.set'. Doing some research I have realized that this error has to do with the facts well explained on this answer but since I'm not messaging between my content script and the background.js I wonder why this happens. This is the part of my script (injected via chrome

Chrome Extension Socket io node js

两盒软妹~` 提交于 2020-11-30 06:13:45
问题 I need to create a chrome extension which shows a notification when we get a message from socket io node js server. How to include socket io in chrome extension? I am not able to get this to working. Content.js:- Uncaught ReferenceError: io is not defined var socket = io.connect('http://localhost:1337'); socket.on("hello",function(data){ console.log(data.text); chrome.runtime.sendMessage({msg:"socket",text:data.text},function(response){}); }); Manifest:- This is not importing socket io Failed