forked from randomuser691337/another-webdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
git@nova's optiplex
committed
Aug 24, 2024
1 parent
1d7fe4f
commit b84cd5c
Showing
5 changed files
with
64 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
var appid = window.location.search.split("?")[1] | ||
console.log(appid) | ||
document.addEventListener('DOMContentLoaded', async function() { | ||
document.querySelector("iframe").src=`https://novaos-appstore-repo.pages.dev/app/${appid}` | ||
var repoResponse = await fetch('https://novaos-appstore-repo.pages.dev/appstore.json'); | ||
repoResponse = await repoResponse.json(); | ||
repoResponse.applications.forEach(app => { | ||
if(app.id == appid){ | ||
console.log(app) | ||
var categories = app.category.split(",") | ||
// filter categories to remove all starting with "backend" | ||
categories = categories.filter(category => !category.startsWith("backend")) | ||
// make all categories sentence case | ||
categories = categories.map(category => category.charAt(0).toUpperCase() + category.slice(1)) | ||
// remove empty categories | ||
categories = categories.filter(category => category != "") | ||
// join categories with a comma | ||
categories = categories.join(", ") | ||
console.log(categories) | ||
document.querySelector("iframe").src=`https://pkgs.os.novafurry.win/${appid}/desc` | ||
var repoResponse = await fetch(`https://pkgs.os.novafurry.win/${appid}/meta.json`); | ||
document.querySelector('.loader').remove() | ||
document.querySelector('main').classList.remove("hide") | ||
console.log(repoResponse) | ||
app = await repoResponse.json(); | ||
document.querySelector('#appn').innerText = app.name | ||
document.querySelector('#appico').src = app.icon | ||
document.querySelector('#appdesc').innerText = app.description | ||
document.querySelector('#appdev').innerText = `${app.author}` | ||
document.querySelector('#appcat').innerText = `${categories}` | ||
} | ||
}); | ||
document.querySelector('#appdev').innerText = `${app.developer} - ` | ||
document.querySelector('#appcat').innerText = `${app.category} - ${app.specialTags.includes("Official") ? "Official" : ""} - ${app.specialTags.includes("Featured") ? "Featured" : ""}` | ||
if(app.specialTags.includes('quickRun')){ | ||
|
||
} | ||
else{ | ||
document.querySelector('#qr').remove() | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters