Clearing BreezeWiki options before populating
parent
d57446c4f3
commit
0063c4aa7f
8
popup.js
8
popup.js
|
@ -51,6 +51,10 @@ async function loadBreezeWikiOptions() {
|
||||||
}
|
}
|
||||||
// Populate dropdown selection of hosts
|
// Populate dropdown selection of hosts
|
||||||
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
||||||
|
while (breezewikiHostSelect.firstChild) {
|
||||||
|
// Remove any existing options
|
||||||
|
breezewikiHostSelect.removeChild(breezewikiHostSelect.lastChild);
|
||||||
|
}
|
||||||
for (var i = 0; i < breezewikiHosts.length; i++) {
|
for (var i = 0; i < breezewikiHosts.length; i++) {
|
||||||
let option = document.createElement('option');
|
let option = document.createElement('option');
|
||||||
option.value = breezewikiHosts[i].instance;
|
option.value = breezewikiHosts[i].instance;
|
||||||
|
@ -84,6 +88,10 @@ async function loadBreezeWikiOptions() {
|
||||||
}
|
}
|
||||||
// Populate dropdown selection of hosts
|
// Populate dropdown selection of hosts
|
||||||
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
||||||
|
while (breezewikiHostSelect.firstChild) {
|
||||||
|
// Remove any existing options
|
||||||
|
breezewikiHostSelect.removeChild(breezewikiHostSelect.lastChild);
|
||||||
|
}
|
||||||
for (var i = 0; i < hostOptions.length; i++) {
|
for (var i = 0; i < hostOptions.length; i++) {
|
||||||
let option = document.createElement('option');
|
let option = document.createElement('option');
|
||||||
option.value = hostOptions[i].instance;
|
option.value = hostOptions[i].instance;
|
||||||
|
|
|
@ -80,6 +80,10 @@ async function loadBreezeWikiOptions() {
|
||||||
}
|
}
|
||||||
// Populate dropdown selection of hosts
|
// Populate dropdown selection of hosts
|
||||||
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
||||||
|
while (breezewikiHostSelect.firstChild) {
|
||||||
|
// Remove any existing options
|
||||||
|
breezewikiHostSelect.removeChild(breezewikiHostSelect.lastChild);
|
||||||
|
}
|
||||||
for (var i = 0; i < breezewikiHosts.length; i++) {
|
for (var i = 0; i < breezewikiHosts.length; i++) {
|
||||||
let option = document.createElement('option');
|
let option = document.createElement('option');
|
||||||
option.value = breezewikiHosts[i].instance;
|
option.value = breezewikiHosts[i].instance;
|
||||||
|
@ -113,6 +117,10 @@ async function loadBreezeWikiOptions() {
|
||||||
}
|
}
|
||||||
// Populate dropdown selection of hosts
|
// Populate dropdown selection of hosts
|
||||||
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
const breezewikiHostSelect = document.getElementById('breezewikiHostSelect');
|
||||||
|
while (breezewikiHostSelect.firstChild) {
|
||||||
|
// Remove any existing options
|
||||||
|
breezewikiHostSelect.removeChild(breezewikiHostSelect.lastChild);
|
||||||
|
}
|
||||||
for (var i = 0; i < hostOptions.length; i++) {
|
for (var i = 0; i < hostOptions.length; i++) {
|
||||||
let option = document.createElement('option');
|
let option = document.createElement('option');
|
||||||
option.value = hostOptions[i].instance;
|
option.value = hostOptions[i].instance;
|
||||||
|
|
Loading…
Reference in New Issue