更新awards页面、可读性格式调整

This commit is contained in:
woohoo 2021-11-14 16:00:03 +08:00
parent ea52b6aa5c
commit 846abad5b0

View File

@ -527,34 +527,34 @@
'Introduction to Sports Science': '运动科学概论', 'Introduction to Sports Science': '运动科学概论',
"Are you the missing link? At the end of this course you'll know more about Neanderthal man than the Discovery Channel.": "Are you the missing link? At the end of this course you'll know more about Neanderthal man than the Discovery Channel.":
'你是缺失的那一环吗?在本课程结束时,你对尼安德特人的了解将超过探索频道的内容。', '你是缺失的那一环吗?在本课程结束时,你对尼安德特人的了解将超过探索频道的内容。',
"Congratulations! You have completed the":'恭喜!你已完成了', "Congratulations! You have completed the": '恭喜!你已完成了',
"You have gained the following:":'你已经获得了以下:', "You have gained the following:": '你已经获得了以下:',
"upon completion":'于课程完成后', "upon completion": '于课程完成后',
"Gain":'获得', "Gain": '获得',
"Length":'时长', "Length": '时长',
"Cost":'费用', "Cost": '费用',
"Tier: 2":'级别: T2', "Tier: 2": '级别: T2',
"Tier: 1":'级别: T1', "Tier: 1": '级别: T1',
"Tier: 3":'级别: T3', "Tier: 3": '级别: T3',
"Gain a 1% bonus to strength gains in the gym":'健身房锻炼时获得1%的力量增长增益', "Gain a 1% bonus to strength gains in the gym": '健身房锻炼时获得1%的力量增长增益',
"Bonus:":'增益:', "Bonus:": '增益:',
'Introduction to General Studies':'基础学科入门', 'Introduction to General Studies': '基础学科入门',
'Driving License':'驾照', 'Driving License': '驾照',
'Gain access to driving related crimes':'可进行驾驶相关的犯罪 (解锁11系列)', 'Gain access to driving related crimes': '可进行驾驶相关的犯罪 (解锁11系列)',
"You'll need this to get around the city. Our crash course should give you a license without fail.": "You'll need this to get around the city. Our crash course should give you a license without fail.":
'你将需要这个来在城市中穿梭。我们的速成班应该能让你顺利拿到驾照。', '你将需要这个来在城市中穿梭。我们的速成班应该能让你顺利拿到驾照。',
'Astronomy':'天文学', 'Astronomy': '天文学',
'Mechanical Arts':'机械艺术', 'Mechanical Arts': '机械艺术',
'General Mechanics':'通用机械学', 'General Mechanics': '通用机械学',
'Basic English':'基础英语', 'Basic English': '基础英语',
'Ivory Crafting':'象牙工艺', 'Ivory Crafting': '象牙工艺',
'Intravenous Therapy':'静脉注射', 'Intravenous Therapy': '静脉注射',
'Put that fear of needles behind you by learning how to successfully administer a blood transfusion.': 'Put that fear of needles behind you by learning how to successfully administer a blood transfusion.':
'通过学习如何成功地进行输血,将对针头的恐惧抛在脑后。', '通过学习如何成功地进行输血,将对针头的恐惧抛在脑后。',
'Networking':'网络', 'Networking': '网络',
'Gain access to hacking crimes':'可进行黑客犯罪 (解锁18系列)', 'Gain access to hacking crimes': '可进行黑客犯罪 (解锁18系列)',
'Computer Security and Defense':'计算机安全与防御', 'Computer Security and Defense': '计算机安全与防御',
'Gain a 10% increase in hacking crime success rate':'提高黑客犯罪10%的成功率', 'Gain a 10% increase in hacking crime success rate': '提高黑客犯罪10%的成功率',
}; };
const headerDict = { const headerDict = {
"User's Name / ID": '用户名或ID', "User's Name / ID": '用户名或ID',
@ -649,18 +649,18 @@
'Data 1': '哒嗒 1', 'Data 1': '哒嗒 1',
'Data 2': '哒嗒 2', 'Data 2': '哒嗒 2',
'Data 3': '哒嗒 3', 'Data 3': '哒嗒 3',
'Double 2':'', 'Double 2': '',
'Electronic 1':'', 'Electronic 1': '',
'Electronic 2':'', 'Electronic 2': '',
'Future 1':'', 'Future 1': '',
'Future 2':'', 'Future 2': '',
'Plink 1':'', 'Plink 1': '',
'Plink 2':'', 'Plink 2': '',
'Soft beep 1':'', 'Soft beep 1': '',
'Soft beep 2':'', 'Soft beep 2': '',
'Subtle':'', 'Subtle': '',
'Transmission 1':'', 'Transmission 1': '',
'Transmission 2':'', 'Transmission 2': '',
'Warble 1': '', 'Warble 1': '',
'Warble 2': '', 'Warble 2': '',
'Only people you know or have met': '只有你认识或遇到过的人', 'Only people you know or have met': '只有你认识或遇到过的人',
@ -713,9 +713,9 @@
"Lost to": "输给了 ", "Lost to": "输给了 ",
}; };
const awDict = { const awDict = {
'Honors (':'荣誉 (', 'Honors (': '荣誉 (',
'Medals (':'勋章 (', 'Medals (': '勋章 (',
'Merits (':'技能加点 (', 'Merits (': '技能加点 (',
'As you progress, you will unlock new honors. To add an Honor to your name, click the one you want.': 'As you progress, you will unlock new honors. To add an Honor to your name, click the one you want.':
'新的荣誉条将随着你的进步解锁。请点击想要在你的名字上显示的荣誉条。', '新的荣誉条将随着你的进步解锁。请点击想要在你的名字上显示的荣誉条。',
'As you progress, you will unlock new medals. Your medals will be pinned on your profile to show your\nprestige.': 'As you progress, you will unlock new medals. Your medals will be pinned on your profile to show your\nprestige.':
@ -732,101 +732,101 @@
'and': ' 和 ', 'and': ' 和 ',
".\nThe enhancements are incremental and will go up in cost the more you upgrade them.\nFor example, if you pay one merit to upgrade an improvement,\nnext time you want to upgrade it you will need to pay two merits, after that three etc.": ".\nThe enhancements are incremental and will go up in cost the more you upgrade them.\nFor example, if you pay one merit to upgrade an improvement,\nnext time you want to upgrade it you will need to pay two merits, after that three etc.":
' 获得的。技能升级的花费是递增的,技能等级越高升级消耗的技能点就越高。如果花费一技能点来升级一项技能,下次要升级时,需要花费两个技能点,之后是三个等依此类推。', ' 获得的。技能升级的花费是递增的,技能等级越高升级消耗的技能点就越高。如果花费一技能点来升级一项技能,下次要升级时,需要花费两个技能点,之后是三个等依此类推。',
'Awards you are about to unlock':'即将解锁的勋章', 'Awards you are about to unlock': '即将解锁的勋章',
'Upgrade':'升级', 'Upgrade': '升级',
'Progress':'升级进程', 'Progress': '升级进程',
'Expand All':'展开所有', 'Expand All': '展开所有',
'Latest':'近期获得', 'Latest': '近期获得',
'Defaults':'默认荣誉条', 'Defaults': '默认荣誉条',
'Attacking':'攻击', 'Attacking': '攻击',
'Camo':'迷彩', 'Camo': '迷彩',
'Weapons':'武器', 'Weapons': '武器',
'Education':'教育', 'Education': '教育',
'Crimes':'犯罪', 'Crimes': '犯罪',
'Drugs':'药章', 'Drugs': '药章',
'Jail & Hospital':'监狱与医院', 'Jail & Hospital': '监狱与医院',
'Travel':'旅行', 'Travel': '旅行',
'Gym':'锻炼', 'Gym': '锻炼',
'Level':'等级', 'Level': '等级',
'Competitions':'节日活动', 'Competitions': '节日活动',
'Money':'金钱', 'Money': '金钱',
'Items':'物品', 'Items': '物品',
'Commitment':'足迹', 'Commitment': '足迹',
'Casino':'赌场', 'Casino': '赌场',
'Missions':'任务', 'Missions': '任务',
'Misc':'杂项', 'Misc': '杂项',
'General':'一般', 'General': '一般',
'Rank':'阶级', 'Rank': '阶级',
'Networth':'身价', 'Networth': '身价',
'Nerve Bar':'犯罪N上限', 'Nerve Bar': '犯罪N上限',
'Critical Hit Rate':'暴击率', 'Critical Hit Rate': '暴击率',
'Life Points':'血量', 'Life Points': '血量',
'Crime Experience':'犯罪经验', 'Crime Experience': '犯罪经验',
'Education Length':'教育时长', 'Education Length': '教育时长',
'Awareness':'感知能力', 'Awareness': '感知能力',
'Bank Interest':'银行利润', 'Bank Interest': '银行利润',
'Masterful Looting':'大师掠夺', 'Masterful Looting': '大师掠夺',
'Stealth':'隐身', 'Stealth': '隐身',
'Hospitalizing':'送医时长', 'Hospitalizing': '送医时长',
'Addiction Mitigation':'毒瘾缓解', 'Addiction Mitigation': '毒瘾缓解',
'Employee Effectiveness':'员工效率', 'Employee Effectiveness': '员工效率',
'Brawn':'臂力', 'Brawn': '臂力',
'Protection':'保护', 'Protection': '保护',
'Sharpness':'敏锐', 'Sharpness': '敏锐',
'Evasion':'回避', 'Evasion': '回避',
'Heavy Artillery Mastery':'重炮精通 (Heavy Artillery)', 'Heavy Artillery Mastery': '重炮精通 (Heavy Artillery)',
'Machine Gun Mastery':'机枪精通 (Machine Gun)', 'Machine Gun Mastery': '机枪精通 (Machine Gun)',
'Rifle Mastery':'步枪精通', 'Rifle Mastery': '步枪精通',
'SMG Mastery':'冲锋枪精通', 'SMG Mastery': '冲锋枪精通',
'Shotgun Mastery':'霰弹枪精通', 'Shotgun Mastery': '霰弹枪精通',
'Pistol Mastery':'手枪精通', 'Pistol Mastery': '手枪精通',
'Club Mastery':'冲击武器精通 (Clubbing)', 'Club Mastery': '冲击武器精通 (Clubbing)',
'Piercing Mastery':'穿刺武器精通', 'Piercing Mastery': '穿刺武器精通',
'Slashing Mastery':'切割武器精通', 'Slashing Mastery': '切割武器精通',
'Mechanical Mastery':'机械武器精通', 'Mechanical Mastery': '机械武器精通',
'Temporary Mastery':'临时武器精通', 'Temporary Mastery': '临时武器精通',
'Increases maximum nerve bar by 1 point': '增加 1 点犯罪N上限', 'Increases maximum nerve bar by 1 point': '增加 1 点犯罪N上限',
'Increases critical hit rate by 0.5%':'提高 0.5% 暴击率', 'Increases critical hit rate by 0.5%': '提高 0.5% 暴击率',
'Increases maximum life by 5%':'提高 5% 血量上限', 'Increases maximum life by 5%': '提高 5% 血量上限',
'Increases crime success rate':'提高犯罪成功率', 'Increases crime success rate': '提高犯罪成功率',
'Decreases education course length by 2%':'降低教育课程 2% 时长', 'Decreases education course length by 2%': '降低教育课程 2% 时长',
'Increases frequency of items found in the city':'提高城市中发现物品的频率', 'Increases frequency of items found in the city': '提高城市中发现物品的频率',
'Increases bank interest by 5%':'提高 5% 银行利息', 'Increases bank interest by 5%': '提高 5% 银行利息',
'Increases money gained from mugging by 5%':'提高 5% 抢劫获得的金钱', 'Increases money gained from mugging by 5%': '提高 5% 抢劫获得的金钱',
'Increases ability to stealth attacks':'增加攻击后匿名的概率', 'Increases ability to stealth attacks': '增加攻击后匿名的概率',
'Increases hospitalization time by 5%':'提高被强制送往医院玩家 5% 的住院时长', 'Increases hospitalization time by 5%': '提高被强制送往医院玩家 5% 的住院时长',
'Reduces the negative effects of addiction by 2%':'降低 2% 毒瘾负面效果', 'Reduces the negative effects of addiction by 2%': '降低 2% 毒瘾负面效果',
'Increases employee effectiveness by +1':'增加 +1 员工效率', 'Increases employee effectiveness by +1': '增加 +1 员工效率',
'Gives a passive bonus to strength of 3%':'获得力量 3% 被动增益', 'Gives a passive bonus to strength of 3%': '获得力量 3% 被动增益',
'Gives a passive bonus to defense of 3%':'获得防御 3% 被动增益', 'Gives a passive bonus to defense of 3%': '获得防御 3% 被动增益',
'Gives a passive bonus to speed of 3%':'获得速度 3% 被动增益', 'Gives a passive bonus to speed of 3%': '获得速度 3% 被动增益',
'Gives a passive bonus to dexterity of 3%':'获得敏捷 3% 被动增益', 'Gives a passive bonus to dexterity of 3%': '获得敏捷 3% 被动增益',
'Increases proficiency with heavy artillery':'提高重炮精通', 'Increases proficiency with heavy artillery': '提高重炮精通',
'Increases proficiency with machine guns':'提高机枪精通', 'Increases proficiency with machine guns': '提高机枪精通',
'Increases proficiency with rifles':'提高步枪精通', 'Increases proficiency with rifles': '提高步枪精通',
'Increases proficiency with submachine guns':'提高冲锋枪精通', 'Increases proficiency with submachine guns': '提高冲锋枪精通',
'Increases proficiency with shotguns':'提高霰弹枪精通', 'Increases proficiency with shotguns': '提高霰弹枪精通',
'Increases proficiency with pistols':'提高手枪精通', 'Increases proficiency with pistols': '提高手枪精通',
'Increases proficiency with clubbing weapons':'提高冲击武器精通', 'Increases proficiency with clubbing weapons': '提高冲击武器精通',
'Increases proficiency with piercing weapons':'提高穿刺武器精通', 'Increases proficiency with piercing weapons': '提高穿刺武器精通',
'Increases proficiency with slashing weapons':'提高切割武器精通', 'Increases proficiency with slashing weapons': '提高切割武器精通',
'Increases proficiency with mechanical devices':'提高切割武器精通', 'Increases proficiency with mechanical devices': '提高切割武器精通',
'Increases proficiency with temporary weapons':'提高临时武器精通', 'Increases proficiency with temporary weapons': '提高临时武器精通',
'Increases damage and accuracy of heavy artillery weapons':'提高重炮伤害与命中', 'Increases damage and accuracy of heavy artillery weapons': '提高重炮伤害与命中',
'Increases damage and accuracy of machine gun weapons':'提高机枪伤害与命中', 'Increases damage and accuracy of machine gun weapons': '提高机枪伤害与命中',
'Increases damage and accuracy of rifle weapons':'提高步枪伤害与命中', 'Increases damage and accuracy of rifle weapons': '提高步枪伤害与命中',
'Increases damage and accuracy of submachine gun weapons':'提高冲锋枪伤害与命中', 'Increases damage and accuracy of submachine gun weapons': '提高冲锋枪伤害与命中',
'Increases damage and accuracy of shotgun weapons':'提高霰弹枪伤害与命中', 'Increases damage and accuracy of shotgun weapons': '提高霰弹枪伤害与命中',
'Increases damage and accuracy of pistol weapons':'提高手枪伤害与命中', 'Increases damage and accuracy of pistol weapons': '提高手枪伤害与命中',
'Increases damage and accuracy of axe & clubbing weapons':'提高斧头和冲击武器的伤害与命中', 'Increases damage and accuracy of axe & clubbing weapons': '提高斧头和冲击武器的伤害与命中',
'Increases damage and accuracy of piercing weapons':'提高穿刺武器的伤害与命中', 'Increases damage and accuracy of piercing weapons': '提高穿刺武器的伤害与命中',
'Increases damage and accuracy of slashing weapons':'提高切割武器的伤害与命中', 'Increases damage and accuracy of slashing weapons': '提高切割武器的伤害与命中',
'Increases damage and accuracy of mechanical devices':'提高机械武器的伤害与命中', 'Increases damage and accuracy of mechanical devices': '提高机械武器的伤害与命中',
'Increases damage and accuracy of temporary weapons':'提高临时武器的伤害与命中', 'Increases damage and accuracy of temporary weapons': '提高临时武器的伤害与命中',
'Are you sure you want to spend':'确定要花费', 'Are you sure you want to spend': '确定要花费',
'on':'在', 'on': '在',
'upgrade?':'升级上吗?', 'upgrade?': '升级上吗?',
'You have upgraded this merit upgrade to the maximum already.': 'You have upgraded this merit upgrade to the maximum already.':
'你已将该升级升满。', '你已将该升级升满。',
'This upgrade will give you one extra nerve point on your maximum nerve.': 'This upgrade will give you one extra nerve point on your maximum nerve.':
@ -1066,8 +1066,8 @@
$(e).text(chatDict[$(e).text().trim()]); $(e).text(chatDict[$(e).text().trim()]);
}); });
// 聊天设置的左边label // 聊天设置的左边label
$('div[class^="chat-settings-opts"] div[class*="label"]').each((i,e)=>{ $('div[class^="chat-settings-opts"] div[class*="label"]').each((i, e) => {
if($(e).next().children('div.rc-slider').length>0) { if ($(e).next().children('div.rc-slider').length > 0) {
// 高度和宽度有响应式的% // 高度和宽度有响应式的%
if (chatDict[$(e).text().split(' ')[0]]) { if (chatDict[$(e).text().split(' ')[0]]) {
$(e).text($(e).text().replace($(e).text().split(' ')[0], chatDict[$(e).text().split(' ')[0]])); $(e).text($(e).text().replace($(e).text().split(' ')[0], chatDict[$(e).text().split(' ')[0]]));
@ -1078,28 +1078,28 @@
$(e).text(chatDict[$(e).text().trim()]); $(e).text(chatDict[$(e).text().trim()]);
}); });
// 选项下拉栏 // 选项下拉栏
$('div[class^="dropdown-root"]').find('*').contents().each((i,e)=>{ $('div[class^="dropdown-root"]').find('*').contents().each((i, e) => {
if(e.nodeType!==3) return; if (e.nodeType !== 3) return;
if (chatDict[e.nodeValue]) if (chatDict[e.nodeValue])
e.nodeValue=chatDict[e.nodeValue]; e.nodeValue = chatDict[e.nodeValue];
}); });
// 设置的两个选项 // 设置的两个选项
$('label[class^="privacy-label"]').each((i,e)=>{ $('label[class^="privacy-label"]').each((i, e) => {
if (chatDict[$(e).text().trim()]) if (chatDict[$(e).text().trim()])
$(e).text(chatDict[$(e).text().trim()]); $(e).text(chatDict[$(e).text().trim()]);
}); });
// people中的5个分类 faction friend... // people中的5个分类 faction friend...
$('ul[class^="type-list"] li a').each((i,e)=>{ $('ul[class^="type-list"] li a').each((i, e) => {
if (chatDict[$(e).text().trim()]) if (chatDict[$(e).text().trim()])
$(e).text(chatDict[$(e).text().trim()]); $(e).text(chatDict[$(e).text().trim()]);
}); });
// people中的列表添加框placeholder // people中的列表添加框placeholder
$('div.ac-wrapper input.ac-search').each((i,e)=>{ $('div.ac-wrapper input.ac-search').each((i, e) => {
if (chatDict[$(e).attr('placeholder')]) if (chatDict[$(e).attr('placeholder')])
$(e).attr('placeholder',chatDict[$(e).attr('placeholder')]); $(e).attr('placeholder', chatDict[$(e).attr('placeholder')]);
}); });
// people中的列表添加框点击后的4个按钮 // people中的列表添加框点击后的4个按钮
$('div.ac-wrapper li a').each((i,e)=>{ $('div.ac-wrapper li a').each((i, e) => {
if (chatDict[$(e).text().trim()]) if (chatDict[$(e).text().trim()])
$(e).text(chatDict[$(e).text().trim()]); $(e).text(chatDict[$(e).text().trim()]);
}); });
@ -1424,7 +1424,7 @@
} else if (e.nodeValue.indexOf('second') >= 0 || } else if (e.nodeValue.indexOf('second') >= 0 ||
e.nodeValue.indexOf('minute') >= 0 || e.nodeValue.indexOf('minute') >= 0 ||
e.nodeValue.indexOf('hour') >= 0 || e.nodeValue.indexOf('hour') >= 0 ||
e.nodeValue.indexOf('day') >= 0 ) { e.nodeValue.indexOf('day') >= 0) {
e.nodeValue = e.nodeValue e.nodeValue = e.nodeValue
.replace('days', '天') .replace('days', '天')
.replace('day', '天') .replace('day', '天')
@ -1464,30 +1464,26 @@
$('div.module-desc ul.info').find('*').contents().each((i, e) => { $('div.module-desc ul.info').find('*').contents().each((i, e) => {
if (e.nodeValue === null) return; if (e.nodeValue === null) return;
if (eduDict[e.nodeValue.trim()]) if (eduDict[e.nodeValue.trim()])
e.nodeValue=eduDict[e.nodeValue.trim()]; e.nodeValue = eduDict[e.nodeValue.trim()];
else if (e.nodeValue.indexOf('Length')>=0){ else if (e.nodeValue.indexOf('Length') >= 0) {
e.nodeValue=e.nodeValue.replace('Length',eduDict['Length']) e.nodeValue = e.nodeValue.replace('Length', eduDict['Length'])
.replace('d ','日') .replace('d ', '日')
.replace('h ','时') .replace('h ', '时')
.replace('m ','分'); .replace('m ', '分');
} } else if (e.nodeValue.indexOf('Cost') >= 0) {
else if (e.nodeValue.indexOf('Cost')>=0){ e.nodeValue = e.nodeValue.replace('Cost', eduDict['Cost']);
e.nodeValue=e.nodeValue.replace('Cost',eduDict['Cost']); } else if (e.nodeValue.indexOf('manual labor') >= 0) {
} e.nodeValue = e.nodeValue.replace('manual labor', eduDict['manual labor'])
else if (e.nodeValue.indexOf('manual labor')>=0){ .replace('Gain', eduDict['Gain'])
e.nodeValue=e.nodeValue.replace('manual labor',eduDict['manual labor']) .replace('upon completion', eduDict['upon completion']);
.replace('Gain',eduDict['Gain']) } else if (e.nodeValue.indexOf('endurance') >= 0) {
.replace('upon completion',eduDict['upon completion']); e.nodeValue = e.nodeValue.replace('endurance', eduDict['endurance'])
} .replace('Gain', '获得')
else if (e.nodeValue.indexOf('endurance')>=0){ .replace('upon completion', eduDict['upon completion']);
e.nodeValue=e.nodeValue.replace('endurance',eduDict['endurance']) } else if (e.nodeValue.indexOf('intelligence') >= 0) {
.replace('Gain','获得') e.nodeValue = e.nodeValue.replace('intelligence', eduDict['intelligence'])
.replace('upon completion',eduDict['upon completion']); .replace('Gain', '获得')
} .replace('upon completion', eduDict['upon completion']);
else if (e.nodeValue.indexOf('intelligence')>=0){
e.nodeValue=e.nodeValue.replace('intelligence',eduDict['intelligence'])
.replace('Gain','获得')
.replace('upon completion',eduDict['upon completion']);
} }
}); });
} }
@ -1593,7 +1589,7 @@
propertyTrans(); propertyTrans();
propertyOB.observe($('div#properties-page-wrap')[0], {childList: true, subtree: true}); propertyOB.observe($('div#properties-page-wrap')[0], {childList: true, subtree: true});
}); });
const propertyTrans=function propertyTrans(){ const propertyTrans = function propertyTrans() {
// 黑框标题 // 黑框标题
$('div.title-black span').each((i, e) => { $('div.title-black span').each((i, e) => {
e.firstChild.nodeValue = '您想查看哪些房产?'; e.firstChild.nodeValue = '您想查看哪些房产?';
@ -1727,125 +1723,125 @@
* awards.php * awards.php
*/ */
if (window.location.href.indexOf('awards.php') >= 0) { if (window.location.href.indexOf('awards.php') >= 0) {
const awOB = new MutationObserver(() =>{ const awOB = new MutationObserver(() => {
awOB.disconnect(); awOB.disconnect();
awTrans(); awTrans();
awOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); awOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
}); });
const awTrans = function awTrans(){ const awTrans = function awTrans() {
titleTrans(); titleTrans();
contentTitleLinksTrans(); contentTitleLinksTrans();
// 顶部的3个分类 Honors (106) Medals (44) Merits (3) // 顶部的3个分类 Honors (106) Medals (44) Merits (3)
$('div.content-wrapper a.ui-tabs-anchor span.bold').contents().each((i,e)=>{ $('div.content-wrapper a.ui-tabs-anchor span.bold').contents().each((i, e) => {
if (e.nodeType !== 3) return; if (e.nodeType !== 3) return;
if (awDict[e.nodeValue.trim()]) if (awDict[e.nodeValue.trim()])
e.nodeValue = awDict[e.nodeValue.trim()]; e.nodeValue = awDict[e.nodeValue.trim()];
}); });
// 分类标题下的描述 // 分类标题下的描述
$('div.awards-msg').contents().each((i,e)=>{ $('div.awards-msg').contents().each((i, e) => {
// 文字节点 // 文字节点
if (e.nodeType === 3) { if (e.nodeType === 3) {
if (awDict[e.nodeValue.trim()]) if (awDict[e.nodeValue.trim()])
e.nodeValue = awDict[e.nodeValue.trim()]; e.nodeValue = awDict[e.nodeValue.trim()];
} }
// 子节点 // 子节点
else if(e.nodeType === 1){ else if (e.nodeType === 1) {
if (awDict[$(e).text().trim()]) if (awDict[$(e).text().trim()])
$(e).text(awDict[$(e).text().trim()]); $(e).text(awDict[$(e).text().trim()]);
else if ($(e).text().indexOf('medals')>=0) else if ($(e).text().indexOf('medals') >= 0)
$(e).text($(e).text().replace('medals', awDict['medals'])); $(e).text($(e).text().replace('medals', awDict['medals']));
else if ($(e).text().indexOf('honors')>=0) else if ($(e).text().indexOf('honors') >= 0)
$(e).text($(e).text().replace('honors', awDict['honors'])); $(e).text($(e).text().replace('honors', awDict['honors']));
} }
}); });
// 荣誉的描述 // 荣誉的描述
$('div#awards-tab-menu a[data-title]').each((i,e)=>{ $('div#awards-tab-menu a[data-title]').each((i, e) => {
const desc=$(e).attr('data-title').split(' <i>')[0]; const desc = $(e).attr('data-title').split(' <i>')[0];
if(awDict[desc]) if (awDict[desc])
$(e).attr('data-title',$(e).attr('data-title').replace(desc,awDict[desc])); $(e).attr('data-title', $(e).attr('data-title').replace(desc, awDict[desc]));
}); });
// 技能页面 Available Merits: x Merits Used: x // 技能页面 Available Merits: x Merits Used: x
$('div.awards-msg p').contents().each((i,e)=>{ $('div.awards-msg p').contents().each((i, e) => {
if(e.nodeType===3) if (e.nodeType === 3)
if(awDict[e.nodeValue.trim()]) if (awDict[e.nodeValue.trim()])
e.nodeValue=e.nodeValue.replace(e.nodeValue.trim(),awDict[e.nodeValue.trim()]); e.nodeValue = e.nodeValue.replace(e.nodeValue.trim(), awDict[e.nodeValue.trim()]);
}); });
// 勋章下 即将解锁的勋章框标题 技能加点的表头标题 // 勋章下 即将解锁的勋章框标题 技能加点的表头标题
$('div.title-black').contents().each((i,e)=>{ $('div.title-black').contents().each((i, e) => {
// 勋章下 即将解锁的勋章框标题 // 勋章下 即将解锁的勋章框标题
if (e.nodeType === 1){ if (e.nodeType === 1) {
if (awDict[$(e).text().trim()]) if (awDict[$(e).text().trim()])
$(e).text(awDict[$(e).text().trim()]); $(e).text(awDict[$(e).text().trim()]);
} }
// 技能加点的表头标题 // 技能加点的表头标题
else if (e.nodeType === 3){ else if (e.nodeType === 3) {
if(awDict[e.nodeValue.trim()]) if (awDict[e.nodeValue.trim()])
e.nodeValue = awDict[e.nodeValue.trim()]; e.nodeValue = awDict[e.nodeValue.trim()];
} }
}); });
// 荣誉和勋章的左边栏分类选择菜单 // 荣誉和勋章的左边栏分类选择菜单
$('div.tab-menu-cont li.ui-state-default a').each((i,e)=>{ $('div.tab-menu-cont li.ui-state-default a').each((i, e) => {
if (awDict[$(e).text().trim()]) if (awDict[$(e).text().trim()])
$(e).text(awDict[$(e).text().trim()]); $(e).text(awDict[$(e).text().trim()]);
}); });
// 技能点名字 // 技能点名字
$('ul#merits-list span.name').each((i,e)=>{ $('ul#merits-list span.name').each((i, e) => {
if (awDict[$(e).text().trim()]) if (awDict[$(e).text().trim()])
$(e).text(awDict[$(e).text().trim()]); $(e).text(awDict[$(e).text().trim()]);
}); });
// 技能点短描述 // 技能点短描述
$('ul#merits-list span.desc span[class^="t-"]').each((i,e)=>{ $('ul#merits-list span.desc span[class^="t-"]').each((i, e) => {
// const slash = $(e).attr('class') === 't-show' ? '- ' : ''; // const slash = $(e).attr('class') === 't-show' ? '- ' : '';
const isShow = $(e).attr('class') === 't-hide'; const isShow = $(e).attr('class') === 't-hide';
const key = isShow?$(e).text().slice(2):$(e).text(); const key = isShow ? $(e).text().slice(2) : $(e).text();
if (awDict[key]) if (awDict[key])
$(e).text((isShow?'- ':'')+awDict[key]); $(e).text((isShow ? '- ' : '') + awDict[key]);
}); });
// 技能点展开详细描述与确认 // 技能点展开详细描述与确认
$('ul#merits-list div.msg').contents().each((i,e)=>{ $('ul#merits-list div.msg').contents().each((i, e) => {
// x merit(s) // x merit(s)
if (e.nodeType === 1){ if (e.nodeType === 1) {
const spl=$(e).text().split(' '); const spl = $(e).text().split(' ');
if (awDict[spl[1]]) if (awDict[spl[1]])
$(e).text(spl[0]+' '+awDict[spl[1]]); $(e).text(spl[0] + ' ' + awDict[spl[1]]);
} }
// 文字片段 // 文字片段
else if (e.nodeType === 3){ else if (e.nodeType === 3) {
if (awDict[e.nodeValue.trim()]) { if (awDict[e.nodeValue.trim()]) {
e.nodeValue = awDict[e.nodeValue.trim()] + ''; e.nodeValue = awDict[e.nodeValue.trim()] + '';
return; return;
} }
const spl=e.nodeValue.trim().split('\n'); const spl = e.nodeValue.trim().split('\n');
// 未升级完成 // 未升级完成
if(spl.length === 3) { if (spl.length === 3) {
const upgradeName = spl[1].slice(5,-9); const upgradeName = spl[1].slice(5, -9);
const on=spl[0]; const on = spl[0];
const upgrade=spl[1].slice(-8); const upgrade = spl[1].slice(-8);
const desc=spl[2]; const desc = spl[2];
if (awDict[on] && awDict[upgrade] && awDict[upgradeName] && awDict[desc]) if (awDict[on] && awDict[upgrade] && awDict[upgradeName] && awDict[desc])
e.nodeValue = ' ' + awDict[on] + awDict[upgradeName] + e.nodeValue = ' ' + awDict[on] + awDict[upgradeName] +
awDict[upgrade] + awDict[desc]; awDict[upgrade] + awDict[desc];
} }
// 升级完成 // 升级完成
else if(spl.length===1){ else if (spl.length === 1) {
const upgraded=e.nodeValue.trim().slice(0,60); const upgraded = e.nodeValue.trim().slice(0, 60);
const desc=e.nodeValue.trim().slice(61); const desc = e.nodeValue.trim().slice(61);
if (awDict[upgraded]) if (awDict[upgraded])
e.nodeValue=awDict[upgraded]; e.nodeValue = awDict[upgraded];
if (awDict[desc]) if (awDict[desc])
e.nodeValue+=awDict[desc]; e.nodeValue += awDict[desc];
} }
} }
}); });
// spend按钮 // spend按钮
if(awDict[$('ul#merits-list a.btn').text().trim()]) if (awDict[$('ul#merits-list a.btn').text().trim()])
$('ul#merits-list a.btn').text(awDict[$('ul#merits-list a.btn').text().trim()]); $('ul#merits-list a.btn').text(awDict[$('ul#merits-list a.btn').text().trim()]);
// cancel按钮 // cancel按钮
if(awDict[$('ul#merits-list a.cancel').text().trim()]) if (awDict[$('ul#merits-list a.cancel').text().trim()])
$('ul#merits-list a.cancel').text(awDict[$('ul#merits-list a.cancel').text().trim()]); $('ul#merits-list a.cancel').text(awDict[$('ul#merits-list a.cancel').text().trim()]);
}; };
awTrans(); awTrans();
awOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); awOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
return; return;
} }