getJokesSettings

This commit is contained in:
Justin 2023-07-12 17:00:17 +08:00 committed by GitHub
parent 1b8e5d712e
commit 739017c1e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");