更新股票页面

This commit is contained in:
woohoo 2021-11-24 12:32:50 +08:00
parent b9e240a4c4
commit 3575b33cbd

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name Torn翻译 // @name Torn翻译
// @namespace WOOH // @namespace WOOH
// @version 0.1.1123a // @version 0.1.1124a
// @description Torn UI翻译 // @description Torn UI翻译
// @author Woohoo-[2687093] sabrina_devil[2696209] // @author Woohoo-[2687093] sabrina_devil[2696209]
// @match https://www.torn.com/* // @match https://www.torn.com/*
@ -1129,7 +1129,7 @@
'Owned': '持有', 'Owned': '持有',
'Dividend': '分红', 'Dividend': '分红',
'West Side University': '西城大学', 'West Side University': '西城大学',
'Insured On Us': '', 'Insured On Us': '托恩人保',
'Torn City Investments': 'Torn City 投资', 'Torn City Investments': 'Torn City 投资',
'Torn & Shanghai Banking': 'Torn 和上海银行', 'Torn & Shanghai Banking': 'Torn 和上海银行',
'Symbiotic Ltd.': '共生公司', 'Symbiotic Ltd.': '共生公司',
@ -1137,63 +1137,78 @@
'Feathery Hotels Group': '飞亚达酒店集团', 'Feathery Hotels Group': '飞亚达酒店集团',
'Mc Smoogle Corp': '麦斯莫格公司', 'Mc Smoogle Corp': '麦斯莫格公司',
'Wind Lines Travel': '风线旅行', 'Wind Lines Travel': '风线旅行',
'Performance Ribaldry': '', 'Performance Ribaldry': '低俗演绎',
'Syscore MFG': '', 'Syscore MFG': '系统核心 MFG',
'Evil Ducks Candy Corp': '邪恶鸭糖果公司', 'Evil Ducks Candy Corp': '邪恶鸭糖果公司',
'Munster Beverage Corp.': '明斯特饮料公司', 'Munster Beverage Corp.': '明斯特饮料公司',
'Torn City Clothing': 'Torn City 服饰', 'Torn City Clothing': 'Torn City 服饰',
'Lucky Shots Casino': '幸运赌场', 'Lucky Shots Casino': '幸运赌场',
'TC Media Productions': '', 'TC Media Productions': 'TC 媒体制作公司',
'International School TC': '', 'International School TC': 'TC 国际学校',
'Big Al\'s Gun Shop': '', 'Big Al\'s Gun Shop': '大艾尔枪店',
'Torn City Health Service': '', 'Torn City Health Service': 'TC 健康服务中心',
'Alcoholics Synonymous': '', 'Alcoholics Synonymous': '',
'Torn City Motors': '', 'Torn City Motors': 'TC 汽车',
'Legal Authorities Group': '', 'Legal Authorities Group': '权威法律集团',
'The Torn City Times': '', 'The Torn City Times': '托恩时代',
'Grain': '谷物', 'Grain': '谷物',
'Eaglewood Mercenary': '', 'Eaglewood Mercenary': '鹰林佣兵',
'Home Retail Group': '', 'Home Retail Group': '家居零售集团',
'Empty Lunchbox Traders': '', 'Empty Lunchbox Traders': '空饭盒贸易商',
'Messaging Inc.': '', 'Messaging Inc.': '信息公司',
'TC Music Industries': '', 'TC Music Industries': 'TC 音乐工业公司',
'I Industries Ltd.': '', 'I Industries Ltd.': '一号工业有限公司',
'Tell Group Plc.': '', 'Tell Group Plc.': '讲述集团',
'Yazoo': '', 'Yazoo': '',
'10% Bank Interest Bonus': '10% 银行利润增益',
'Inactive': '未激活',
// '$50,000,000': '',
// '1x Drug Pack': '', // '1x Drug Pack': '',
// '$80,000,000': '',
// '1x Feathery Hotel Coupon': '', // '1x Feathery Hotel Coupon': '',
'100 Energy': '100 能量E',
'Private Jet Access': '解锁私人飞机',
// '1x Erotic DVD': '', // '1x Erotic DVD': '',
'1000 Happiness': '1000 快乐',
'Advanced Firewall': '高级防火墙',
// '1x Six Pack of Energy Drink': '', // '1x Six Pack of Energy Drink': '',
// '1x Clothing Cache': '', // '1x Clothing Cache': '',
'Company Sales Boost': '提升公司销售',
// '1x Lottery Voucher': '', // '1x Lottery Voucher': '',
'Free Education Courses': '免费教育课程',
// '1x Ammunition Pack': '', // '1x Ammunition Pack': '',
// '1x Box of Medical Supplies': '', // '1x Box of Medical Supplies': '',
// '1x Six Pack of Alcohol': '', // '1x Six Pack of Alcohol': '',
'10% Racing Skill Boost': '提升 10% 赛车技能增长',
// '1x Lawyer Business Card': '', // '1x Lawyer Business Card': '',
// '$1,000,000': '',
// '$4,000,000': '',
// '1x Box of Grenades': '', // '1x Box of Grenades': '',
'1x Random Property': '1 个随机房产', '1x Random Property': '1 个随机房产',
'10% Bank Interest Bonus': '10% 银行利润增益',
'a 10% Bank Interest Bonus': '10% 银行利润增益',
'100 Energy': '100 能量E',
'Private Jet Access': '解锁私人飞机',
'1000 Happiness': '1000 快乐',
'Advanced Firewall': '高级防火墙',
'an Advanced Firewall': '高级防火墙',
'Company Sales Boost': '提升公司销量',
'a Company Sales Boost': '提升公司销量',
'Free Education Courses': '免费教育课程',
'a Free Education Courses': '免费教育课程',
'10% Racing Skill Boost': '提升 10% 赛车技能增长',
'10% Home Upgrade Discount': '10% 房屋设施费用折扣', '10% Home Upgrade Discount': '10% 房屋设施费用折扣',
'Free Classified Advertising': '免费分类广告', 'Free Classified Advertising': '免费分类广告',
// '$25,000,000': '', '50% Coding Time Reduction': '缩减 50% 编程时间',
// '$12,000,000': '', 'Company Advertising Boost': '公司广告增益',
'50% Coding Time Reduction': '缩减 50% 变成时间', 'a Company Advertising Boost': '公司广告增益',
'Company Advertising Boost': '',
'10% Course Time Reduction': '缩减 10% 教育时间', '10% Course Time Reduction': '缩减 10% 教育时间',
'Benefit active': '已激活分红', 'a 10% Education Course Time Reduction': '缩减 10% 教育时间',
'Free Banner Advertising': '免费横幅广告', 'Free Banner Advertising': '免费横幅广告',
'a Free Banner Advertising': '免费横幅广告',
'Inactive': '未激活',
'Benefit active': '分红已激活',
'provides': '将提供',
'Every': '在每',
'when holding at least': '后,仅当持有至少',
'shares currently valued at': '股时,目前总价:',
'days': '日',
'Buy': '购买',
'more shares for': '股,目前总价',
'to unlock the': '用以解锁',
'increment': '增益',
'After': '在',
'You currently have': '你目前有',
'benefit': '增益',
'You cannot buy shares while traveling': '你在旅行时无法购买',
'You cannot sell shares while traveling': '你在旅行时无法出售',
}; };
// 默认开启通知翻译 // 默认开启通知翻译
@ -1864,11 +1879,23 @@
} }
}); });
// 右侧bb名 // 右侧bb名
let i=0;
$('div[class^="dividendInfo"] p').each((i, e) => { $('div[class^="dividendInfo"] p').each((i, e) => {
if (stockDict[$(e).text().trim()]) { if (stockDict[$(e).text().trim()]) {
$(e).text(stockDict[$(e).text().trim()]); $(e).text(stockDict[$(e).text().trim()]);
console.log(++i) }
});
// 天上点开购买后的提示
$('div[class^="manageTab"] div[class^="manageBlock"] div').each((i, e) => {
if (stockDict[$(e).text().trim()]) $(e).text(stockDict[$(e).text().trim()]);
});
// 点开分红后文字
$('div[class^="stockMarket"] div[class^="message"] *').contents().each((i, e) => {
if (e.nodeType !== 3) return;
if (!e.nodeValue.trim()) return;
if (stockDict[e.nodeValue.trim()]) {
e.nodeValue = stockDict[e.nodeValue.trim()];
} else {
if (!/[\u4e00-\u9fa5]/.test(e.nodeValue)) console.log(`未找到翻译:[${e.nodeValue.trim()}]`);
} }
}); });
}; };