MediaWiki:Common.js: Difference between revisions
Appearance
Created page with "→Any JavaScript here will be loaded for all users on every page load.: //FREDZ Remove Automatic button. function removeAutomaticOption() { const element = document.querySelector('#skin-client-pref-skin-theme-value-os'); if (element) { element.closest('.cdx-radio').remove(); // Removes its parent `.cdx-radio` container } else { setTimeout(removeAutomaticOption, 500); // Try again in 500ms } } removeAutomaticOption();" |
(No difference)
|
Latest revision as of 12:38, 5 April 2025
/* Any JavaScript here will be loaded for all users on every page load. */
//FREDZ Remove Automatic button.
function removeAutomaticOption() {
const element = document.querySelector('#skin-client-pref-skin-theme-value-os');
if (element) {
element.closest('.cdx-radio').remove(); // Removes its parent `.cdx-radio` container
} else {
setTimeout(removeAutomaticOption, 500); // Try again in 500ms
}
}
removeAutomaticOption();