google-chrome-extension

Can a Chrome extension's event page detect when the browser has finished starting up?

蹲街弑〆低调 提交于 2021-02-16 09:37:07
问题 I have a Chrome extension that tracks the order in which tabs are accessed by listening for tab-related events like tabs.onActivated , onRemoved , etc. It uses an event page instead of a persistent background page to add the event listeners. The tab access order is stored in chrome.storage.local . The extension works fine while in the normal course of using the browser. But when Chrome is first launched and restores the previous session, it reopens the windows in the order they were

Can a Chrome extension's event page detect when the browser has finished starting up?

怎甘沉沦 提交于 2021-02-16 09:34:20
问题 I have a Chrome extension that tracks the order in which tabs are accessed by listening for tab-related events like tabs.onActivated , onRemoved , etc. It uses an event page instead of a persistent background page to add the event listeners. The tab access order is stored in chrome.storage.local . The extension works fine while in the normal course of using the browser. But when Chrome is first launched and restores the previous session, it reopens the windows in the order they were

Using Google Fonts with Shadow DOM [duplicate]

拟墨画扇 提交于 2021-02-11 18:19:58
问题 This question already has answers here : Google Fonts Font Doesn't load (6 answers) Closed 1 year ago . I'm trying to use a google font with my extension on the content script side - the Noto font I have downloaded and loading from the extension directory works (it is also declared in web_accessible_resources) and works fine in the ShadowDOM but the google font doesn't I'm injecting this style text into the head: var styleNode = document.createElement("style"); styleNode.type = "text/css";

Using Google Fonts with Shadow DOM [duplicate]

混江龙づ霸主 提交于 2021-02-11 18:19:26
问题 This question already has answers here : Google Fonts Font Doesn't load (6 answers) Closed 1 year ago . I'm trying to use a google font with my extension on the content script side - the Noto font I have downloaded and loading from the extension directory works (it is also declared in web_accessible_resources) and works fine in the ShadowDOM but the google font doesn't I'm injecting this style text into the head: var styleNode = document.createElement("style"); styleNode.type = "text/css";

Form Submission within a Chrome Extension popup

若如初见. 提交于 2021-02-11 18:10:14
问题 I'm trying to build my first Chrome Extension. I need it to have a simple form that submits. I'm having trouble getting anything to run on my popup.js file. I found this post to be similar but can't seem to get even the basic logging to work in the console. How to get value of form submission popup.html chrome extension Here is my popup.html <!DOCTYPE html> <html> <head> </head> <body> <h1>Hello World</h1> <form id="useCasePostForm"> <input type="text" id="useCase" /> <input type="submit"> <

Taking full page screenshot with a Chrome extension

蓝咒 提交于 2021-02-11 17:35:42
问题 Is there away to capture a screenshot of the full page, including what is below the fold, in a Chrome Extension? The captureVisibleTab seems to be limited to what is displayed within the visible area. 回答1: You're limited to capturing the visible page via captureVisibleTab unless you use Flash or NPAPI. 回答2: The standard approach seems to be to scroll around the page and capture screenshots at each part and then stick them all together. The official google screen capture plugin does this, but

How to dynamically change a chrome extension's icon?

∥☆過路亽.° 提交于 2021-02-11 16:52:45
问题 How do I change chrome extension icons dynamically? my current extension's icon is named icon.png and is in the same directory as all of the js / manifest, in a goal to change it to icon2.png i tried: example content.js console.log("content script is running..") //shows in console chrome.pageAction.setIcon({tabId: tab.id, path: 'icon2.png'}); //nothing manifest.json: { "manifest_version": 2, "name": "B", "version": "0.1", "options_page": "options.html", "background" : { "scripts": [

How to dynamically change a chrome extension's icon?

Deadly 提交于 2021-02-11 16:52:22
问题 How do I change chrome extension icons dynamically? my current extension's icon is named icon.png and is in the same directory as all of the js / manifest, in a goal to change it to icon2.png i tried: example content.js console.log("content script is running..") //shows in console chrome.pageAction.setIcon({tabId: tab.id, path: 'icon2.png'}); //nothing manifest.json: { "manifest_version": 2, "name": "B", "version": "0.1", "options_page": "options.html", "background" : { "scripts": [

chrome extension popup.js is not working

丶灬走出姿态 提交于 2021-02-11 15:14:34
问题 I have a popup.html that looks like this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="css/fbh-ui.css" /> <script type="text/javascript" src="js/jq.js"></script> <script type="text/javascript" src="js/fbh-popup.js"></script> </head> <body style="width: 200px"> <div id="fbh-main"> <div id="fbh-popup-enabled"></div> </div> </body> And fbh-popup.js looks like this $('#fbh-popup-enabled').html(

chrome extension popup.js is not working

对着背影说爱祢 提交于 2021-02-11 15:12:09
问题 I have a popup.html that looks like this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="css/fbh-ui.css" /> <script type="text/javascript" src="js/jq.js"></script> <script type="text/javascript" src="js/fbh-popup.js"></script> </head> <body style="width: 200px"> <div id="fbh-main"> <div id="fbh-popup-enabled"></div> </div> </body> And fbh-popup.js looks like this $('#fbh-popup-enabled').html(