This commit is contained in:
Neythen Treloar 2022-02-24 19:04:57 +00:00
parent 3a6eef93fb
commit 90fe3937bb

View File

@ -959,7 +959,14 @@ function getDisplaying(){
}
function get_page(){
// gets feature specific settings
function getFeatureSettings() {
let featureSelector = document.getElementById("drop");
feature = getSelected(featureSelector);
let features = [
@ -981,13 +988,6 @@ function get_page(){
let pageSelector = "Page" + pageNum.toString();
let page = document.getElementById(pageSelector);
return page;
}
// gets feature specific settings
function getFeatureSettings() {
let page = get_page();
// these common to all settings
let speed = getSelected(page.querySelectorAll(".speed-select")[0]);
@ -1128,7 +1128,27 @@ function getWeatherSettings(page) {
}
function saveWeatherAPIKey(){
let page = get_page();
let featureSelector = document.getElementById("drop");
feature = getSelected(featureSelector);
let features = [
"Stocks",
"Crypto",
"Forex",
"Current Weather",
"Daily Forecast",
"News",
"Sports (Upcoming Games)",
"Sports (Past Games)",
"Sports (Live Games)",
"Sports (Team Stats)",
"Custom Images",
"Custom GIFs",
"Custom Messages",
];
let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString();
let page = document.getElementById(pageSelector);
let api_key = page.querySelectorAll(".api-key")[0].value;
let settings = {
@ -1150,6 +1170,7 @@ var weatherAPIbtn = document.getElementById("weather-api-btn");
weatherAPIbtn.addEventListener("click", saveWeatherAPIKey);
function getNewsSettings(page) {
/*
let country = getSelected(page.querySelectorAll(".country-select")[0]);
let category = getSelected(page.querySelectorAll(".category-select")[0]);
let title = page.querySelectorAll(".title-select")[0].checked;
@ -1164,6 +1185,8 @@ function getNewsSettings(page) {
// use_sources: use_sources,
sources: sources,
};
* */
settings = {}
return settings;
}