Jack Hales
Jack Hales

Reputation: 1664

How to change Chrome extensions internal HTML page

I've done some looking around and couldn't find any solution to this problem.

I'm creating a Chrome extension, with a manifest that points to the opening file home-times.html. This works, though I want to redirect it internally to the other page home-welcome.html inside the extension so it loads another page INSIDE the extension.

I've read a lot of questions that refer to changing the current tab's page, though that's not what I am after.


Tests

By using the following code:

<a href="home-welcome.html">test</a>

Opens a new tab, with the extensions page that I am trying to access in that new tab.

Upvotes: 0

Views: 934

Answers (1)

Davit Mkrtchyan
Davit Mkrtchyan

Reputation: 469

If I got you right, you want to change your popup innerHTML, in this case I suggest using jQuery, to change original file to the result you want.

If you just want to open new tab, with your home-welcome.html, you can do this, in your popup.js :

window.open('home-welcome.html','_blank')

If none of this is what you are looking for, can you please provide an example, I will try to help.

Upvotes: 1

Related Questions