Jump to content

MediaWiki:Common.js: Difference between revisions

From Artemis Archive
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 () {
$(function () {
    // Make sure we're in Vector 2022 skin
     if (mw.config.get('skin') !== 'vector-2022') return;
     if (mw.config.get('skin') !== 'vector-2022') return;


    // Wait until the personal tools are ready
     mw.util.addPortletLink(
     mw.util.addPortletLink(
         'vector-user-links', // ID of the top-right user links menu in Vector 2022
         'vector-user-links', // Target the user links area (top right)
         '/wiki/ReportAnimalAbuse', // Change to your target page or external URL
         '/wiki/ReportAnimalAbuse', // Or external link
         '🐾 Report Abuse',
         '🐾 Report Abuse',
         'pt-reportabuse',
         'pt-reportabuse',
         'Report animal abuse',
         'Report animal abuse',
         null,
         null,
         '#pt-login' // Insert before the "Log in" link
         '#pt-login' // Position: before "Log in"
     );
     );
});
});

Revision as of 03:51, 21 April 2025

/* Any JavaScript here will be loaded for all users on every page load. */
$(function () {
    if (mw.config.get('skin') !== 'vector-2022') return;

    mw.util.addPortletLink(
        'vector-user-links', // Target the user links area (top right)
        '/wiki/ReportAnimalAbuse', // Or external link
        '🐾 Report Abuse',
        'pt-reportabuse',
        'Report animal abuse',
        null,
        '#pt-login' // Position: before "Log in"
    );
});