mirror of
https://github.com/khairul169/honey.git
synced 2025-04-28 14:59:32 +07:00
16 lines
380 B
JavaScript
16 lines
380 B
JavaScript
function get(id) {
|
|
return document.getElementById(id);
|
|
}
|
|
function for_all(class_name, func) {
|
|
let a = document.getElementsByClassName(class_name);
|
|
for (let i = 0; i < a.length; i++) {
|
|
func(a[i]);
|
|
}
|
|
}
|
|
function load_img(img) {
|
|
img.classList.remove("unloaded");
|
|
}
|
|
function get_background() {
|
|
let bg = get("background");
|
|
return bg.children[1-bg.classList.contains("dark")];
|
|
} |