forked from greatsuspender/thegreatsuspender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
28 lines (24 loc) · 989 Bytes
/
popup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*global document, chrome, window */
(function () {
"use strict";
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('suspendOne').addEventListener('click', function () {
chrome.extension.sendRequest({ msg: "suspendOne" });
window.close();
});
document.getElementById('suspendAll').addEventListener('click', function () {
chrome.extension.sendRequest({ msg: "suspendAll" });
window.close();
});
document.getElementById('unsuspendAll').addEventListener('click', function () {
chrome.extension.sendRequest({ msg: "unsuspendAll" });
window.close();
});
document.getElementById('settings').addEventListener('click', function () {
chrome.tabs.create({
url: chrome.extension.getURL("options.html")
});
window.close();
});
});
}());