User:C.Ezra.M/Staff-symbols.js

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
const STAFF_RANKS = {
    executiveStaff: {
        internal: 'execstaff',
        name: 'Bulbagarden Executive Staff member',
        page: 'Bulbapedia:Bulbagarden_Executive_Staff',
        image: '/d/d8/ESstafficon.svg',
    },
    leadershipBoard: {
        internal: 'editboard',
        name: 'Bulbapedia Leadership Board member',
        page: 'Bulbapedia:Leadership_Board',
        image: '/b/b4/LBstafficon.svg',
    },
    administrator: {
        internal: 'sysop',
        name: 'Bulbapedia Administrator',
        page: 'Bulbapedia:Administrators',
        image: '/4/4a/Astafficon.svg',
    },
    juniorAdministrator: {
        internal: 'jr-admin',
        name: 'Bulbapedia Junior Administrator',
        page: 'Bulbapedia:JuniorAdministrators',
        image: '/e/e5/JAstafficon.svg',
    },
}

$(async () => {
    if (!([2, 3].contains(mw.config.get("wgNamespaceNumber")))) {
        return;
    }
    
    

    // Executive Staff icons
    $(".mw-indicators").append('<div class="stafflink-WM" style="float:right; display:none;"><a href="/wiki/Bulbapedia:Bulbagarden Executive Staff" title="This user is a Bulbagarden Executive Staff member."><img src="//staging.archives.bulbagarden.net/media/upload/d/d8/ESstafficon.svg" width="55"></a></div>')
    
    // Leadership Board staff icons
    $(".mw-indicators").append('<div class="stafflink-LB" style="float:right; display:none;"><a href="/wiki/Bulbapedia:Leadership_Board" title="This user is a Bulbapedia Leadership Board member."><img src="//staging.archives.bulbagarden.net/media/upload/b/b4/LBstafficon.svg" width="55"></a></div>')
    
    // Administrator staff icons
    $(".mw-indicators").append('<div class="stafflink-AD" style="float:right; display:none;"><a href="/wiki/Bulbapedia:Administrators" title="This user is a Bulbapedia Administrator."><img src="//staging.archives.bulbagarden.net/media/upload/4/4a/Astafficon.svg" width="55"></a></div>')
    
    // Junior Administrator staff icons
    $(".mw-indicators").append('<div class="stafflink-JA" style="float:right; display:none;"><a href="/wiki/Bulbapedia:Junior_Administrators" title="This user is a Bulbapedia Junior Administrator."><img src="//staging.archives.bulbagarden.net/media/upload/e/e5/JAstafficon.svg" width="55"></a></div>')
});