nextcloud_minimalprofile/js/hidePronouns.js

20 lines
666 B
JavaScript
Raw Permalink Normal View History

2025-04-09 13:51:08 +02:00
document.addEventListener("DOMContentLoaded", function () {
function tryToHidePronouns() {
const sections = document.querySelectorAll("section");
for (const section of sections) {
const label = section.querySelector("label");
if (label && label.textContent.trim().toLowerCase() === "pronouns") {
console.log("Found Pronouns field, hiding section...");
section.style.display = "none";
clearInterval(checkInterval); // stop checking
return;
}
}
}
const checkInterval = setInterval(tryToHidePronouns, 500); // retry every half second
console.log("Started polling to find Pronouns field...");
});