mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* split global.js into its components, so it can be reasonably processed by setup * make reputation requirements configurable * move Markup and Locale back into global.js (removed associated build scripts) * extend Icon to display iconId in lightbox popup
20 lines
734 B
JavaScript
20 lines
734 B
JavaScript
/*
|
|
Global Profiler-related functions
|
|
*/
|
|
|
|
function g_cleanCharacterName(name) {
|
|
return (name.match && name.match(/^[A-Z]/) ? name.charAt(0).toLowerCase() + name.substr(1) : name);
|
|
}
|
|
|
|
function g_getProfileUrl(profile) {
|
|
if (profile.region) // Armory character
|
|
return '?profile=' + profile.region + '.' + profile.realm + '.' + g_cleanCharacterName(profile.name) + (profile.renameItr ? '-' + profile.renameItr : '');
|
|
// return '?profile=' + profile.region + '.' + profile.realm + '.' + g_cleanCharacterName(profile.name); // aowow custom
|
|
else // Custom profile
|
|
return '?profile=' + profile.id;
|
|
}
|
|
|
|
function g_getProfileRealmUrl(profile) {
|
|
return '?profiles=' + profile.region + '.' + profile.realm;
|
|
}
|