MediaWiki:Common.js: Difference between revisions
From Artifacts of Capitalism
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
console.log("✅ Common.js is loading and attempting to insert link..."); | |||
console.log("✅ | |||
// Create new link | // Create new link | ||
var $ | var $customLink = $('<li><a href="/index.php/Special:RecentChanges">Recent Changes</a></li>'); | ||
// | // Wait a bit for the Chameleon menu to render | ||
setTimeout(function () { | |||
$(' | var menu = $('.cmln-personal-tools .dropdown-menu'); | ||
if (menu.length) { | |||
menu.append($customLink); | |||
console.log("✅ Custom link added to personal tools menu."); | |||
} else { | |||
console.warn("⚠️ Personal tools dropdown not found."); | |||
} | } | ||
}, 500); // Slight delay to ensure menu has rendered | |||
}); | }); | ||
Revision as of 20:38, 14 July 2025
$(document).ready(function () {
console.log("✅ Common.js is loading and attempting to insert link...");
// Create new link
var $customLink = $('<li><a href="/index.php/Special:RecentChanges">Recent Changes</a></li>');
// Wait a bit for the Chameleon menu to render
setTimeout(function () {
var menu = $('.cmln-personal-tools .dropdown-menu');
if (menu.length) {
menu.append($customLink);
console.log("✅ Custom link added to personal tools menu.");
} else {
console.warn("⚠️ Personal tools dropdown not found.");
}
}, 500); // Slight delay to ensure menu has rendered
});