-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.js
77 lines (69 loc) · 2.22 KB
/
init.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
76
77
console.log("mark was here");
// Custom CSS for aesthetics
var styles = `
.bookmark {
min-height: 0px;
padding: 0px;
}
.eevent-bookmark {
display: none;
}`;
var styleSheet = document.createElement("style")
styleSheet.innerText = styles
document.head.appendChild(styleSheet)
// Custom CSS for aesthetics
// hide/show events cheveron
var bookeventss = document.getElementsByClassName("event-bookmark");
if (bookeventss.length > 0) {
const rooms = document.getElementsByClassName("bookmarks-section-header")[0];
var downHtml =
`<div id="downnn" class="textclass">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">
<style>
i {
color: #669FAB;
font-size: 34px !important;
}
</style>
<i class="material-icons">
expand_more
</i>
</div>
`;
var upHtml =
`<div id="uppp" class="textclass" style="display:none">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">
<style>
i {
color: #669FAB;
font-size: 34px !important;
}
</style>
<i class="material-icons">
expand_less
</i>
</div>
`;
rooms.insertAdjacentHTML("afterend", downHtml);
rooms.insertAdjacentHTML("afterend", upHtml);
for (var i = 0; i < bookeventss.length; i ++) {
bookeventss[i].style.display = 'none';
};
document.getElementById("uppp").addEventListener("click", function(e) {
var bookevents = document.getElementsByClassName("event-bookmark");
for (var i = 0; i < bookevents.length; i ++) {
bookevents[i].style.display = 'none';
};
document.getElementById("downnn").style.display = 'block';
document.getElementById("uppp").style.display = 'none';
});
document.getElementById("downnn").addEventListener("click", function(e) {
var bookevents = document.getElementsByClassName("event-bookmark");
for (var i = 0; i < bookevents.length; i ++) {
bookevents[i].style.display = 'block';
};
document.getElementById("downnn").style.display = 'none';
document.getElementById("uppp").style.display = 'block';
});
};
// hide/show events cheveron