-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
62 lines (49 loc) · 1.92 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
$(function () {
$('body').append(`<div class="box">
<span class="title" style="padding-top:0">Flat Colors</span>
<ul>
<li><a href="#" id="Green">🤔<span>Undecided</span></a></li>
<li><a href="#" id="Blue">😌<span>Stressful</span></a></li>
<li><a href="#" id="Pink">😠<span>Nervous</span></a></li>
</ul>
<span class="title">Gradient Colors</span>
<ul>
<li><a href="#" id="Green2">🤔<span>Undecided</span></a></li>
<li><a href="#" id="Blue2">😌<span>Stressful</span></a></li>
<li><a href="#" id="Pink2">😠<span>Nervous</span></a></li>
</ul>
</div>`);
$('.header-user').prepend('<a class="header-btn js-bgchanger" href="#" style="text-align:center" title="Trello Background Changer">😄</a>');
$('.js-bgchanger').click(function () {
$('.box').toggle();
});
$(document).bind('click', function (e) {
if ($(e.target).closest('.js-bgchanger').length == 0) {
$('.box').hide();
}
});
var Green = $('#Green').css('background-color');;
var Blue = $('#Blue').css('background');
var Pink = $('#Pink').css('background');
var Green2 = $('#Green2').css('background');
var Blue2 = $('#Blue2').css('background');
var Pink2 = $('#Pink2').css('background');
$('#Green').click(function () {
$('#classic-body').css('background', Green);
});
$('#Blue').click(function () {
$('#classic-body').css('background', Blue);
});
$('#Pink').click(function () {
$('#classic-body').css('background', Pink);
});
$('#Green2').click(function () {
$('#classic-body').css('background', Green2);
});
$('#Blue2').click(function () {
$('#classic-body').css('background', Blue2);
});
$('#Pink2').click(function () {
$('#classic-body').css('background', Pink2);
});
});