MediaWiki:Common.js: Difference between revisions
From Sanatan Hindu Dharma
No edit summary |
No edit summary Tag: Reverted |
||
| 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. */ | ||
// Hide page tools (content navigation) only for anonymous users | |||
$(document).ready(function () { | |||
if (mw.config.get('wgUserName') === null) { | |||
$('#p-contentnavigation').hide(); | |||
} | |||
}); | |||
/* | /* | ||
Revision as of 13:01, 29 July 2025
/* Any JavaScript here will be loaded for all users on every page load. */
// Hide page tools (content navigation) only for anonymous users
$(document).ready(function () {
if (mw.config.get('wgUserName') === null) {
$('#p-contentnavigation').hide();
}
});
/*
$(document).ready(function() {
if (mw.config.get('wgNamespaceNumber') >= 0) { // Only show on normal pages
var pageName = mw.config.get('wgPageName');
var uploadUrl = mw.util.getUrl('Form:UploadVideo', { 'page': pageName });
$('<div style="position:fixed; bottom:20px; right:20px; background:#007bff; color:white; padding:10px; border-radius:5px; cursor:pointer; font-weight:bold;">Upload a Video</div>')
.click(function() {
window.location.href = uploadUrl;
}).appendTo('body');
}
});
*/
