-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.js
32 lines (31 loc) · 907 Bytes
/
custom.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
const all = [];
window.addEventListener('DOMContentLoaded', getAll(all));
function makeGreen() {
if (all.length > 0) {
for (i = 0; i < all.length; i++) {
const a = all[i];
const b = document.createElement('span');
const c = a.parentNode.appendChild(b);
b.classList.add('green');
c.innerHTML = a.innerHTML;
}
}
}
function getAll(arr) {
const items = document.querySelectorAll('#sortable > section');
for (i = 1; i < items.length; i++) {
arr.push(
document.querySelector(
`#sortable > section:nth-child(${i}) > div > div.details > div`
)
);
}
makeGreen();
font();
}
function font() {
const head = document.querySelector('head');
const x = document.createElement('style');
head.appendChild(x);
x.innerHTML = `@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');`;
}