settings data sent to python

This commit is contained in:
Neythen 2021-09-16 20:23:04 +01:00
parent aebc39c459
commit 7f70594aaf
18 changed files with 230 additions and 87 deletions

View File

@ -1,4 +1,4 @@
symbol,name,base,current,24hr change symbol,name,base,current,24hr change
BTC,bitcoin,usd,44853,-1.3387863974192384 BTC,bitcoin,usd,47722,-0.7326547346313347
ETH,ethereum,gbp,2200.08,-3.096695901831838 ETH,ethereum,gbp,2598.0,1.1392072549969245
DOGE,dogecoin,usd,0.299933,-4.44177217118751 DOGE,dogecoin,usd,0.240296,-2.648548292305624

1 symbol name base current 24hr change
2 BTC bitcoin usd 44853 47722 -1.3387863974192384 -0.7326547346313347
3 ETH ethereum gbp 2200.08 2598.0 -3.096695901831838 1.1392072549969245
4 DOGE dogecoin usd 0.299933 0.240296 -4.44177217118751 -2.648548292305624

View File

@ -1 +1 @@
["USD", {"AUD": [1.3793, 1.3715], "CAD": [1.2619, 1.261], "CHF": [0.91495, 0.91043], "EUR": [0.85302, 0.84983], "GBP": [0.72663, 0.7251], "JPY": [109.76, 109.26], "NZD": [1.4484, 1.4433]}] ["USD", {"AUD": [1.3667, 1.3661], "CAD": [1.2635, 1.2689], "CHF": [0.92544, 0.9172], "EUR": [0.85012, 0.84574], "GBP": [0.72282, 0.72319], "JPY": [109.39, 109.19], "NZD": [1.4068, 1.4095]}]

View File

@ -1 +1 @@
[{"main_weather": "Clouds", "description": "broken clouds", "temp": 27.85, "min_temp": 27.43, "max_temp": 29.18, "feels_like": 32.32, "humidity": 84, "clouds": 71, "wind_speed": 0.45, "wind_direction": 22, "visibility": 10000, "uv": 0, "rain_chance": 0.39}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 19.09, "min_temp": 15.63, "max_temp": 20.92, "feels_like": 18.93, "humidity": 72, "clouds": 90, "wind_speed": 6.17, "wind_direction": 240, "visibility": 10000, "uv": 0, "rain_chance": 0}] [{"main_weather": "Clouds", "description": "broken clouds", "temp": 28.17, "min_temp": 28.16, "max_temp": 30.46, "feels_like": 32.2, "humidity": 78, "clouds": 70, "wind_speed": 1.94, "wind_direction": 281, "visibility": 10000, "uv": 0, "rain_chance": 0.01}, {"main_weather": "Clouds", "description": "overcast clouds", "temp": 18.07, "min_temp": 14.53, "max_temp": 22.82, "feels_like": 18.02, "humidity": 80, "clouds": 100, "wind_speed": 3.19, "wind_direction": 209, "visibility": 10000, "uv": 0, "rain_chance": 0}]

View File

@ -1 +1 @@
[[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.43, "max_temp": 29.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.34, "max_temp": 29.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.34, "max_temp": 29.2}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.37, "max_temp": 29.2}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.4, "max_temp": 29.18}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.23, "max_temp": 28.96}, {"main_weather": "Rain", "description": "light rain", "min_temp": 26.9, "max_temp": 29.16}, {"main_weather": "Rain", "description": "light rain", "min_temp": 26.98, "max_temp": 29}], [{"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 15.63, "max_temp": 20.92}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.31, "max_temp": 21.54}, {"main_weather": "Clouds", "description": "few clouds", "min_temp": 13.65, "max_temp": 24.72}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 16.1, "max_temp": 25.02}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.67, "max_temp": 23.79}, {"main_weather": "Rain", "description": "light rain", "min_temp": 16.75, "max_temp": 22.96}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 14.97, "max_temp": 23.48}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.44, "max_temp": 22.67}]] [[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.16, "max_temp": 30.46}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.66, "max_temp": 29.22}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.51, "max_temp": 29.01}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.63, "max_temp": 29.33}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.52, "max_temp": 29.44}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.63, "max_temp": 29.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.02, "max_temp": 28.59}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.86, "max_temp": 27.62}], [{"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 14.53, "max_temp": 22.82}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 13.83, "max_temp": 21.66}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.97, "max_temp": 23.29}, {"main_weather": "Rain", "description": "light rain", "min_temp": 15.9, "max_temp": 20.96}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 13.74, "max_temp": 19.77}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 10.61, "max_temp": 19.19}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.09, "max_temp": 19.06}, {"main_weather": "Rain", "description": "light rain", "min_temp": 11.51, "max_temp": 16.53}]]

