Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SpeedRead #18

Merged
merged 14 commits into from
Sep 17, 2024
9 changes: 9 additions & 0 deletions public/appStore/appStoreData.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,14 @@
"author": "Mark Valentino",
"link": "https://github.com/M-Valentino",
"mode": "Download"
},
{
"name": "SpeedRead",
"dir": "/apps/speedRead",
"icon": "icon.png",
"description": "A text based application made so that users can increase their reading speed.",
"author": "Steven Blanco",
"link": "https://github.com/19sblanco/",
"mode": "Install"
}
]
Binary file added public/appStore/apps/speedRead/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions public/appStore/apps/speedRead/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
async function copyData() {
try {
const response = await fetch("/appStore/apps/speedRead/speedRead.html");

if (response.ok) {
const content = await response.text();
window.top.postMessage(`SF:[programs/speedRead.html]${content}`, "*");
return true;
} else {
console.error(`Error fetching file HTTP status ${response.status}`);
}
} catch (err) {
console.error(`Error fetching file : ${err}`);
}
return false;
}
async function install() {
window.top.postMessage("MK:F[programs/speedRead.html]", "*");
const installedCorrectly = await copyData();

if (installedCorrectly) {
window.top.postMessage("MK:MENU-SC[programs/speedRead.html");
window.top.postMessage("ALERT:[speedRead installed!");
} else {
window.top.postMessage("ALERT:[Could Not install speedRead.");
}
}

install();
Loading
Loading