content-script

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: How do I get a web page to access functions defined by my content script?

南笙酒味 提交于 2021-01-28 21:58:04
问题 I'm programming a Chrome Extension, and I'm having it inject a content script which iterates through a few elements and attaches an onclick property to them which sends a message to my background script to execute a custom function on the DOM (the function defined in content scripts). To send a message from the web page to the extension, I must specify the extension ID which, as of now, I was manually getting from the extensions menu. Could I manage to query something for the extension's own

Chrome Extension: How do I get a web page to access functions defined by my content script?

夙愿已清 提交于 2021-01-28 21:39:00
问题 I'm programming a Chrome Extension, and I'm having it inject a content script which iterates through a few elements and attaches an onclick property to them which sends a message to my background script to execute a custom function on the DOM (the function defined in content scripts). To send a message from the web page to the extension, I must specify the extension ID which, as of now, I was manually getting from the extensions menu. Could I manage to query something for the extension's own

Replace chrome's WebAPI function using inject_script through chrome extension

被刻印的时光 ゝ 提交于 2020-06-01 06:50:12
问题 The bounty expires tomorrow . Answers to this question are eligible for a +100 reputation bounty. tarun14110 wants to draw more attention to this question. I am replacing navigator.credentials.create() and navigator.credentials.get() using chrome extension. navigator.credentials.create() for registering a 'security key' for 2nd-factor authentication. My replacement script works with some websites like Facebook and GitHub but doesn't work on some websites like Gmail, Twitter, Amazon AWS. What

How to get contentWindow of the frame after the change of its cross-origin source by a script?

ⅰ亾dé卋堺 提交于 2020-04-30 09:29:10
问题 I am developing a Chrome/Firefox extension, which is intended to be used only with my own Web-application that should semi-automatically process different Web-pages in a certain specific way. In the context of this question my application is just a single Web-page, containing a single iFrame , which source is initially from the same domain. When an application's user chooses the URL of a page to be processed, this URL is assigned as the new source of the frame. To process the chosen page,

How to get contentWindow of the frame after the change of its cross-origin source by a script?

扶醉桌前 提交于 2020-04-30 09:27:30
问题 I am developing a Chrome/Firefox extension, which is intended to be used only with my own Web-application that should semi-automatically process different Web-pages in a certain specific way. In the context of this question my application is just a single Web-page, containing a single iFrame , which source is initially from the same domain. When an application's user chooses the URL of a page to be processed, this URL is assigned as the new source of the frame. To process the chosen page,

How to get contentWindow of the frame after the change of its cross-origin source by a script?

南笙酒味 提交于 2020-04-30 09:27:22
问题 I am developing a Chrome/Firefox extension, which is intended to be used only with my own Web-application that should semi-automatically process different Web-pages in a certain specific way. In the context of this question my application is just a single Web-page, containing a single iFrame , which source is initially from the same domain. When an application's user chooses the URL of a page to be processed, this URL is assigned as the new source of the frame. To process the chosen page,

Alternatives to Bootstrap JS does not work inside shadow dom

二次信任 提交于 2020-04-10 21:07:45
问题 I tried to create a shadow DOM for encapsulating the content Script elements and then apply Bootstrap styles and also make Bootstrap Modal work inside a shadow Dom so it can encapsulate itself from the Webpage styles and Scripts. It is successful in displaying the content but Bootstrap js scripts don't work. I tried injecting all the Styles and Script files inside the Shadow DOM. Bootstrap Styles work, Bootstrap Scripts don't work $(#id) //the usual way to access a id using jQuery