From ProventusNova DeveloperWiki
No edit summary
Tags: Manual revert Reverted
No edit summary
Tag: Manual revert
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded", function() {
if (!mw.config.get("wgUserName")) { // If user is not logged in
document.getElementById("ca-viewsource")?.remove();
}
});

document.getElementById('p-tb')?.style.display = 'none';
document.getElementById('catlinks')?.style.display = 'none';

mw.loader.using('mediawiki.user').then(function () {
if (!mw.user.isAnon()) return; // Only apply to anonymous users
if (mw.config.get('wgAction') === 'viewsource') {
window.location.href = mw.config.get('wgArticlePath').replace('$1', 'Main_Page'); // Redirect to Main Page
}
});

Latest revision as of 16:50, 8 April 2025

/* Any JavaScript here will be loaded for all users on every page load. */