added clock 1 backend

This commit is contained in:
Justin 2023-08-29 19:40:10 +08:00 committed by GitHub
parent 09abfb297d
commit 3bbdbbe0a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ var jokesFeatures = document.querySelectorAll("#jokes-list li");
var marketFeatures = document.querySelectorAll("#market-list li"); var marketFeatures = document.querySelectorAll("#market-list li");
var sectorFeatures = document.querySelectorAll("#sector-list li"); var sectorFeatures = document.querySelectorAll("#sector-list li");
var placeFeatures = document.querySelectorAll("#place-list li"); var placeFeatures = document.querySelectorAll("#place-list li");
var clock1Features = document.querySelectorAll("#clock1-features li");
var allFeaturesList = [ var allFeaturesList = [
stocksFeatures, stocksFeatures,
@ -77,6 +78,7 @@ var allFeaturesList = [
marketFeatures, marketFeatures,
sectorFeatures, sectorFeatures,
placeFeatures, placeFeatures,
clock1Features,
]; ];
// features remove buttons // features remove buttons
@ -108,6 +110,7 @@ var jokesRemoveBtn = document.getElementById("jokes-remove-btn");
var marketRemoveBtn = document.getElementById("market-remove-btn"); var marketRemoveBtn = document.getElementById("market-remove-btn");
var sectorRemoveBtn = document.getElementById("sector-remove-btn"); var sectorRemoveBtn = document.getElementById("sector-remove-btn");
var placeRemoveBtn = document.getElementById("place-remove-btn"); var placeRemoveBtn = document.getElementById("place-remove-btn");
var clock1RemoveBtn = document.getElementById("clock1-remove-btn");
var allFeaturesRemoveBtns = [ var allFeaturesRemoveBtns = [
stocksRemoveBtn, stocksRemoveBtn,
@ -132,6 +135,7 @@ var allFeaturesRemoveBtns = [
marketRemoveBtn, marketRemoveBtn,
sectorRemoveBtn, sectorRemoveBtn,
placeRemoveBtn, placeRemoveBtn,
clock1RemoveBtn,
]; ];
// features increase buttons // features increase buttons
var stocksincreaseBtn = document.getElementById("stocks-increase-btn"); var stocksincreaseBtn = document.getElementById("stocks-increase-btn");
@ -162,6 +166,7 @@ var jokesincreaseBtn = document.getElementById("jokes-increase-btn");
var marketincreaseBtn = document.getElementById("market-increase-btn"); var marketincreaseBtn = document.getElementById("market-increase-btn");
var sectorincreaseBtn = document.getElementById("sector-increase-btn"); var sectorincreaseBtn = document.getElementById("sector-increase-btn");
var placeincreaseBtn = document.getElementById("place-increase-btn"); var placeincreaseBtn = document.getElementById("place-increase-btn");
var clock1increaseBtn = document.getElementById("clock1-increase-btn");
var allFeaturesIncreaseBtns = [ var allFeaturesIncreaseBtns = [
stocksincreaseBtn, stocksincreaseBtn,
@ -186,6 +191,7 @@ var allFeaturesIncreaseBtns = [
marketincreaseBtn, marketincreaseBtn,
sectorincreaseBtn, sectorincreaseBtn,
placeincreaseBtn, placeincreaseBtn,
clock1increaseBtn,
]; ];
// features decrease buttons // features decrease buttons
@ -217,6 +223,7 @@ var jokesDecreaseBtn = document.getElementById("jokes-decrease-btn");
var marketDecreaseBtn = document.getElementById("market-decrease-btn"); var marketDecreaseBtn = document.getElementById("market-decrease-btn");
var sectorDecreaseBtn = document.getElementById("sector-decrease-btn"); var sectorDecreaseBtn = document.getElementById("sector-decrease-btn");
var placeDecreaseBtn = document.getElementById("place-decrease-btn"); var placeDecreaseBtn = document.getElementById("place-decrease-btn");
var clock1DecreaseBtn = document.getElementById("clock1-decrease-btn");
var allFeaturesDecreaseBtns = [ var allFeaturesDecreaseBtns = [
stocksDecreaseBtn, stocksDecreaseBtn,
@ -241,6 +248,7 @@ var allFeaturesDecreaseBtns = [
marketDecreaseBtn, marketDecreaseBtn,
sectorDecreaseBtn, sectorDecreaseBtn,
placeDecreaseBtn, placeDecreaseBtn,
clock1DecreaseBtn,
]; ];
const changeVarValue = () => { const changeVarValue = () => {
@ -272,6 +280,7 @@ const changeVarValue = () => {
marketFeatures = document.querySelectorAll("#market-list li"); marketFeatures = document.querySelectorAll("#market-list li");
sectorFeatures = document.querySelectorAll("#sector-list li"); sectorFeatures = document.querySelectorAll("#sector-list li");
placeFeatures = document.querySelectorAll("#place-list li"); placeFeatures = document.querySelectorAll("#place-list li");
clock1Features = document.querySelectorAll("#clock1-features li");
allFeaturesList = [ allFeaturesList = [
stocksFeatures, stocksFeatures,
@ -296,6 +305,7 @@ const changeVarValue = () => {
marketFeatures, marketFeatures,
sectorFeatures, sectorFeatures,
placeFeatures, placeFeatures,
clock1Features,
]; ];
}; };
@ -678,6 +688,7 @@ var jokes = document.getElementById("jokes-list");
var market = document.getElementById("market-list"); var market = document.getElementById("market-list");
var sector = document.getElementById("sector-list"); var sector = document.getElementById("sector-list");
var place = document.getElementById("place-list"); var place = document.getElementById("place-list");
var clock1 = document.getElementById("clock1-features");
var allFeatures = [ var allFeatures = [
stocks, stocks,
@ -702,6 +713,7 @@ var allFeatures = [
market, market,
sector, sector,
place, place,
clock1
]; ];
// features select box // features select box
@ -739,6 +751,7 @@ var allFeaturesSelectBox = [
marketSelect, marketSelect,
sectorSelect, sectorSelect,
placeSelect, placeSelect,
null,
]; ];
// features select add buttons // features select add buttons
@ -776,6 +789,7 @@ var allFeaturesSelectAddBtn = [
marketAddBtn, marketAddBtn,
sectorAddBtn, sectorAddBtn,
placeAddBtn, placeAddBtn,
null,
]; ];
allFeaturesSelectAddBtn.map((value, index) => { allFeaturesSelectAddBtn.map((value, index) => {
@ -818,6 +832,7 @@ var allFeaturesFile = [
null, null,
null, null,
null, null,
null,
]; ];
// features file add button // features file add button
var imagesFileAddBtn = document.getElementById("inputTextBtn11"); var imagesFileAddBtn = document.getElementById("inputTextBtn11");
@ -846,6 +861,7 @@ var allFeaturesFileAddBtn = [
null, null,
null, null,
null, null,
null,
]; ];
// features input text // features input text
@ -881,6 +897,7 @@ var allFeaturesText = [
null, null,
null, null,
null, null,
null,
]; ];
// features text add button // features text add button
@ -916,6 +933,7 @@ var allFeaturesTextAddBtn = [
null, null,
null, null,
null, null,
null,
]; ];
@ -942,6 +960,7 @@ var allFeaturesLimit = [
null, null,
null, null,
null, null,
null,
]; ];
@ -1219,6 +1238,7 @@ function getFeatureSettings() {
"Gainers, Losers, Active", "Gainers, Losers, Active",
"Sector Performance", "Sector Performance",
"Place (Reddit)", "Place (Reddit)",
"Clock 1",
]; ];
let pageNum = features.indexOf(feature) + 1; let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString(); let pageSelector = "Page" + pageNum.toString();
@ -1296,6 +1316,9 @@ function getFeatureSettings() {
case 22: case 22:
s = getPlaceSettings(page); s = getPlaceSettings(page);
break; break;
case 23:
s = getClock1Settings(page);
break;
} }
settings = { ...settings, ...s }; // merge both sets of settings settings = { ...settings, ...s }; // merge both sets of settings
@ -1496,6 +1519,7 @@ function saveMovieAPIKey(){
"Gainers, Losers, Active", "Gainers, Losers, Active",
"Sector Performance", "Sector Performance",
"Place (Reddit)", "Place (Reddit)",
"Clock 1",
]; ];
let pageNum = features.indexOf(feature) + 1; let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString(); let pageSelector = "Page" + pageNum.toString();
@ -1542,6 +1566,7 @@ function saveIpoAPIKey(){
"Gainers, Losers, Active", "Gainers, Losers, Active",
"Sector Performance", "Sector Performance",
"Place (Reddit)", "Place (Reddit)",
"Clock 1",
]; ];
let pageNum = features.indexOf(feature) + 1; let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString(); let pageSelector = "Page" + pageNum.toString();
@ -2037,7 +2062,7 @@ inputAnimationBtn.addEventListener("click", () => {
// scroll speed row two // scroll speed row two
let inputScrollSpeedRow = []; let inputScrollSpeedRow = [];
for (let i = 1; i <= 22; i++) { for (let i = 1; i <= 23; i++) {
inputScrollSpeedRow.push( inputScrollSpeedRow.push(
document.getElementById( document.getElementById(
i === 1 ? "inputScrollSpeedRow" : `inputScrollSpeedRow${i}` i === 1 ? "inputScrollSpeedRow" : `inputScrollSpeedRow${i}`
@ -3452,7 +3477,7 @@ function featureSavePrompt() {
const pageIDs = ['Page1', 'Page2', 'Page3', 'Page4', 'Page5', 'Page6', 'Page7', 'Page8', 'Page9', 'Page10', 'Page11', 'Page12', 'Page13', const pageIDs = ['Page1', 'Page2', 'Page3', 'Page4', 'Page5', 'Page6', 'Page7', 'Page8', 'Page9', 'Page10', 'Page11', 'Page12', 'Page13',
'Page14', 'Page15', 'Page16', 'Page17', 'Page18', 'Page19', 'Page20', 'Page21', 'Page22']; 'Page14', 'Page15', 'Page16', 'Page17', 'Page18', 'Page19', 'Page20', 'Page21', 'Page22', 'Page23'];
for (const pageID of pageIDs) { for (const pageID of pageIDs) {
// Select the parent div // Select the parent div