Add a web-extension page to chrome startup pages list after user confirmation

71 views
Skip to first unread message

khalid

unread,
Aug 29, 2017, 6:06:08 PM8/29/17
to Chromium-Extensions-Announce
hi gays,

Using a chrome web extension (or a normal web page), i'm trying to add an extension page to startup pages list.

I know about the directive in the manifest: 

    "chrome_settings_overrides"  : {
        "startup_pages" : ["https://example.com/..."]
     }

the problem with that is that it adds the page statically without user explicit permission. I'm looking for a script that could do that instead.

thank you for your help n_n

khalid

unread,
Aug 29, 2017, 6:12:27 PM8/29/17
to Chromium-Extensions-Announce
I could'nt use Tabs API to open a new tab when the navigator starts, because the inspectors will signal the app as a malware, and because i need that the param to be in chrome's parameters and not mines

PhistucK

unread,
Aug 30, 2017, 2:29:22 AM8/30/17
to khalid, Chromium-Extensions-Announce
As long as you know the number of startup pages you need (and even if you do not, but it is a bit more involved), can you put an extension page URL (I mean, one of your extension HTMLs) as the startup page and in that page, redirect to the page you really need? That makes it dynamic, because you can even load the URL to which you want to redirect from a server.


PhistucK

On Wed, Aug 30, 2017 at 1:12 AM, khalid <websk...@gmail.com> wrote:
I could'nt use Tabs API to open a new tab when the navigator starts, because the inspectors will signal the app as a malware, and because i need that the param to be in chrome's parameters and not mines

--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-extensions@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ad83649f-ef21-4260-9324-1db2a1865347%40chromium.org.

khalid

unread,
Aug 30, 2017, 6:41:58 AM8/30/17
to Chromium-Extensions-Announce
well, in fact, we just need one, the problem if we close the page when it starts is that:
1- the user will not appreciate to see a phantom page closing when he opens the navigator
2- we will need an extra param in our preferences, and if the param say "no" and the user add the page manually to the list, the page will never open

the original message was:
------------------------------------------------------------------------

Hello.

We are developing a plugin (WEBSKAN).

 

At the installation of the plugin, we would like to ask the user to allow us to add the plugin page in the stratpages of the browser.

 

If the user says “Yes”, we would like to be able to add programmatically (API , Script, …) the URL of the plugin to the startpages of the browser.

 

We have tested the following directive in the manifest: 

 

    "chrome_settings_overrides"  : {
        "startup_pages" : ["
https://example.com/..."]
     }

 

The problem is that it adds the page statically without the user permission.

 

Thanks for your help.



PhistucK

unread,
Aug 30, 2017, 6:50:00 AM8/30/17
to khalid, Chromium-Extensions-Announce
Oh, I guess it is part of the one-UI-surface/purpose-per-extension. Extensions that override the startup pages have a main purpose - to replace the startup pages of the user. So you can split your extension - one will replace the startup pages and the other will do the rest. The user will only install the former if they want to replace their startup pages.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-extensions@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.

khalid

unread,
Aug 30, 2017, 7:06:20 AM8/30/17
to Chromium-Extensions-Announce
Our extension has only on page

In fact in our early versions, we used to override the main page of the user. our testers didn't appreciate that (the extension opens each time we open a tab)

So to resolve that, we added a button to the chrome header, so the user could click on it to lunch the extension.

know some of our testers ask us to open this page (of the extension) one time when the navigator starts (as a startup page), some others didn't like that,  so the solution is to ask the user when he install the extension if he would that this page opens when hi start his navigator.

To resolve this, we have two tracks:
1- use Tabs API to open the tab if the user said "yes": => need extra param in our preferences, need to teach users how to remove it!, inspectors do not like this approach and will signal it as a malware
2- use "startup pages" : Great for us, but we need that the page to added only if the user accept that, (we a prompt window to as for permission) otherwise, he can use header button.

PhistucK

unread,
Aug 30, 2017, 7:57:08 AM8/30/17
to khalid, Chromium-Extensions-Announce
Another option is what I suggested - create another extension that depends on this extension that simply overrides the startup page.

One more option is to tell them to put the URL of your extension page manually (or add it to the bookmarks).​


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsubscribe...@chromium.org.

PhistucK

unread,
Aug 30, 2017, 8:48:05 AM8/30/17
to Marcel Assaraf, khalid, Chromium-Extensions-Announce
I understand now. I guess the API does not let you do that.
Generally, for feature requests, you can search crbug.com for an existing issue for this feature request and star it. If you cannot find one, you can use the "New issue" link at crbug.com to file a new one.
(If you do find one, do not add comments like "+1" or "me, too", it only hinders the development and it does not make the engineers implement the feature more quickly.)



PhistucK

On Wed, Aug 30, 2017 at 3:25 PM, Marcel Assaraf <marcel....@gmail.com> wrote:
Hi.
We appreciate your feedback.
I would like to add to the thread that we understand the manual option and this could be the backup solution.

On the other side, you talk about overriding the startpages.
What we are looking to do is to add the plugin URL to the existing startpages of the user.
Let's take my particular case. I have 2 startpages (Gmail and Yahoo Mail) that are automatically loaded when I start my Google Chrome.
We are looking to add the Webskan URL to the startpages e.g. I will have 3 pages that open automatically when I launch my Google Chrome.
In my case, I would not appreciate if someone "overrides" my existing start pages with something else ..

Regards

Marcel ASSARAF 

Paris - France

marcel....@gmail.com

+33 6 37 26 47 23

skype: marcel.assaraf

Reply all
Reply to author
Forward
0 new messages