diff --git a/web/src/about.html b/web/src/about.html deleted file mode 100644 index a763c88..0000000 --- a/web/src/about.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - EveryNasa - - - - - - - -

EveryNasa

-

Version 2.3.2

-

Automatic space wallpaper from Nasa

-

Copyright 2022-2023 Redume

-

This program is licensed under the GPLv3.

-

The source code is available at GitHub

-

Contact

-
-
-
- - - -
-
-
- - - - - - \ No newline at end of file diff --git a/web/static/scripts/analytics.js b/web/static/scripts/analytics.js deleted file mode 100644 index 82f5db7..0000000 --- a/web/static/scripts/analytics.js +++ /dev/null @@ -1,27 +0,0 @@ -import { initializeApp } from "https://www.gstatic.com/firebasejs/9.14.0/firebase-app.js"; -import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.14.0/firebase-analytics.js"; - -$.ajax({ - url: 'http://localhost:3000/api/get/settings', - type: 'GET', - dataType: 'json', - success: function (data) { - if (data["analytics"] === 1) { - const firebaseConfig = { - apiKey: "AIzaSyCeHtV4wmB9xJY4vfcpt7wX-WvlV-5S6v4", - authDomain: "everynasa-181a1.firebaseapp.com", - databaseURL: "https://everynasa-181a1-default-rtdb.firebaseio.com", - projectId: "everynasa-181a1", - storageBucket: "everynasa-181a1.appspot.com", - messagingSenderId: "369869513900", - appId: "1:369869513900:web:2ff68e57f95a36bf87ab09", - measurementId: "G-JN83RYFK56" - }; - - const app = initializeApp(firebaseConfig); - getAnalytics(app); - } else { - $("#analytics").remove(); - } - } -}) \ No newline at end of file diff --git a/web/static/scripts/switch.js b/web/static/scripts/switch.js index bb39e71..a88b392 100644 --- a/web/static/scripts/switch.js +++ b/web/static/scripts/switch.js @@ -8,9 +8,6 @@ $(document).ready(async function() { const $loggingSwitch = $("#settings_saveLoggSwitch"); const $loggingSwitchTogglerName = $("#settings_saveLoggTogglerName"); - const $analyticsSwitch = $("#settings_analyticsSwitch"); - const $analyticsSwitchTogglerName = $("#settings_analyticsTogglerName"); - getSettings().then((data) => { if (data["wallpaper"] === 1) { $wallpaperSwitch.attr("checked", "true"); @@ -24,13 +21,9 @@ $(document).ready(async function() { $loggingSwitch.attr("checked", "true"); $loggingSwitchTogglerName.text("On"); } - if (data["analytics"] === 1) { - $analyticsSwitch.attr("checked", "true"); - $analyticsSwitchTogglerName.text("On"); - } }); - $wallpaperSwitch.click(async function() { + $wallpaperSwitch.click(async function () { $.ajax({ url: "http://localhost:3000/api/get/settings", type: "GET", @@ -43,7 +36,7 @@ $(document).ready(async function() { "wallpaper": 0, }, success: function (data) { - if(data["status"]) { + if (data["status"]) { $wallpaperSwitchTogglerName.text("Off"); $wallpaperSwitch.removeAttr("checked"); @@ -61,7 +54,7 @@ $(document).ready(async function() { "wallpaper": 1, }, success: function (data) { - if(data["status"]) { + if (data["status"]) { $wallpaperSwitchTogglerName.text("On"); $wallpaperSwitch.attr("checked", "true"); @@ -76,7 +69,7 @@ $(document).ready(async function() { }) }); - $startupSwitch.click(async function() { + $startupSwitch.click(async function () { $.ajax({ url: "http://localhost:3000/api/get/settings", type: "GET", @@ -125,7 +118,7 @@ $(document).ready(async function() { }); }); - $loggingSwitch.click(async function() { + $loggingSwitch.click(async function () { $.ajax({ url: "http://localhost:3000/api/get/settings", type: "GET", @@ -138,7 +131,7 @@ $(document).ready(async function() { "save_logg": 0, }, success: function (data) { - if(data["status"]) { + if (data["status"]) { $loggingSwitchTogglerName.text("Off"); $loggingSwitch.removeAttr("checked"); @@ -156,7 +149,7 @@ $(document).ready(async function() { "save_logg": 1, }, success: function (data) { - if(data["status"]) { + if (data["status"]) { $loggingSwitchTogglerName.text("On"); $loggingSwitch.attr("checked", "true"); @@ -170,62 +163,8 @@ $(document).ready(async function() { }, }); }); - - $analyticsSwitch.click(async function() { - $.ajax({ - url: "http://localhost:3000/api/get/settings", - type: "GET", - success: function (data) { - if (data["analytics"] === 1) { - $.ajax({ - url: "http://localhost:3000/api/update/settings", - type: "POST", - data: { - "analytics": 0, - }, - success: function (data) { - if(data["status"]) { - $analyticsSwitchTogglerName.text("Off"); - $analyticsSwitch.removeAttr("checked"); - - $("#analytics").remove(); - - toast(data.message); - } else { - toast("Failed to apply settings."); - } - }, - }); - } else { - $.ajax({ - url: "http://localhost:3000/api/update/settings", - type: "POST", - data: { - "analytics": 1, - }, - success: function (data) { - if(data["status"]) { - $analyticsSwitchTogglerName.text("On"); - $analyticsSwitch.attr("checked", "true"); - - $("body").append("") - - toast(data.message); - } else { - toast("Failed to apply settings."); - } - }, - }); - } - }, - }); - }); }); -/** - * @param {String} message - */ - function toast(message) { if (message === null) { return "Required parameter 'message' is missing."; @@ -237,10 +176,6 @@ function toast(message) { toast.show(); } -/** - * @param {Number} i - */ - function editStartup(i) { if (i !== 1 || i !== 0 || i === null) { return "Required parameter 'i' is missing.";