View File

@ -1 +1 @@
["Crypto Prof", "Forex Prof", "Stocks Prof"] ["Stocks", "Crypto", "Forex"]

View File

@ -1,21 +1,21 @@
headline,source,date,time headline,source,date,time
US recommends Pfizer and Moderna Covid vaccine boosters live - The Guardian,The Guardian,2021-08-18,18:32:47Z Michael Gove faces calls to return £100k in donations from property developer - The Guardian,The Guardian,2021-09-16,18:36:00Z
Surprising health benefits of turmeric you should know about - Times of India,The Times of India,2021-08-18,18:30:00Z Fake Covid vaccination card market booms - NBC News,NBC News,2021-09-16,18:25:41Z
Vaccine stockpiling by nations could lead to increase in COVID-19 cases^ novel variant emergence - Princeton University,Princeton University,2021-08-18,18:21:30Z Labour fears Dominic Raab will target rights act in new justice post - The Guardian,The Guardian,2021-09-16,18:17:00Z
Covid-19 Live: New mask rules in place as NZ wakes to day two of lockdown - Stuff.co.nz,Stuff.co.nz,2021-08-18,18:20:00Z New bodycam video shows emotional Gabby Petito after reported fight with fiancé in Utah - NBC News,NBC News,2021-09-16,18:16:13Z
'Shadow waveguide' casts complex acoustic patterns to control particles - Phys.org,Phys.Org,2021-08-18,18:00:15Z Brexit triumph as Crown Stamp returns to pint glasses after bonfire of EU rules - Telegraph.co.uk,Telegraph.co.uk,2021-09-16,18:08:00Z
Mystery of the seadragon solved - Phys.org,Phys.Org,2021-08-18,18:00:07Z Plants evolved complexity in two bursts—with a 250-million-year hiatus - Phys.org,Phys.Org,2021-09-16,18:00:07Z
Deaths of serving policeman and his three year old son investigated as a murder-suicide - Daily Mail,Daily Mail,2021-08-18,17:53:56Z Apple's next big technology was absent at the iPhone 13 launch^ but Tim Cook says he's still a fan - CNBC,CNBC,2021-09-16,17:58:12Z
Healthcare workers in the third wave: 'We are living in the shadows of death' | Health24 - News24,News24,2021-08-18,17:53:52Z The Impact Of Cyber Attackers Exploiting New iPhone Software Vulnerability - Newstalk,Newstalk,2021-09-16,17:51:26Z
Sleep deprivation impacting Irish surgeons at work^ study finds - The Irish Times,The Irish Times,2021-08-18,17:51:04Z Government did not advise President Higgins against attending service^ it says - The Irish Times,The Irish Times,2021-09-16,17:48:47Z
Porter Airlines^ other companies to require COVID-19 vaccine or negative test for all staff - CBC.ca,CBC News,2021-08-18,17:45:48Z More than half of Manitoba's new COVID-19 cases unvaccinated - CTV News Winnipeg,Ctvnews.ca,2021-09-16,17:42:21Z
40 million T-Mobile customers hit by US data breach - BBC News,BBC News,2021-08-18,17:44:59Z Several Rockets Strike Kabul City District: Report - NDTV,NDTV News,2021-09-16,17:38:00Z
For the Afghans who make it through Taliban checkpoints^ Kabul airport is a gateway to a new world - CNN,CNN,2021-08-18,17:39:00Z Freddie Combs dead: X Factor star dies aged 49 from kidney failure - The Mirror,Mirror Online,2021-09-16,17:36:42Z
Estudiante desaparecido en el nevado del Tolima fue encontrado sin vida - El Tiempo,Google News,2021-08-18,17:26:27Z Canada must 'learn from' the pandemic crisis in parts of the West^ Tam says - CBC.ca,CBC News,2021-09-16,17:36:08Z
Founder of homeless charity dies in tragic circumstances - Irish Examiner,Irish Examiner,2021-08-18,17:26:00Z Duque confirmó las fechas para los tres días sin IVA - El Tiempo,Google News,2021-09-16,17:33:15Z
ENG vs IND: Virat Kohli "The Most Foul Mouthed Individual"^ Says Nick Compton; Gets Hammered On Twitter | Cricket News - NDTVSports.com,NDTV News,2021-08-18,17:25:00Z Police Arrested The South Carolina Lawyer Who They Said Planned His Own Killing For An Insurance Payout - BuzzFeed News,BuzzFeed News,2021-09-16,17:32:00Z
Lonely flies^ like many humans^ eat more and sleep less - Science Daily,Science Daily,2021-08-18,17:23:37Z Love triangle ends in bloodshed as taxi owner shoots lover and her alleged boyfriend - IOL,IOL,2021-09-16,17:31:20Z
Garth Brooks cancels stadium tour in Baltimore due to Delta variant surge - WBAL TV Baltimore,WBAL TV Baltimore,2021-08-18,17:15:00Z BBNaija S6: Nini^ Saga receive strikes for flouting house rules - Punch Newspapers,The Punch,2021-09-16,17:24:54Z
Vaccines protection against virus infection is waning^ C.D.C. studies suggest. - The New York Times,New York Times,2021-08-18,17:13:34Z Alberta reverses hands-off approach to Covid to tackle crisis of unvaccinated - The Guardian,The Guardian,2021-09-16,17:24:00Z
Red Sox's epic collapse is 'frustrating' Alex Cora - New York Post ,New York Post,2021-08-18,17:11:17Z House Democrats tax plan would increase marriage penalty for wealthy couples - CNBC,CNBC,2021-09-16,17:21:55Z
Irish banker earned more than €16m in 2019 - The Irish Times,The Irish Times,2021-08-18,17:07:14Z First Looks: Canon EOS R3 - Geek Culture,Geek Culture,2021-09-16,17:19:16Z

