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

MediaWiki:Common.js/grouptag.js: Difference between revisions

From the Assassin's Creed Wiki
Jump to navigation Jump to search
imported>Vatsa1708
m Since message wall's been dead..
imported>Rappy
very old code that is breaking site JavaScript. Please convert this to w:c:dev:ProfileTags instead.
 
(11 intermediate revisions by one other user not shown)
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. */
   
   
/******************/
/*User rights tag to masthead
/**Custom Groups**/
/****************/
// WRITTEN BY USER:RAPPY_4187, Aion Wiki, FIXED BY USER:FOODBANDLT, MLP Wiki. Taken from callofduty.wikia.com
/*Cello*/
$(function() {
$(function() {
  $('.page-User_D_Cello .masthead-info hgroup .group').html('Il Mentore');
var rights = {};
});
$(function() {
  // BUREAUCRATS
   $('.page-User_talk_D_Cello .masthead-info hgroup .group').html('Il Mentore');
});
rights["Master Sima Yi"]      = ["Mentore"];
$(function() {
rights["Vatsa1708"]          = ["Mentore"];
  $('.page-User_blog_D_Cello .masthead-info hgroup .group').html('Il Mentore');
});
  // ADMINIS
rights["Amnestyyy"]          = ["Dai"];
 
   // PATROLLERS + MOTM (chronological)
rights["TheSt0ryTeller"]      = ["Rafiq","Bibliotecario Capo"];
rights["DarkFeather"]        = ["Rafiq"];
rights["Slate Vesper"]        = ["Rafiq"];
rights["Kaloneous"]          = ["Rafiq"];
rights["Stormbeast"]          = ["Rafiq"];
rights["Gabriel Auditore"]    = ["Rafiq"];
rights["Arcemz"]              = ["Rafiq"];
  //BOTS
   
   
rights["VatsaAWB"]            = ["Bot"];
   
   
/*ADMINS*/
  // END LIST OF ACCOUNTS GIVEN EXTRA USER RIGHTS ICONS
   
   
/*Sima*/
if (wgPageName.indexOf("Special:Contributions") != -1){
$(function() {
newTitle = fbReturnToTitle.replace("Special:Contributions/", "");
  $('.page-User_Master_Sima_Yi .masthead-info hgroup .group').html('Consigliere');
unfinishedTitle = newTitle;
});
$(function() {
  $('.page-User_talk_Master_Sima_Yi .masthead-info hgroup .group').html('Consigliere');
});
$(function() {
  $('.page-User_blog_Master_Sima_Yi .masthead-info hgroup .group').html('Consigliere');
});
   
   
/*War*/
while (unfinishedTitle.search("_") > 0){
$(function() {
unfinishedTitle = unfinishedTitle.replace("_", " ");
  $('.page-User_War_Clown .masthead-info hgroup .group').html('Executive Officer');
}
});
$(function() {
  $('.page-User_talk_War_Clown .masthead-info hgroup .group').html('Executive Officer');
});
$(function() {
  $('.page-User_blog_War_Clown .masthead-info hgroup .group').html('Executive Officer');
});
   
   
userName = unfinishedTitle;
   
   
$(function() {
}else{
  $('.page-User_Vatsa1708 .masthead-info hgroup .group').html('Executive Officer');
userName = wgTitle;
});
userName.replace("User:", "");
$(function() {
}
  $('.page-User_talk_Vatsa1708 .masthead-info hgroup .group').html('Executive Officer');
});
$(function() {
  $('.page-User_blog_Vatsa1708 .masthead-info hgroup .group').html('Executive Officer');
});
   
   
if (typeof rights[userName] != "undefined") {
  // remove old rights
  $('.UserProfileMasthead .masthead-info span.tag').remove();
   
   
/*Rafiq - Blaidd*/
  for( var i=0, len=rights[userName].length; i < len; i++) {
$(function() {
    // add new rights
  $('.page-User_R_BlaiddDdraig .masthead-info hgroup .group').html('Rafiq');
    $('<span style="margin-left: 10px;" class="tag">' + rights[userName][i] +
});
      '</span>').appendTo('.masthead-info hgroup');
$(function() {
  }
  $('.page-User_talk_R_BlaiddDdraig .masthead-info hgroup .group').html('Rafiq');
}
});
$(function() {
  $('.page-User_blog_R_BlaiddDdraig .masthead-info hgroup .group').html('Rafiq');
});
});
//
*/

Latest revision as of 16:43, 31 October 2017

/* 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"];
 
  // ADMINIS
 
 rights["Amnestyyy"]           = ["Dai"];
   
  // PATROLLERS + MOTM (chronological)
 rights["TheSt0ryTeller"]      = ["Rafiq","Bibliotecario Capo"];
 rights["DarkFeather"]         = ["Rafiq"];
 rights["Slate Vesper"]        = ["Rafiq"];
 rights["Kaloneous"]           = ["Rafiq"];
 rights["Stormbeast"]          = ["Rafiq"];
 rights["Gabriel Auditore"]    = ["Rafiq"];
 rights["Arcemz"]              = ["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');
   }
 }
});
 
//

*/