Skip to content

Commit

Permalink
add alert functions for broken games
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNotSus committed Apr 13, 2024
1 parent 24043fd commit b23a6dd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
8 changes: 6 additions & 2 deletions static/assets/js/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ window.addEventListener("load", (event) => {
apps.forEach(function (game) {
let gameHtml;
gameHtml = `<div class="card" style="padding-top: 5px">
<a onclick="hire('${game.url}');">
<a onclick="${game.alert ? `alert('${game.alert}');` : ""} hire('${
game.url
}');">
<div class="image-container">
<img loading="lazy" src="${game.image}" style="border-radius: 25px">
<img loading="lazy" src="${
game.image
}" style="border-radius: 25px">
<p class="item-name">${game.name}</p>
</div>
</a>
Expand Down
16 changes: 12 additions & 4 deletions static/assets/js/games.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,26 @@ window.addEventListener("load", (event) => {
let gameHtml;
if (game.usesProxy) {
gameHtml = `<div class="card" style="padding-top: 5px">
<a onclick="hire('${game.url}');">
<a onclick="${game.alert ? `alert('${game.alert}');` : ""} hire('${
game.url
}');">
<div class="image-container">
<img loading="lazy" src="${game.image}" style="border-radius: 25px">
<img loading="lazy" src="${
game.image
}" style="border-radius: 25px">
<p class="item-name">${game.name}</p>
</div>
</a>
</div>`;
} else if (!game.usesProxy) {
gameHtml = `<div class="card" style="padding-top: 5px">
<a href="${game.url}" rel="noopener noreferrer">
<a href="${game.url}" rel="noopener noreferrer" ${
game.alert ? `onclick="alert('${game.alert}');"` : ""
}>
<div class="image-container">
<img loading="lazy" src="${game.image}" style="border-radius: 25px">
<img loading="lazy" src="${
game.image
}" style="border-radius: 25px">
<p class="item-name">${game.name}</p>
</div>
</a>
Expand Down
4 changes: 2 additions & 2 deletions static/assets/json/load/apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@
"name": "Roblox",
"link": "https://nowgg.nl/iframe/snippet?app_pkg=com.roblox.client&partner=55gms",
"image": "misc/roblos/rbx.jpeg",
"broken": "true"
"alert": "This app is currently not working."
},
{
"name": "Spotify",
"link": "https://open.spotify.com/",
"image": "assets/apps/spotify.png",
"broken": "true"
"alert": "This app is currently not working."
},
{
"name": "SoundCloud",
Expand Down
3 changes: 2 additions & 1 deletion static/assets/json/load/games.json
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,8 @@
"name": "Roblox",
"url": "https://educationbluesky.com/",
"image": "/misc/roblos/rbx.jpeg",
"usesProxy": true
"usesProxy": true,
"alert": "This is currently not working."
},
{
"name": "Roper",
Expand Down

0 comments on commit b23a6dd

Please sign in to comment.