fix games and apps stars
This commit is contained in:
@ -40,7 +40,7 @@ async function loadGames() {
|
||||
gamesElement.appendChild(newElement);
|
||||
elements.push(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${encodeURIComponent(element.name)}&dir=${element.directory}&img=${element.image}`
|
||||
location.href=`/loader.html?title=${encodeURIComponent(element.name)}&dir=${element.directory}&img=${element.image}&type=a`
|
||||
});
|
||||
star.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
@ -109,7 +109,7 @@ function starEvent(e) {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=a`
|
||||
});
|
||||
})
|
||||
} else {
|
||||
@ -129,7 +129,7 @@ function starEvent(e) {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=a`
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ function starEvent(e) {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=g`
|
||||
});
|
||||
})
|
||||
} else {
|
||||
@ -129,7 +129,7 @@ function starEvent(e) {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=g`
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user