replace 'about:blank' tabs in openURL()

This commit is contained in:
tophf 2017-12-03 02:44:03 +03:00
parent 43fc26619d
commit 55564b543a

View File

@ -226,7 +226,7 @@ function openURL({url, index, openerTabId, currentWindow = true}) {
} }
getActiveTab().then(tab => { getActiveTab().then(tab => {
const chromeInIncognito = tab && tab.incognito && url.startsWith('chrome'); const chromeInIncognito = tab && tab.incognito && url.startsWith('chrome');
if (tab && tab.url === 'chrome://newtab/' && !chromeInIncognito) { if (tab && (tab.url === 'chrome://newtab/' || tab.url === 'about:newtab') && !chromeInIncognito) {
// update current NTP, except for chrome:// or chrome-extension:// in incognito // update current NTP, except for chrome:// or chrome-extension:// in incognito
chrome.tabs.update({url}, resolve); chrome.tabs.update({url}, resolve);
} else { } else {