bugfix
This commit is contained in:
parent
3a6eef93fb
commit
90fe3937bb
@ -959,7 +959,14 @@ function getDisplaying(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_page(){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// gets feature specific settings
|
||||||
|
function getFeatureSettings() {
|
||||||
|
|
||||||
let featureSelector = document.getElementById("drop");
|
let featureSelector = document.getElementById("drop");
|
||||||
feature = getSelected(featureSelector);
|
feature = getSelected(featureSelector);
|
||||||
let features = [
|
let features = [
|
||||||
@ -981,13 +988,6 @@ function get_page(){
|
|||||||
let pageSelector = "Page" + pageNum.toString();
|
let pageSelector = "Page" + pageNum.toString();
|
||||||
|
|
||||||
let page = document.getElementById(pageSelector);
|
let page = document.getElementById(pageSelector);
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
// gets feature specific settings
|
|
||||||
function getFeatureSettings() {
|
|
||||||
|
|
||||||
let page = get_page();
|
|
||||||
|
|
||||||
// these common to all settings
|
// these common to all settings
|
||||||
let speed = getSelected(page.querySelectorAll(".speed-select")[0]);
|
let speed = getSelected(page.querySelectorAll(".speed-select")[0]);
|
||||||
@ -1128,7 +1128,27 @@ function getWeatherSettings(page) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function saveWeatherAPIKey(){
|
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 api_key = page.querySelectorAll(".api-key")[0].value;
|
||||||
let settings = {
|
let settings = {
|
||||||
@ -1150,6 +1170,7 @@ var weatherAPIbtn = document.getElementById("weather-api-btn");
|
|||||||
weatherAPIbtn.addEventListener("click", saveWeatherAPIKey);
|
weatherAPIbtn.addEventListener("click", saveWeatherAPIKey);
|
||||||
|
|
||||||
function getNewsSettings(page) {
|
function getNewsSettings(page) {
|
||||||
|
/*
|
||||||
let country = getSelected(page.querySelectorAll(".country-select")[0]);
|
let country = getSelected(page.querySelectorAll(".country-select")[0]);
|
||||||
let category = getSelected(page.querySelectorAll(".category-select")[0]);
|
let category = getSelected(page.querySelectorAll(".category-select")[0]);
|
||||||
let title = page.querySelectorAll(".title-select")[0].checked;
|
let title = page.querySelectorAll(".title-select")[0].checked;
|
||||||
@ -1164,6 +1185,8 @@ function getNewsSettings(page) {
|
|||||||
// use_sources: use_sources,
|
// use_sources: use_sources,
|
||||||
sources: sources,
|
sources: sources,
|
||||||
};
|
};
|
||||||
|
* */
|
||||||
|
settings = {}
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user