Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Commit

Permalink
update: Add 'call to action'
Browse files Browse the repository at this point in the history
* Add Call to Action for non-windows platforms.

Signed-off-by: mr.Shu <[email protected]>
  • Loading branch information
mrshu committed Sep 27, 2016
1 parent d4a71c1 commit 347fbb7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ function Background() {
});
}
});

// Show search engine settings along with steps required to make DuckDuckGo
// the default for platforms where the override does not work.
if (os !== 'w') {
chrome.tabs.create({ url: 'chrome://settings/searchEngines' });
chrome.notifications.create({
type: "basic",
iconUrl: "./img/icon_128.png",
title: "Make DuckDuckGo the default!",
message: "Find DuckDuckGo in the list and click on Make Default!"
});
}
});

chrome.extension.onMessage.addListener(function(request, sender, callback) {
Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"contextMenus",
"webRequest",
"webRequestBlocking",
"*://*.duckduckgo.com/"
"*://*.duckduckgo.com/",
"notifications"
]
}

0 comments on commit 347fbb7

Please sign in to comment.