Skip to content

Commit adb9ba6

Browse files
authored
Update popup.js
1 parent 0ac4202 commit adb9ba6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: popup.js

+8
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ chrome.storage.sync.get('stat', function(res){
1313
tr.appendChild(td2)
1414
document.getElementById('stats').appendChild(tr)
1515
}
16+
1617
});
1718
chrome.browserAction.setPopup({
1819
popup: ''
1920
})
2021
document.getElementById('donate').onclick = function(){
2122
chrome.tabs.create({url:chrome.extension.getURL("donate.html")},function(){})
2223
}
24+
document.getElementById('notification').addEventListener("change", function() {
25+
console.log(this.checked);
26+
chrome.storage.sync.set({'notification': this.checked});
27+
})
28+
chrome.storage.sync.get('notification', function(res){
29+
document.getElementById('notification').checked = res.notification;
30+
});

0 commit comments

Comments
 (0)