Some testing & cleanup

This commit is contained in:
2024-02-09 20:34:55 +01:00
parent 1be97536ef
commit fcb3642ac5
19 changed files with 957 additions and 161 deletions

View File

@@ -10,8 +10,7 @@ atv.onAppEntry = function () {
fetchSettings(function() {
overrideConsoleLog();
console.log("Successfully overwritten console log, sending logs to JCATHOST now.")
console.log("Received ATVCSETTINGS From JCATHOST.");
console.log("Starting JellyCAT-JS on AppleTV...")
console.log("Received ATVCSETTINGS From JCATHOST. And starting JellyCAT-APP-JS on AppleTV...");
jcatMain();
});
}
@@ -22,16 +21,16 @@ atv.onAppExit = function() {
// ***************************************************
// JellyCAT Main | Main JS app function
// Help
// Help I'm even worse at JS
function jcatMain(){
atvutils.loadURL("https://" + atv.jcathost.SigHost + "/xml/home.xml");
atvutils.loadURL("https://" + atv.jcathost.SigHost + "/xml/devtools.xml");
}
// ***************************************************
// JellyCAT Logger | Jclogger
// Function to override console.log, console.error, and console.warn and send logs to the JellyCAT stHack server
// We shall never send any sensitive information!!
function overrideConsoleLog() {
var originalConsoleLog = console.log;
var originalConsoleError = console.error;
@@ -81,7 +80,7 @@ function logToServer(logData) {
// ***************************************************
// JellyCAT Host fetcher
// Function to fetch information we need from the host server
// Function to fetch JSON from the HTTP URL using XMLHttpRequest
// fetch JSON from the HTTP URL using XMLHttpRequest
function fetchSettings(callback) {
var xhr = new XMLHttpRequest();