getJokesSettings
This commit is contained in:
parent
1b8e5d712e
commit
739017c1e1
@ -1715,6 +1715,31 @@ function getEconomicSettings(page) {
|
||||
}
|
||||
|
||||
|
||||
// jokes settings
|
||||
function getJokesSettings(page) {
|
||||
|
||||
let title = page.querySelectorAll(".title-select")[0].checked;
|
||||
let categories = getListItems(page.querySelectorAll(".symbol-list")[0]);
|
||||
let amount = page.querySelectorAll(".jokes-amount-select")[0].value;
|
||||
const jokesdivElement = page.querySelector('.blacklist-checkboxes');
|
||||
const allcheckboxes = jokesdivElement.querySelectorAll('input');
|
||||
const blacklist = [];
|
||||
allcheckboxes.forEach(checkbox => {
|
||||
if (checkbox.checked) {
|
||||
blacklist.push(checkbox.value);
|
||||
}
|
||||
});
|
||||
settings = {
|
||||
title: title,
|
||||
categories: categories,
|
||||
blacklist: blacklist,
|
||||
amount: amount,
|
||||
};
|
||||
console.log(settings);
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
||||
// Join Network
|
||||
|
||||
let wifiSsidInput = document.getElementById("wifi-ssid-input");
|
||||
|
Loading…
Reference in New Issue
Block a user