Welcome to Assassin's Creed Wiki! Log in and join the community.

MediaWiki:Common.js/grouptag.js

From the Assassin's Creed Wiki
Revision as of 15:31, 28 July 2013 by imported>Vatsa1708
Jump to navigation Jump 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.
/* Any JavaScript here will be loaded for all users on every page load. */
 
/*User rights tag to masthead */
 
// WRITTEN BY USER:RAPPY_4187, Aion Wiki, FIXED BY USER:FOODBANDLT, MLP Wiki. Taken from callofduty.wikia.com
 
$(function() {
 var rights = {};
 
   // BUREAUCRATS
 
 rights["Master Sima Yi"]      = ["Mentore"];
 rights["Vatsa1708"]           = ["Mentore"];
 
  // ADMINS
 
 rights["Amnestyyy"]           = ["Dai"];
   
  // ROLLBACK/Custodian
 rights["DarkFeather"]         = ["Rafiq"];
 rights["Slate Vesper"]        = ["Rafiq"];
 rights["Kaloneous"]           = ["Rafiq"];
 rights["Stormbeast"]          = ["Rafiq"]

  //BOTS
 
 rights["VatsaAWB"]            = ["Bot"];
 
  // END LIST OF ACCOUNTS GIVEN EXTRA USER RIGHTS ICONS
 
if (wgPageName.indexOf("Special:Contributions") != -1){
newTitle = fbReturnToTitle.replace("Special:Contributions/", "");
unfinishedTitle = newTitle;
 
while (unfinishedTitle.search("_") > 0){
unfinishedTitle = unfinishedTitle.replace("_", " ");
}
 
userName = unfinishedTitle;
 
}else{
userName = wgTitle;
userName.replace("User:", "");
}
 
 if (typeof rights[userName] != "undefined") {
   // remove old rights
   $('.UserProfileMasthead .masthead-info span.tag').remove();
 
   for( var i=0, len=rights[userName].length; i < len; i++) {
     // add new rights
     $('<span style="margin-left: 10px;" class="tag">' + rights[userName][i] +
       '</span>').appendTo('.masthead-info hgroup');
   }
 }
});
 
//