google-chrome-extension

Is there a way to uniquely identify an iframe that the content script runs in for my Chrome extension?

人走茶凉 提交于 2019-12-27 17:59:26
问题 In my Chrome extension I am injecting the content script into all IFRAMEs inside a page. Here's a part of the manifest.json file: "content_scripts": [ { "run_at": "document_end", "all_frames" : true, "match_about_blank": true, "matches": ["http://*/*", "https://*/*"], "js": ["content.js"] } ], So a single web page having multiple IFRAMEs will end up running that many copies of my injected content.js . The logic inside content.js collects data from each IFRAME it's injected into, or from the

Chrome Extension loop check for button Errors

白昼怎懂夜的黑 提交于 2019-12-26 03:18:09
问题 I am trying to create a chrome extension that once I click the chrome extension, the script will start and will loop check every 1 millisecond for a button with the id "product-addtocart-button". So, once the loop finds the button it needs to be clicked right away. manifest.json: { "description": "Click a button with ID=product-addtocart-button", "manifest_version": 2, "name": "click-product-addtocart-button", "version": "0.1", "permissions": [ "activeTab" ], "background": { "scripts": [

Chrome Extension loop check for button Errors

心已入冬 提交于 2019-12-26 03:15:19
问题 I am trying to create a chrome extension that once I click the chrome extension, the script will start and will loop check every 1 millisecond for a button with the id "product-addtocart-button". So, once the loop finds the button it needs to be clicked right away. manifest.json: { "description": "Click a button with ID=product-addtocart-button", "manifest_version": 2, "name": "click-product-addtocart-button", "version": "0.1", "permissions": [ "activeTab" ], "background": { "scripts": [

Chrome Desktop notification to all users

偶尔善良 提交于 2019-12-25 20:05:12
问题 I have tried to add Chrome Desktop notification to my website. I have followed this: Chrome desktop notification example and I have added the script code to my website and it work fine with me, but I have a problem. When I click on "notify" button the notification just appears to me, but I want the notification be shown to all users who granted the permission. Can anyone help me please? 回答1: You're looking at wrong documentation - or rather, only one part of it. There are separate problems of

how to get a page source in html?

限于喜欢 提交于 2019-12-25 18:41:53
问题 I'm using HTML and javaScript .. I'm trying to build a chrome extension , which will display some info from the website in the popup I need to get the page source of http://met.guc.edu.eg in the context of my web page and use it to get some of the "li" tags and do some work on them ( RegEx ) for example display the courses taken by student in web page -- By taking them from the http://met.guc.edu.eg .. and display them in a nice way in a pop up 回答1: Since there is no true answer to this yet,

How can i capture the download progress in chrome extension

青春壹個敷衍的年華 提交于 2019-12-25 16:57:30
问题 I am creating a chrome extension which moniters the download progress. I am able the capture the download begin and download complete events but have no idea on how to get the changed progress? Please help. Below is my download listener function AddDownloadListener() { //-------------------------------------------------------------------------------------------------------------- chrome.downloads.onCreated.addListener(DownloadCreated); chrome.downloads.onChanged.addListener(DownloadChanged);

My JS file won't load on my Chrome web application

无人久伴 提交于 2019-12-25 14:06:31
问题 I'm writing a Chrome web application and am trying to load a clock onto it, but this is not working. The HTML & CSS files are showing up but not the JS, meaning that the application just looks like an empty box. I would really appreciate your help - thank you very much! Here is my popup.html file: <!DOCTYPEhtml> <link rel="stylesheet" type="text/css" href="popup.css"> <title>Your Personal Homepage</title> <script src="popup.js"></script> <script src="clock.js"></script> </head> <body> <div id

Api to get list of extensions installed in browser

淺唱寂寞╮ 提交于 2019-12-25 14:00:51
问题 I am developing an extension for chrome and safari.One step in this app is to get all the already installed extensions.Is there any safari or chrome api that can give the list of installed extensions? In safari installed extensions are stored in ~/Library/Safari/Extensions/Extensions.plist but i am not able to find any related api. 回答1: For Chrome: From within a Chrome Extension, you can use chrome.management.getAll to obtain a list of the installed extensions and apps. For Safari: There is

youtube video in chrome extension content script

旧城冷巷雨未停 提交于 2019-12-25 13:45:15
问题 I am trying to insert youtube videos with the iframe API in to an existing page with the help of a chrome extension content script. But I cannot get the onYouTubeIframeAPIReady to trigger. manifest.json "content_scripts": [ { "matches": ["http://*/*", "https://*/*", "file://*/*", "*://*/*"], "js": ["content-script.js"] } ], content-script.js const appEl = document.createElement('div'); appEl.id = 'my-app'; appEl.innerHTML = `<div id="youtube-iframe"></div>`; const bodyEl = document

youtube video in chrome extension content script

余生颓废 提交于 2019-12-25 13:45:13
问题 I am trying to insert youtube videos with the iframe API in to an existing page with the help of a chrome extension content script. But I cannot get the onYouTubeIframeAPIReady to trigger. manifest.json "content_scripts": [ { "matches": ["http://*/*", "https://*/*", "file://*/*", "*://*/*"], "js": ["content-script.js"] } ], content-script.js const appEl = document.createElement('div'); appEl.id = 'my-app'; appEl.innerHTML = `<div id="youtube-iframe"></div>`; const bodyEl = document