-
Notifications
You must be signed in to change notification settings - Fork 2
/
popup.js
42 lines (33 loc) · 1.48 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('op').addEventListener('click', function () {
window.open(chrome.extension.getURL('option.html'));
});
//// Initialize the option controls.
//popup.isActivated.checked = localStorage.isActivated || true;
//popup.SoundActivated.checked = localStorage.isActivated || true;
//// The display activation.
//popup.frequency.value = localStorage.frequency || null;
// The display frequency, in minutes.
var strSoundActivated;
var strisActivated;
var strfrequency;
if (localStorage.isActivated || true) {
strisActivated="הצגת התראות פועלת";
}else {
strisActivated="הצגת התראות מופסקת";
}
if (localStorage.SoundActivated || true) {
strSoundActivated = "צליל התראה פעיל";
} else {
strSoundActivated = "צליל התראה כבוי";
}
if (localStorage.getItem("frequency") === null) {
strfrequency= "לא נבחרה עיר מועדפת"
} else {
strfrequency = "העיר שלך - " + localStorage.frequency+" מושבת";
}
document.getElementById("isActivated").innerHTML = strisActivated //"העיר שלך - ירושלים";
document.getElementById("SoundActivated").innerHTML = strSoundActivated;
document.getElementById("frequency").innerHTML = strfrequency;
// Set the display activation and frequency.
});