Skip to content

Commit

Permalink
fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-portmen committed Oct 5, 2017
1 parent 9eca73f commit f488ac1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ chrome.browserAction.onClicked.addListener(() => {
});
});

chrome.runtime.onMessage.addListener((request, sender) => {
if (request.method === 'close-me') {
chrome.tabs.remove(sender.tab.id);
}
});

// FAQs & Feedback
chrome.storage.local.get({
'version': null,
Expand Down
4 changes: 3 additions & 1 deletion data/shutdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ function response(res) {
});
}
else if (prefs.exit) {
window.close();
chrome.runtime.sendMessage({
method: 'close-me'
});
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.1.2",
"version": "0.1.3",
"name": "Auto Shutdown",
"description": "Executes a system level command when all downloads are finished",
"permissions": [
Expand Down

0 comments on commit f488ac1

Please sign in to comment.