Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create new tab to display contents #125

Closed
realrecordzLab opened this issue Nov 20, 2024 · 7 comments
Closed

How to create new tab to display contents #125

realrecordzLab opened this issue Nov 20, 2024 · 7 comments
Labels
question Further information is requested

Comments

@realrecordzLab
Copy link

How this boilerplate can be used to create an extension that will use an entire tab to show contents?

@mubaidr
Copy link
Owner

mubaidr commented Nov 20, 2024

Yes, why not! Infact all the apps (popup, options, setup etc) routes can be accessed anywhere.

  • Create page in common/pages
  • open a new tab using chrome api
  • load the URL defined in first step

@mubaidr mubaidr closed this as completed Nov 20, 2024
@realrecordzLab
Copy link
Author

Yes, why not! Infact all the apps (popup, options, setup etc) routes can be accessed anywhere.

  • Create page in common/pages
  • open a new tab using chrome api
  • load the URL defined in first step

I've solved in a simple way that I think needs to be implemented as part of the extension. I've copied the popup folder and after this renamed it in new-tab, then modified the route to reflect the name I want to assign to the new tab and used the chrome.action.onClicked.addListener to listen when the extension icon is clicked. This will work only if the popup is not set into the manifest. Anyway I will try the suggested solution with the page inside the common folder.

Thank you for the reply

@mubaidr
Copy link
Owner

mubaidr commented Nov 22, 2024

This is hacky stuff! Might run into issues when scaling your extension.

@realrecordzLab
Copy link
Author

This is hacky stuff! Might run into issues when scaling your extension.

I'm trying to follow your suggestion, but not sure to understand needed steps.
Inside the pages folder I need to create a component or an html page?

This is not clear for me at the moment because I see that each predefined folder have inside js, html and scss files. This is why I've opted for the hacky solution.

@mubaidr
Copy link
Owner

mubaidr commented Dec 17, 2024

This is hacky stuff! Might run into issues when scaling your extension.

I'm trying to follow your suggestion, but not sure to understand needed steps. Inside the pages folder I need to create a component or an html page?

This is not clear for me at the moment because I see that each predefined folder have inside js, html and scss files. This is why I've opted for the hacky solution.

Both will work fine, I mean, it depends on the suage here. If you want to overried chrome new tab then you need to use html page (complete vue app). For this you need to add chrome_url_overrides section to manifest file.

If you just want to open an extension link in new tab you can just do it by adding new page to /pages directory. (can even load any page from options/ popup etc too)

@realrecordzLab
Copy link
Author

This is hacky stuff! Might run into issues when scaling your extension.

I'm trying to follow your suggestion, but not sure to understand needed steps. Inside the pages folder I need to create a component or an html page?
This is not clear for me at the moment because I see that each predefined folder have inside js, html and scss files. This is why I've opted for the hacky solution.

Both will work fine, I mean, it depends on the suage here. If you want to overried chrome new tab then you need to use html page (complete vue app). For this you need to add chrome_url_overrides section to manifest file.

If you just want to open an extension link in new tab you can just do it by adding new page to /pages directory. (can even load any page from options/ popup etc too)

I will need to open a new tab not override the new tab default page. Into the pages folder I will need to create a vue file right?Then call it from what entry point?

@mubaidr
Copy link
Owner

mubaidr commented Dec 18, 2024

In short, yes!

I will try to add an example here, when I have time.

@mubaidr mubaidr reopened this Dec 18, 2024
@mubaidr mubaidr added the question Further information is requested label Dec 21, 2024
Repository owner locked and limited conversation to collaborators Dec 21, 2024
@mubaidr mubaidr converted this issue into discussion #149 Dec 21, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants