MediaWiki:Common.js
From Artifacts of Capitalism
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(document).ready(function () {
// Confirm loading
console.log("✅ Ready to add custom personal tools link");
// Create new link item
var $newLink = $('<li id="pt-mycustomlink"><a href="/index.php/Special:RecentChanges">Recent Changes</a></li>');
// Add it to the personal tools menu
if ($('#p-personal ul').length) {
$('#p-personal ul').append($newLink);
} else if ($('.cmln-personal-tools ul').length) {
// Chameleon skin fallback
$('.cmln-personal-tools ul').append($newLink);
} else {
console.warn("⚠️ Personal tools menu not found.");
}
});