1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-10-13 20:44:23 +02:00

Remove default replacing of new tab..finally. Fixes #37

This commit is contained in:
Kushagra Gour
2017-02-15 23:51:24 +05:30
parent 314f584538
commit 1669ddd6c7
3 changed files with 22 additions and 14 deletions

View File

@@ -12,10 +12,10 @@ chrome.browserAction.onClicked.addListener(function(){
// Listen for tabs getting created.
chrome.tabs.onCreated.addListener(function (tab) {
// If a new tab is opened (without any URL), check user's
// replace Tab setting and act accordingly.
// replace Tab setting and act accordingly. Default is false.
if (tab.url === 'chrome://newtab/') {
chrome.storage.sync.get({
replaceNewTab: true
replaceNewTab: false
}, function(items) {
if (items.replaceNewTab) {
chrome.tabs.update(tab.id, {