Ng1Chuck
Ng1Chuck

Reputation: 33

Extension Chrome, javascript write in a page

I want to make a chrome extension that would show text when you look at a video in full screen. But how do you show text in Javascript on the current page and not in the extension popup? And how do you add text in javascript in the foreground of the videoplayer?

Upvotes: 2

Views: 56

Answers (1)

Eloims
Eloims

Reputation: 5224

To make any change on the current page (or any other), you need to inject a content-script.

Then this content script will behave like any other script in the page. You can inject HTML, CSS, or even load jQuery and play with the DOM.

Here is the content-script documentation:

https://developer.chrome.com/extensions/content_scripts

Upvotes: 2

Related Questions