Can't render this file because it contains an unexpected character in line 16 and column 25.

View File

@ -1 +1 @@
[{"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Aston Villa", "home_score": null, "away_team": "Newcastle", "away_score": null}, {"date": "2021-08-21", "time": "16:30:00", "round": "2", "home_team": "Brighton", "home_score": null, "away_team": "Watford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Crystal Palace", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Leeds", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-08-21", "time": "11:30:00", "round": "2", "home_team": "Liverpool", "home_score": null, "away_team": "Burnley", "away_score": null}, {"date": "2021-08-21", "time": "14:00:00", "round": "2", "home_team": "Man City", "home_score": null, "away_team": "Norwich", "away_score": null}, {"date": "2021-08-22", "time": "15:30:00", "round": "2", "home_team": "Arsenal", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-08-22", "time": "13:00:00", "round": "2", "home_team": "Southampton", "home_score": null, "away_team": "Man United", "away_score": null}, {"date": "2021-08-22", "time": "13:00:00", "round": "2", "home_team": "Wolves", "home_score": null, "away_team": "Tottenham", "away_score": null}, {"date": "2021-08-23", "time": "19:00:00", "round": "2", "home_team": "West Ham", "home_score": null, "away_team": "Leicester", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Aston Villa", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Brighton", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-08-28", "time": "16:30:00", "round": "3", "home_team": "Liverpool", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-08-28", "time": "11:30:00", "round": "3", "home_team": "Man City", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Newcastle", "home_score": null, "away_team": "Southampton", "away_score": null}] [{"date": "2021-09-17", "time": "19:00:00", "round": "5", "home_team": "Newcastle", "home_score": null, "away_team": "Leeds", "away_score": null}, {"date": "2021-09-18", "time": "16:30:00", "round": "5", "home_team": "Aston Villa", "home_score": null, "away_team": "Everton", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Burnley", "home_score": null, "away_team": "Arsenal", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Liverpool", "home_score": null, "away_team": "Crystal Palace", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Man City", "home_score": null, "away_team": "Southampton", "away_score": null}, {"date": "2021-09-18", "time": "14:00:00", "round": "5", "home_team": "Norwich", "home_score": null, "away_team": "Watford", "away_score": null}, {"date": "2021-09-18", "time": "11:30:00", "round": "5", "home_team": "Wolves", "home_score": null, "away_team": "Brentford", "away_score": null}, {"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "Brighton", "home_score": null, "away_team": "Leicester", "away_score": null}, {"date": "2021-09-19", "time": "15:30:00", "round": "5", "home_team": "Tottenham", "home_score": null, "away_team": "Chelsea", "away_score": null}, {"date": "2021-09-19", "time": "13:00:00", "round": "5", "home_team": "West Ham", "home_score": null, "away_team": "Man United", "away_score": null}, {"date": "2021-09-25", "time": "16:30:00", "round": "6", "home_team": "Brentford", "home_score": null, "away_team": "Liverpool", "away_score": null}, {"date": "2021-09-25", "time": "11:30:00", "round": "6", "home_team": "Chelsea", "home_score": null, "away_team": "Man City", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Everton", "home_score": null, "away_team": "Norwich", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leeds", "home_score": null, "away_team": "West Ham", "away_score": null}, {"date": "2021-09-25", "time": "14:00:00", "round": "6", "home_team": "Leicester", "home_score": null, "away_team": "Burnley", "away_score": null}]

