Problems with StartPage URL
-
Good evening all,
Using latest x64 snapshot on Windows 10 1809 (re-release) x64.If I type vivaldi://startpage in the address bar and press ENTER, I get the StartPage/SpeedDial page as expected. I am working on an extension and inside my JavaScript file I am using this :
chrome.tabs.update({url:"vivaldi://startpage"});
to change the URL of the current tab if there is only 1 tab open. Problem is, I get this message/page instead of the StartPage/SpeedDial opening :This site can’t be reached
The webpage at chrome://startpage/ might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_URLWith the error page open, I can still click inside the address bar and press ENTER and the StartPage is displayed after refresh. Not sure why it isn't working when trying to go directly to it as a URL. Should I be using a different address in my JavaScript file?
//MODEDIT: Fixed text formatting
-
There are problems with links to internal pages like this one. For that reason, we avoid giving (here, on the forums) URLs to internal pages like this: vivaldi://about but instead we give them like this:
vivaldi://about
(notice, that you'll get different page when you click on the link and when you paste it to the address bar manually). For some reason - depending on the method of calling the URL (as it is in your case) - sometimes a "wrong" internal page is being opened (or at least it seems like it). This is probably due to the fact, that Vivaldi "overwrites" the default Chromium pages and the code isn't quite finished yet. However, these are only mine speculations, I'm not a Vivaldi programmer.Have you tried using
chrome://newtab
instead? I believe that in order for this to work, you'd have to set the "New Tab Page" to "Start Page" invivaldi://settings/tabs/
-
@pafflick Thank you for your reply.
During my testing, I did exactly as you had suggested and it does technically work. The problem with that method, is that there seems to be an underlying/hidden Google homepage window. When using the newtab address, the favicon changes from the normal StartPage one to the Google one (large G). The SpeedDial page is displayed; however, after clicking any of the thumbnails, there is a flash of the Google homepage before going to the site that I clicked.For now, I have set the address to about:blank and will leave it as-is.
Do you know if there is a way to automatically force links opened from the StartPage to open in a new tab (w/o pressing CTRL before clicking) ? I have enabled that setting for bookmarks, panel items, etc., but it ignores it for links on the StartPage (they open in the same tab). If this was possible, I could pin the StartPage and not have to worry about making a work-around extension.
I also have the option set to not close the Vivaldi window after the last tab is closed. This works perfectly except when the last tab is closed via code, which is why I was making this small extension. If I use
chrome.tabs.remove
when there is only one tab left, it ignores the keep Vivaldi open setting and closes the window anyway. -
Sorry for the late reply but I've been a bit busy lately.
@vongalin said in Problems with StartPage URL:
Do you know if there is a way to automatically force links opened from the StartPage to open in a new tab (w/o pressing CTRL before clicking) ?
I believe that it could be achieved by modifying the source code of the Start Page itself (after all, it's just a web page). It could be too complicated though, as its code is minified (obfuscated) and thus it might be hard to read/edit its contents. And even if you achieve that, your changes will be erased with the next update. You'll have to re-apply them on each update. So, using an extension seems to be a more convenient approach.
@vongalin said in Problems with StartPage URL:
I also have the option set to not close the Vivaldi window after the last tab is closed. This works perfectly except when the last tab is closed via code, which is why I was making this small extension. If I use
chrome.tabs.remove
when there is only one tab left, it ignores the keep Vivaldi open setting and closes the window anyway.Please report a bug on that. If you know how to reproduce that issue, please take some time to read the article on How to report a bug? and follow the instructions there to report this issue to the developers. Thank you.
-
Ppafflick moved this topic from Extensions on