Renamed script

This commit is contained in:
2025-04-09 13:51:08 +02:00
parent c732a9b025
commit 310679ce3c
4 changed files with 22 additions and 10 deletions

19
js/hidePronouns.js Normal file
View File

@@ -0,0 +1,19 @@
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...");
});

View File

@@ -1,7 +0,0 @@
document.addEventListener('DOMContentLoaded', function () {
const pronounField = document.querySelector('[data-profile-field="pronouns"]');
if (pronounField) {
pronounField.style.display = 'none';
}
});