-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
46 lines (35 loc) · 930 Bytes
/
main.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
// lol this is some weird test I did in JS
// CSS that will be injected.
// (default code, changes images into CIRCLE AND RAINBOWWWWWWWWWWWWW);
const CSS_CODE = `
img {
border-radius: 100%;
}
@keyframes textRainbowAnimation {
0% {
color: red;
}
25% {
color: green;
}
50% {
color: blue;
}
75% {
color: orange;
}
100% {
color: purple;
}
}
div, li, ul, p, h1, h2, h3, h4, h5, h6, a {
transition: 1.1s;
animation: textRainbowAnimation 1s linear infinite;
animation-direction: alternate;
}
`;
// create the required style tag
let styleTag = document.createElement('style');
styleTag.appendChild(document.createTextNode(CSS_CODE));
// add it to the website
document.head.appendChild(styleTag);