-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
38 lines (29 loc) · 1.26 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
document.addEventListener('DOMContentLoaded', function() {
$('#family').val(localStorage.getItem('family'));
$('#size').val(localStorage.getItem('size'));
$('#color').val(localStorage.getItem('color'));
$('#bg-color').val(localStorage.getItem('bg_color'));
$('#bold').val(localStorage.getItem('bold'));
$("#spell").prop('checked', JSON.parse(localStorage.getItem('spell')));
let open = document.getElementById('open');
open.addEventListener('click', function() {
let family = $('#family').val();
localStorage.setItem('family', family);
let size = $('#size').val();
localStorage.setItem('size', size);
let color = $('#color').val();
localStorage.setItem('color', color);
let bg_color = $('#bg-color').val();
localStorage.setItem('bg_color', bg_color);
let bold = $('#bold').val();
localStorage.setItem('bold', bold);
let spell = $("#spell")[0].checked;
localStorage.setItem('spell', spell);
});
$('.simple-color-picker').colorpicker();
let devro = document.getElementById('devro');
devro.addEventListener('click', function() {
let newURL = "https://devrolabs.com/";
chrome.tabs.create({ url: newURL });
});
}, false);