google-chrome-extension

How do I send a message from the background to a popup in a Chrome extension everytime a page gets loaded?

南笙酒味 提交于 2021-02-08 11:29:19
问题 I can send a message from a popup to a background via: background.js chrome.runtime.onMessage.addListener( function(request) { alert(request.data.subject); } ); popup.js chrome.runtime.sendMessage({ msg: "something_completed", data: { subject: "Loading...", content: "Just completed!" } }); The alert loads fine BUT I need to do the opposite. I would like the background to send an api call when a page is loaded and send the results of that api call to the popup.js so that it can make changes to

How to use onUpdated and onActivated simultanously?

允我心安 提交于 2021-02-08 10:45:02
问题 In my extension i have in background.js an onUpdated listener, which pulls some data with XHR and XPath into badgeText . But, if i activated an old tab without to do anything in it, just click on its tab in the tab bar, onUpdated isn't fired and i have in the badge data from the previously opened tab. The similar happens with old tabs, which were discarded . If i click on their tabs in the tab bar (again, without to do anything) onUpdated isn't fired. It seems to be, that onUpdated doesn't

How to use onUpdated and onActivated simultanously?

守給你的承諾、 提交于 2021-02-08 10:44:29
问题 In my extension i have in background.js an onUpdated listener, which pulls some data with XHR and XPath into badgeText . But, if i activated an old tab without to do anything in it, just click on its tab in the tab bar, onUpdated isn't fired and i have in the badge data from the previously opened tab. The similar happens with old tabs, which were discarded . If i click on their tabs in the tab bar (again, without to do anything) onUpdated isn't fired. It seems to be, that onUpdated doesn't

How to use onUpdated and onActivated simultanously?

£可爱£侵袭症+ 提交于 2021-02-08 10:43:12
问题 In my extension i have in background.js an onUpdated listener, which pulls some data with XHR and XPath into badgeText . But, if i activated an old tab without to do anything in it, just click on its tab in the tab bar, onUpdated isn't fired and i have in the badge data from the previously opened tab. The similar happens with old tabs, which were discarded . If i click on their tabs in the tab bar (again, without to do anything) onUpdated isn't fired. It seems to be, that onUpdated doesn't

Execute my Autofill Javascript on Chrome extension click

一世执手 提交于 2021-02-08 09:56:50
问题 I have a working Javascript which prompts the user for his email and password for first time; and afterwards, it autofills the username and password whenever the user revisits that webpage. In my html code, I just have to call my checkCookie() function to perform this on JSFiddle.net. Now I want to create a Chrome extension which on click runs the autofill JS. I have these codes but on extension click, I get no output. Can anybody suggest me what am I doing wrong. // manifest.json { "manifest

Chrome extension: Can't make chrome.desktopCapture.chooseDesktopMedia capture window audio

此生再无相见时 提交于 2021-02-08 05:48:23
问题 I'm trying to use the chrome.desktopCapture.chooseDesktopMedia API in order to capture audio from the extension window. I'm sending the capture request from the popup.js page. Manifest: { "background": { "scripts": [ "background.js" ] }, "browser_action": { "default_icon": "style/icons/icon16.png", "default_title": "__MSG_name__" }, "default_locale": "en", "description": "__MSG_description__", "icons": { "128": "style/icons/icon128.png" }, "manifest_version": 2, "name": "__MSG_extName__",

How to communicate firebase webapp with chrome extension to avoid double login

爷,独闯天下 提交于 2021-02-07 19:49:26
问题 I have a problem with creating a communication between the external webpage and chrome extension. I suppose I need something like this. User tries to log in with login form on "example.com" using Firebase Auth (using google/Fb/email - password providers) If User logged in successfully, then the same credentials are sending to the chrome extension The extension calls signInWithCredential with taken credentials, and try to log in again If everything is ok, then User can work with firebase dB

How to communicate firebase webapp with chrome extension to avoid double login

南楼画角 提交于 2021-02-07 19:47:29
问题 I have a problem with creating a communication between the external webpage and chrome extension. I suppose I need something like this. User tries to log in with login form on "example.com" using Firebase Auth (using google/Fb/email - password providers) If User logged in successfully, then the same credentials are sending to the chrome extension The extension calls signInWithCredential with taken credentials, and try to log in again If everything is ok, then User can work with firebase dB

chrome native messaging: how to receive > 1MB

匆匆过客 提交于 2021-02-07 18:46:17
问题 What would be a good way to work with Chrome's incoming 1MB limit for native messaging extensions? The data that we would be sending to the extension is json-serialized gpx, if that matters. When the original message is >1MB, it seems like this question really has two parts: how to partition the data on the sending end (i.e. the client) this part should be pretty trivial. Even if we need to split into separate self-contained complete gpx strings, that is pretty straightforward. how to join

Chrome extension popup page link doesn't work

☆樱花仙子☆ 提交于 2021-02-07 18:37:45
问题 I was creating a Chrome extension for fun, but i got a problem with my popup page. I used jQuery load() function to load a part of existed page, let's say: http://aaa.com: <div id="aaa-news"> $(document).ready(function(){ $("#ox-news").load("http://aaa/News/ .news_list"); }); </div> Since the part of page i tried to load into popup.html contains some links, but seems href attributes of these links have been modified by Chrome whenever they are loaded in popup.html.So even if i used chrome