View File

@ -1 +1 @@
[{"date": "2021-08-15", "time": "15:30:00", "round": "1", "home_team": "Tottenham", "home_score": "1", "away_team": "Man City", "away_score": "0"}, {"date": "2021-08-15", "time": "13:00:00", "round": "1", "home_team": "Newcastle", "home_score": "2", "away_team": "West Ham", "away_score": "4"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Watford", "home_score": "3", "away_team": "Aston Villa", "away_score": "2"}, {"date": "2021-08-14", "time": "16:30:00", "round": "1", "home_team": "Norwich", "home_score": "0", "away_team": "Liverpool", "away_score": "3"}, {"date": "2021-08-14", "time": "11:30:00", "round": "1", "home_team": "Man United", "home_score": "5", "away_team": "Leeds", "away_score": "1"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Leicester", "home_score": "1", "away_team": "Wolves", "away_score": "0"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Everton", "home_score": "3", "away_team": "Southampton", "away_score": "1"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Chelsea", "home_score": "3", "away_team": "Crystal Palace", "away_score": "0"}, {"date": "2021-08-14", "time": "14:00:00", "round": "1", "home_team": "Burnley", "home_score": "1", "away_team": "Brighton", "away_score": "2"}, {"date": "2021-08-13", "time": "19:00:00", "round": "1", "home_team": "Brentford", "home_score": "2", "away_team": "Arsenal", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Wolves", "home_score": "1", "away_team": "Man United", "away_score": "2"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "West Ham", "home_score": "3", "away_team": "Southampton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Sheffield United", "home_score": "1", "away_team": "Burnley", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Man City", "home_score": "5", "away_team": "Everton", "away_score": "0"}, {"date": "2021-05-23", "time": "15:00:00", "round": "38", "home_team": "Liverpool", "home_score": "2", "away_team": "Crystal Palace", "away_score": "0"}] [{"date": "2021-09-13", "time": "19:00:00", "round": "4", "home_team": "Everton", "home_score": "3", "away_team": "Burnley", "away_score": "1"}, {"date": "2021-09-12", "time": "15:30:00", "round": "4", "home_team": "Leeds", "home_score": "0", "away_team": "Liverpool", "away_score": "3"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Watford", "home_score": "0", "away_team": "Wolves", "away_score": "2"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Southampton", "home_score": "0", "away_team": "West Ham", "away_score": "0"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Man United", "home_score": "4", "away_team": "Newcastle", "away_score": "1"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Leicester", "home_score": "0", "away_team": "Man City", "away_score": "1"}, {"date": "2021-09-11", "time": "11:30:00", "round": "4", "home_team": "Crystal Palace", "home_score": "3", "away_team": "Tottenham", "away_score": "0"}, {"date": "2021-09-11", "time": "16:30:00", "round": "4", "home_team": "Chelsea", "home_score": "3", "away_team": "Aston Villa", "away_score": "0"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Brentford", "home_score": "0", "away_team": "Brighton", "away_score": "1"}, {"date": "2021-09-11", "time": "14:00:00", "round": "4", "home_team": "Arsenal", "home_score": "1", "away_team": "Norwich", "away_score": "0"}, {"date": "2021-08-29", "time": "15:30:00", "round": "3", "home_team": "Wolves", "home_score": "0", "away_team": "Man United", "away_score": "1"}, {"date": "2021-08-29", "time": "13:00:00", "round": "3", "home_team": "Tottenham", "home_score": "1", "away_team": "Watford", "away_score": "0"}, {"date": "2021-08-29", "time": "13:00:00", "round": "3", "home_team": "Burnley", "home_score": "1", "away_team": "Leeds", "away_score": "1"}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "West Ham", "home_score": "2", "away_team": "Crystal Palace", "away_score": "2"}, {"date": "2021-08-28", "time": "14:00:00", "round": "3", "home_team": "Norwich", "home_score": "1", "away_team": "Leicester", "away_score": "2"}]

View File

@ -1,4 +1,4 @@
name,current,opening name,current,opening
MSFT,292.24,291.83 MSFT,304.21,303.88
NFLX,523.04,519.94 NFLX,586.72,583.95
GOOG,2748.74,2742.12 GOOG,2895.85,2902.95

1 name current opening
2 MSFT 292.24 304.21 291.83 303.88
3 NFLX 523.04 586.72 519.94 583.95
4 GOOG 2748.74 2895.85 2742.12 2902.95

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -318,6 +318,15 @@ def display_format():
print(professional) print(professional)
return index() return index()
@app.route("/feature_settings", methods = ['PUT', 'POST', 'GET'])
def feature_settings():
data = str(request.data)
print('feature settings')
print(data)
return index()
@app.route("/stop") @app.route("/stop")
def stop(): def stop():
print('stop') print('stop')

View File

@ -598,7 +598,7 @@ var dispFormatButton = document.getElementById("dispformat-btn");
var displayFormats = document.getElementById("inputDisplayFormat"); var displayFormats = document.getElementById("inputDisplayFormat");
// gets selected functions to display
function getSelected(selector) { function getSelected(selector) {
var opt; var opt;
for ( var i = 0, len = selector.options.length; i < len; i++ ) { for ( var i = 0, len = selector.options.length; i < len; i++ ) {
@ -610,6 +610,17 @@ function getSelected(selector) {
return opt.innerHTML; return opt.innerHTML;
} }
function getListItems(list_el) {
let symbols = list_el.getElementsByTagName("li");
let items = []
for (var i = 0; i < symbols.length; ++i) {
items.push(symbols[i].innerText);
}
return items;
}
// start the display // start the display
dispFormatButton.addEventListener("click", () => { dispFormatButton.addEventListener("click", () => {
@ -620,6 +631,8 @@ dispFormatButton.addEventListener("click", () => {
}); });
}); });
// saves the feature specific settings
function saveSettings() { function saveSettings() {
let featureSelector = document.getElementById("drop"); let featureSelector = document.getElementById("drop");
feature = getSelected(featureSelector); feature = getSelected(featureSelector);
@ -630,17 +643,138 @@ function saveSettings() {
let page = document.getElementById(pageSelector); let page = document.getElementById(pageSelector);
// these common to all settings
let speed = getSelected(page.querySelectorAll(".speed-select")[0]); let speed = getSelected(page.querySelectorAll(".speed-select")[0]);
let animation = getSelected(page.querySelectorAll(".animation-select")[0]); let animation = getSelected(page.querySelectorAll(".animation-select")[0]);
console.log(speed); var settings = {'feature': feature, 'speed':speed, 'animation':animation}; // general settings
console.log(animation);
var s;
//function specific settings
switch(pageNum){
case 1: case 2: case 3:
s = getTradingSettings(page);
break;
case 4: case 5:
s = getWeatherSettings(page);
break;
case 6:
s = getNewsSettings(page);
break;
case 7: case 8: case 9: case 10:
s = getSportsSettings(page);
break;
case 11: case 12:
s = getImageSettings(page);
break;
case 13:
s = getMessageSettings(page);
break;
}
settings = {...settings, ...s}; // merge both sets of settings
console.log(settings);
fetch("/feature_settings", {
method:"PUT",
body:JSON.stringify(settings)
});
} }
let saveSettingsButtons = document.querySelectorAll(".save-btn-div").forEach(button => let saveSettingsButtons = document.querySelectorAll(".save-btn-div").forEach(button =>
button.addEventListener("click", saveSettings) button.addEventListener("click", saveSettings)
) )
// gets the stock, crypto or forex specific settings
function getTradingSettings(page) {
// get all the tick boxes
let percent = page.querySelectorAll(".percent-select")[0].checked;
let point = page.querySelectorAll(".point-select")[0].checked;
let no_logos = page.querySelectorAll(".logo-select")[0].checked;
let chart = page.querySelectorAll(".chart-select")[0].checked;
let title = page.querySelectorAll(".title-select")[0].checked;
let symbols_el = page.querySelectorAll(".symbol-list")[0];
let symbols = getListItems(symbols_el);
let settings = {'percent': percent, 'point':point, 'no_logos':no_logos, 'chart':chart, 'title': title, 'symbols': symbols}
return settings;
}
// gets the current wether and forecast settings
function getWeatherSettings(page) {
let temp = getSelected(page.querySelectorAll(".temp-select")[0]);
let speed = getSelected(page.querySelectorAll(".wind-speed-select")[0]);
let colour = getSelected(page.querySelectorAll(".colour-select")[0]);
let city_colour = getSelected(page.querySelectorAll(".city-colour-select")[0]);
let title = page.querySelectorAll(".title-select")[0].checked;
settings = {'temp':temp, 'speed': speed, 'colour':colour, 'city_colour':city_colour, 'title': title}
//only for daily weather
try {
current_weather = page.querySelectorAll(".current-weather-select")[0].checked;
console.log(current_weather);
settings['current_weather'] = current_weather;
} catch {
}
let cities_el = page.querySelectorAll(".city-list")[0];
let cities = getListItems(cities_el);
settings['cities'] = cities;
return settings;
}
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;
let sources_el = page.querySelectorAll(".sources-list")[0];
let sources = getListItems(sources_el);
settings = {'country':country, 'category': category, 'title':title, 'sources': sources};
return settings;
}
function getSportsSettings(page){
let title = page.querySelectorAll(".title-select")[0].checked;
let leagues_el = page.querySelectorAll(".league-list")[0];
leagues = getListItems(leagues_el);
settings = {'title':title, 'leagues':leagues};
return settings;
}
//images and GIFs
function getImageSettings(page){
let pause = page.querySelectorAll(".pause-select")[0].value;
let title = page.querySelectorAll(".title-select")[0].checked;
let images_el = page.querySelectorAll(".image-list")[0];
images = getListItems(images_el);
settings = {'title':title, 'pause':pause, 'images':images};
return settings;
}
function getMessageSettings(page) {
}

View File

@ -15,7 +15,7 @@
<script <script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous" crossorigin="anonymous"page
></script> ></script>
<!-- Fontawesome - for icons --> <!-- Fontawesome - for icons -->
@ -324,7 +324,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input percent-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked" id="flexCheckChecked"
@ -340,7 +340,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input point-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked2" id="flexCheckChecked2"
@ -351,13 +351,13 @@
<div class="row g-3 align-items-center left-div"> <div class="row g-3 align-items-center left-div">
<div class="col-auto"> <div class="col-auto">
<label for="inputTransition" class="col-form-label" <label for="inputTransition" class="col-form-label "
>Display Company Logos >Display Company Logos
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input logo-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked3" id="flexCheckChecked3"
@ -368,13 +368,13 @@
<div class="row g-3 align-items-center left-div"> <div class="row g-3 align-items-center left-div">
<div class="col-auto"> <div class="col-auto">
<label for="inputTransition" class="col-form-label" <label for="inputTransition" class="col-form-label "
>Display Intraday Chart >Display Intraday Chart
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input chart-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked4" id="flexCheckChecked4"
@ -390,7 +390,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked5" id="flexCheckChecked5"
@ -404,7 +404,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="stocks-features" id="stocks-features"
class="display-features-list text-dark" class="display-features-list text-dark symbol-list"
> >
<li>APL</li> <li>APL</li>
<li>FB</li> <li>FB</li>
@ -530,7 +530,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input percent-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked6" id="flexCheckChecked6"
@ -546,7 +546,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input point-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked7" id="flexCheckChecked7"
@ -563,7 +563,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input logo-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked8" id="flexCheckChecked8"
@ -580,7 +580,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input chart-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked9" id="flexCheckChecked9"
@ -596,7 +596,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked10" id="flexCheckChecked10"
@ -610,7 +610,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="crypto-features" id="crypto-features"
class="display-features-list text-dark" class="display-features-list text-dark symbol-list"
> >
<li>NEO,USD</li> <li>NEO,USD</li>
<li>BTC,USD</li> <li>BTC,USD</li>
@ -732,7 +732,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input percent-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked11" id="flexCheckChecked11"
@ -748,7 +748,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input point-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked12" id="flexCheckChecked12"
@ -765,7 +765,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input logo-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked13" id="flexCheckChecked13"
@ -782,7 +782,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input chart-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked14" id="flexCheckChecked14"
@ -798,7 +798,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked15" id="flexCheckChecked15"
@ -812,7 +812,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="forex-features" id="forex-features"
class="display-features-list text-dark" class="display-features-list text-dark symbol-list"
> >
<li>NZD,USD</li> <li>NZD,USD</li>
<li>CAD,USD</li> <li>CAD,USD</li>
@ -932,7 +932,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputScrollSpeed42" class="form-select"> <select id="inputScrollSpeed42" class="form-select temp-select">
<option>Celsius</option> <option>Celsius</option>
<option>Fahrenheit</option> <option>Fahrenheit</option>
<option>Kelvin</option> <option>Kelvin</option>
@ -947,7 +947,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputTransition42" class="form-select"> <select id="inputTransition42" class="form-select wind-speed-select">
<option>Miles/sec</option> <option>Miles/sec</option>
<option>Kilometer/sec</option> <option>Kilometer/sec</option>
<option></option> <option></option>
@ -963,7 +963,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputScrollSpeed43" class="form-select"> <select id="inputScrollSpeed43" class="form-select colour-select">
<option>White</option> <option>White</option>
<option>Yellow</option> <option>Yellow</option>
<option>Red</option> <option>Red</option>
@ -978,7 +978,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputTransition43" class="form-select"> <select id="inputTransition43" class="form-select city-colour-select">
<option>Yellow</option> <option>Yellow</option>
<option>White</option> <option>White</option>
<option>Red</option> <option>Red</option>
@ -994,7 +994,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked16" id="flexCheckChecked16"
@ -1008,7 +1008,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="current-weather-features" id="current-weather-features"
class="display-features-list text-dark" class="display-features-list text-dark city-list"
> >
<li>Hong Kong</li> <li>Hong Kong</li>
<li>Boston</li> <li>Boston</li>
@ -1128,7 +1128,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputScrollSpeed52" class="form-select"> <select id="inputScrollSpeed52" class="form-select temp-select">
<option>Celsius</option> <option>Celsius</option>
<option>Fahrenheit</option> <option>Fahrenheit</option>
<option>Kelvin</option> <option>Kelvin</option>
@ -1143,7 +1143,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputTransition52" class="form-select"> <select id="inputTransition52" class="form-select wind-speed-select">
<option>Miles/sec</option> <option>Miles/sec</option>
<option>Kilometer/sec</option> <option>Kilometer/sec</option>
<option></option> <option></option>
@ -1160,7 +1160,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputScrollSpeed53" class="form-select"> <select id="inputScrollSpeed53" class="form-select colour-select">
<option>White</option> <option>White</option>
<option>Yellow</option> <option>Yellow</option>
<option>Red</option> <option>Red</option>
@ -1175,7 +1175,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputTransition53" class="form-select"> <select id="inputTransition53" class="form-select city-colour-select">
<option>Yellow</option> <option>Yellow</option>
<option>White</option> <option>White</option>
<option>Red</option> <option>Red</option>
@ -1191,7 +1191,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input current-weather-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked17" id="flexCheckChecked17"
@ -1208,7 +1208,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked18" id="flexCheckChecked18"
@ -1222,7 +1222,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="daily-forecast-features" id="daily-forecast-features"
class="display-features-list text-dark" class="display-features-list text-dark city-list"
> >
<li>Moscow</li> <li>Moscow</li>
<li>Tokyo</li> <li>Tokyo</li>
@ -1323,7 +1323,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputScrollSpeed62" class="form-select"> <select id="inputScrollSpeed62" class="form-select country-select">
<option>USA</option> <option>USA</option>
<option>UK</option> <option>UK</option>
<option>China</option> <option>China</option>
@ -1338,7 +1338,7 @@
</label> </label>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select id="inputTransition62" class="form-select"> <select id="inputTransition62" class="form-select category-select">
<option>General</option> <option>General</option>
<option>Special</option> <option>Special</option>
<option></option> <option></option>
@ -1389,7 +1389,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked19" id="flexCheckChecked19"
@ -1403,7 +1403,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="news-features" id="news-features"
class="display-features-list text-dark" class="display-features-list text-dark sources-list"
> >
<li>Bloomberg</li> <li>Bloomberg</li>
<li>ABC News</li> <li>ABC News</li>
@ -1522,7 +1522,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked21" id="flexCheckChecked21"
@ -1536,7 +1536,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="upcoming-games-features" id="upcoming-games-features"
class="display-features-list text-dark" class="display-features-list text-dark league-list"
> >
<li>NFL</li> <li>NFL</li>
<li>NBA</li> <li>NBA</li>
@ -1649,7 +1649,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked22" id="flexCheckChecked22"
@ -1663,7 +1663,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="past-games-features" id="past-games-features"
class="display-features-list text-dark" class="display-features-list text-dark league-list"
> >
<li>NFL</li> <li>NFL</li>
<li>NBA</li> <li>NBA</li>
@ -1776,7 +1776,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked23" id="flexCheckChecked23"
@ -1790,7 +1790,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="live-games-features" id="live-games-features"
class="display-features-list text-dark" class="display-features-list text-dark league-list"
> >
<li>NFL</li> <li>NFL</li>
<li>NBA</li> <li>NBA</li>
@ -1902,7 +1902,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked24" id="flexCheckChecked24"
@ -1916,7 +1916,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="team-stats-features" id="team-stats-features"
class="display-features-list text-dark" class="display-features-list text-dark league-list"
> >
<li>NFL</li> <li>NFL</li>
<li>NBA</li> <li>NBA</li>
@ -2030,7 +2030,7 @@
<input <input
type="text" type="text"
id="inputText12" id="inputText12"
class="form-control" class="form-control pause-select"
aria-describedby="TextHelpInline" aria-describedby="TextHelpInline"
/> />
</div> </div>
@ -2053,7 +2053,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked25" id="flexCheckChecked25"
@ -2067,7 +2067,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="images-features" id="images-features"
class="display-features-list text-dark" class="display-features-list text-dark image-list"
> >
<li>asdf.png</li> <li>asdf.png</li>
<li>image.png</li> <li>image.png</li>
@ -2193,7 +2193,7 @@
<input <input
type="text" type="text"
id="inputText112" id="inputText112"
class="form-control" class="form-control pause-select"
aria-describedby="TextHelpInline" aria-describedby="TextHelpInline"
/> />
</div> </div>
@ -2216,7 +2216,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input <input
class="form-check-input" class="form-check-input title-select"
type="checkbox" type="checkbox"
value="" value=""
id="flexCheckChecked28" id="flexCheckChecked28"
@ -2230,7 +2230,7 @@
<div class="features-div-two"> <div class="features-div-two">
<ul <ul
id="gifs-features" id="gifs-features"
class="display-features-list text-dark" class="display-features-list text-dark image-list"
> >
<li>asdf.gif</li> <li>asdf.gif</li>
<li>image.gif</li> <li>image.gif</li>