MediaWiki:Common.js: Difference between revisions

From Artifacts of Capitalism
Replaced content with "console.log("✅ MediaWiki:Common.js is loading!");"
Tag: Replaced
No edit summary
Line 1: Line 1:
console.log("✅ MediaWiki:Common.js is loading!");
$(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.");
  }
});

Revision as of 20:37, 14 July 2025

$(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.");
  }
});