Common.js: Difference between revisions
MediaWiki interface page
More actions
Content deleted Content added
No edit summary |
No edit summary |
||
| 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. */ |
||
$(function() { |
|||
// Get the current document title |
|||
var |
var currentTitle = document.title; |
||
// Remove the namespace part (if exists) from the title |
|||
var newTitle = currentTitle.replace(/^.*?:\s*/, ""); |
|||
// Set the updated title |
|||
document.title = newTitle; |
document.title = newTitle; |
||
}; |
}); |
||
Revision as of 02:54, 1 January 2025
/* Any JavaScript here will be loaded for all users on every page load. */
$(function() {
// Get the current document title
var currentTitle = document.title;
// Remove the namespace part (if exists) from the title
var newTitle = currentTitle.replace(/^.*?:\s*/, "");
// Set the updated title
document.title = newTitle;
});