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
Fix #1515 related issues in PR #1508 for new tabs #1532
Conversation
PR philc#1508 introduced another issue that setting vimium's `newTabURL` to the inbuilt `pages/blank.html` resulted in opening a new tab with search query set to `pages/blank.html`. This commit solves the issue by conditionally calling `Utils.convertToUrl`. Also, it changes `openOptionsPageInNewTab` call to use `openUrlInNewTab` for consistency and reduce usage of `chrome.tabs.create` API call. Note that this may not solve philc#1507 as chrome seems to open `chrome-extension://...` URLs in _non-incognito_ window *by design*. You may want to set it to (some other blank page)[1] so that it can be accessed from incognito mode. You can always open `chrome://newtab` from incognito window. [1] http://this-page-intentionally-left-blank.org/
This commit is based off PR #1508. Do you want me to rebase it to some other branch/current master? If you could resolve the conflicts yourself, that will be great though. |
An alternative would be cced8f7, which just fills in the absolute URL for (It looks like there may be no way to use |
Hmm, alternative cced8f7 works too. In that case, we might include @mrmr1993's suggestion for |
@smblott-github Can we still explore having a unified tab opening function? It seems like calling the same chrome API in slightly different ways with different levels of detail throughout the codebase is generally not the best practise. Some other thoughts:
|
If we create our own centralised function, we'll just end up calling it in slightly different ways with different levels of detail throughout the codebase. Or, put another way, we'd just be creating our own
Fair, but also a bit harsh. Changing topic (and mentioning you, @mrmr1993, to get your attention)... I'm wondering whether we shouldn't abandon our new-tab page functionality entirely. We can't make |
PR #1508 introduced another issue that setting vimium's
newTabURL
tothe inbuilt
pages/blank.html
resulted in opening a new tab with searchquery set to
pages/blank.html
.This commit solves the issue by conditionally calling
Utils.convertToUrl
.Also, it changes
openOptionsPageInNewTab
call to useopenUrlInNewTab
for consistency and reduce usage ofchrome.tabs.create
API call.Note that this may not solve #1507 as chrome seems to open
chrome-extension://...
URLs in non-incognito window by design.You may want to set it to (some other blank page)[1] so that it can be
accessed from incognito mode. You can always open
chrome://newtab
fromincognito window.
[1] http://this-page-intentionally-left-blank.org/