Initial commit
This commit is contained in:
24
popup.js
Normal file
24
popup.js
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
$('#emailDelay').change((event) => {
|
||||
chrome.storage.sync.set({ emailDelay: parseInt(event.target.value) });
|
||||
});
|
||||
|
||||
$('#calendarDelay').change((event) => {
|
||||
chrome.storage.sync.set({ calendarDelay: parseInt(event.target.value) });
|
||||
});
|
||||
|
||||
$('#quickLinks').change((event) => {
|
||||
chrome.storage.sync.set({ showQuickLinks: $('#quickLinks').prop('checked') });
|
||||
if ($('#quickLinks').prop('checked')) {
|
||||
chrome.tabs.executeScript({ code: "$('#quick-links').show()" });
|
||||
} else {
|
||||
chrome.tabs.executeScript({ code: "$('#quick-links').hide()" });
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.sync.get(null, (data) => {
|
||||
$('#emailDelay').val(data.emailDelay);
|
||||
$('#calendarDelay').val(data.calendarDelay);
|
||||
$('#quickLinks').prop('checked', data.showQuickLinks);
|
||||
});
|
||||
Reference in New Issue
Block a user