Welcome to Assassin's Creed Wiki! Log in and join the community.
User:Vatsa1708/wikia.js: Difference between revisions
Jump to navigation
Jump to search
imported>Vatsa1708 mNo edit summary |
imported>Vatsa1708 Something different. |
||
| Line 1: | Line 1: | ||
/* | /*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"] = ["Bureaucrat"]; | |||
rights["Vatsa1708"] = ["Bureaucrat"]; | |||
if( | |||
// ADMINIS | |||
rights["Amnestyyy"] = ["Administrator"]; | |||
// PATROLLERS + MOTM (chronological) | |||
rights["GuardDog"] = ["Rafiq"]; | |||
rights["TheSt0ryTeller"] = ["Rafiq"]; | |||
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'); | |||
} | } | ||
} | } | ||
}); | |||
// | |||
Revision as of 09:11, 20 January 2013
/*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"] = ["Bureaucrat"];
rights["Vatsa1708"] = ["Bureaucrat"];
// ADMINIS
rights["Amnestyyy"] = ["Administrator"];
// PATROLLERS + MOTM (chronological)
rights["GuardDog"] = ["Rafiq"];
rights["TheSt0ryTeller"] = ["Rafiq"];
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');
}
}
});
//