-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.js
75 lines (66 loc) · 1.87 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
document.getElementById('scheme1').addEventListener('click', function () {
key = "colorblind"
value = "1"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("Scheme1 is set");
});
});
document.getElementById('off').addEventListener('click',
function () {
key = "colorblind"
value = "off"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("Off is set");
});
})
// Function for Button 2
document.getElementById('scheme2').addEventListener('click', function () {
key = "colorblind"
value = "2"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("Scheme2 is set");
});
});
// Function for Button 3
document.getElementById('scheme3').addEventListener('click', function () {
key = "colorblind"
value = "3"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("3 is set");
});
});
document.getElementById('scheme4').addEventListener('click', function () {
key = "colorblind"
value = "4"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("4 is set");
});
});
document.getElementById('scheme5').addEventListener('click', function () {
key = "colorblind"
value = "5"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("5 is set");
});
});
document.getElementById('scheme6').addEventListener('click', function () {
key = "colorblind"
value = "6"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("6 is set");
});
});
document.getElementById('scheme7').addEventListener('click', function () {
key = "colorblind"
value = "7"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("7 is set");
});
});
document.getElementById('scheme8').addEventListener('click', function () {
key = "colorblind"
value = "8"
chrome.storage.sync.set({ key: value }).then(() => {
console.log("8 is set");
});
});