Backup Commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
if (window.innerWidth > 800) {
|
||||
document.getElementById("styleshed").innerHTML = ".likeButton {top: " + (document.getElementsByClassName("imgItem")[0].clientHeight - 18) + "px !important}";
|
||||
} else {
|
||||
document.getElementById("styleshed").innerHTML = ".likeButton {top: " + (document.getElementsByClassName("imgItem")[0].clientHeight - 58) + "px !important}";
|
||||
}
|
||||
|
||||
document.querySelectorAll('.likebutton').forEach(element => {
|
||||
element.addEventListener("click", async function () {
|
||||
var itemid = this.attributes[1].value
|
||||
|
||||
if (this.innerHTML == "<icon>favorite_border</icon>") {
|
||||
addFav(itemid);
|
||||
await sleep(200);
|
||||
getFav();
|
||||
this.innerHTML = "<icon>favorite</icon>";
|
||||
} else if (this.innerHTML == "<icon>favorite</icon>") {
|
||||
remFav(itemid);
|
||||
await sleep(200);
|
||||
getFav();
|
||||
this.innerHTML = "<icon>favorite_border</icon>";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
async function myFunction() {
|
||||
if (window.pageYOffset >= sticky) {
|
||||
navbar.classList.add("sticky");
|
||||
navbar.classList.add("ontop");
|
||||
} else {
|
||||
navbar.classList.remove("sticky");
|
||||
navbar.classList.remove("ontop");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user