Marthee commited on
Commit
06fbde7
·
verified ·
1 Parent(s): 628f6e6

Update templates/TestingMeasurement.html

Browse files
Files changed (1) hide show
  1. templates/TestingMeasurement.html +18 -18
templates/TestingMeasurement.html CHANGED
@@ -2211,26 +2211,26 @@ function updateDropdown(options) {
2211
  }
2212
 
2213
  // Function to start the worker and periodic updates
2214
- function startDropdownUpdates() {
2215
- const guessedNamesWorker = new Worker('../static/guessedNamesWorker.js');
2216
- // Handle messages from the worker
2217
- guessedNamesWorker.onmessage = function (event) {
2218
- if (event.data.status === 'success') {
2219
- console.log('Updating dropdown with new data:', event.data.data);
2220
- updateDropdown(event.data.data); // Update the dropdown
2221
- } else {
2222
- console.error('Error from worker:', event.data.error);
2223
- }
2224
- };
2225
 
2226
- // Send an initial fetch message to the worker
2227
- guessedNamesWorker.postMessage('fetch');
2228
 
2229
- // Periodically fetch data every 3 seconds
2230
- setInterval(() => {
2231
- guessedNamesWorker.postMessage('fetch');
2232
- }, 3000);
2233
- }
2234
 
2235
 
2236
 
 
2211
  }
2212
 
2213
  // Function to start the worker and periodic updates
2214
+ // function startDropdownUpdates() {
2215
+ // const guessedNamesWorker = new Worker('../static/guessedNamesWorker.js');
2216
+ // // Handle messages from the worker
2217
+ // guessedNamesWorker.onmessage = function (event) {
2218
+ // if (event.data.status === 'success') {
2219
+ // console.log('Updating dropdown with new data:', event.data.data);
2220
+ // updateDropdown(event.data.data); // Update the dropdown
2221
+ // } else {
2222
+ // console.error('Error from worker:', event.data.error);
2223
+ // }
2224
+ // };
2225
 
2226
+ // // Send an initial fetch message to the worker
2227
+ // guessedNamesWorker.postMessage('fetch');
2228
 
2229
+ // // Periodically fetch data every 3 seconds
2230
+ // setInterval(() => {
2231
+ // guessedNamesWorker.postMessage('fetch');
2232
+ // }, 3000);
2233
+ // }
2234
 
2235
 
2236