更新股票页面
This commit is contained in:
parent
0f92a6c813
commit
04f5e187c2
@ -1121,10 +1121,10 @@
|
||||
'1y': '1年',
|
||||
'Live': '实时',
|
||||
'live': '实时',
|
||||
'Last hour': '过去一小时',
|
||||
'Last hour': '过去一时',
|
||||
'Last day': '过去一天',
|
||||
'Last week': '过去一周',
|
||||
'Last month': '过去一个月',
|
||||
'Last month': '过去一月',
|
||||
'Last year': '过去一年',
|
||||
'All time': '有史以来',
|
||||
'Owned': '持有',
|
||||
@ -1206,7 +1206,7 @@
|
||||
'to unlock the': '用以解锁',
|
||||
'increment': '增益',
|
||||
'After': '在',
|
||||
'You currently have': '你目前有',
|
||||
'You currently have': '你已获得',
|
||||
'benefit': '增益',
|
||||
'You cannot buy shares while traveling': '你在旅行时无法购买',
|
||||
'You cannot sell shares while traveling': '你在旅行时无法出售',
|
||||
@ -1242,6 +1242,19 @@
|
||||
'Sell': '售出',
|
||||
'Merge': '合并',
|
||||
};
|
||||
const itemNameDict = {
|
||||
"Six Pack of Alcohol": '6瓶装酒箱',
|
||||
"Ammunition Pack": '',
|
||||
"Box of Grenades": '手雷箱',
|
||||
"Feathery Hotel Coupon": 'FHC 金卡',
|
||||
"Lawyer Business Card": '律师卡 (黑卡)',
|
||||
"Lottery Voucher": '彩票券',
|
||||
"Six Pack of Energy Drink": '6瓶装饮料箱',
|
||||
"Erotic DVD": '瑟琴 DVD',
|
||||
"Drug Pack": '药包 (小DP)',
|
||||
"Clothing Cache": '服饰箱',
|
||||
"Box of Medical Supplies": '医疗补给包',
|
||||
};
|
||||
|
||||
// 默认开启通知翻译
|
||||
if (!localStorage.getItem('wh_trans_event')) {
|
||||
@ -1912,8 +1925,13 @@
|
||||
});
|
||||
// 右侧bb名
|
||||
$('div[class^="dividendInfo"] p').each((i, e) => {
|
||||
const spl = $(e).text().trim().split(' ');
|
||||
if (stockDict[$(e).text().trim()]) {
|
||||
$(e).text(stockDict[$(e).text().trim()]);
|
||||
} else if (/[0-9]x$/.test(spl[0])) {
|
||||
const itemName = spl.slice(1).join(' ');
|
||||
const num = spl[0].slice(0, -1);
|
||||
$(e).text(`${num}个${itemNameDict[itemName] ? itemNameDict[itemName] : itemName}`);
|
||||
}
|
||||
});
|
||||
// 股价详情
|
||||
@ -1944,7 +1962,7 @@
|
||||
$(e).text(stockDict[$(e).text().trim()]);
|
||||
}
|
||||
});
|
||||
// 点开分红后文字
|
||||
// 点开bb后
|
||||
$('div#panel-dividendTab div[class^="message"] *').contents().each((i, e) => {
|
||||
if (e.nodeType !== 3) return;
|
||||
if (!e.nodeValue.trim()) return;
|
||||
@ -1959,7 +1977,12 @@
|
||||
else if (/[0-9]x$/.test(e.nodeValue.trim().split(' ')[0])) {
|
||||
const spl = e.nodeValue.trim().split(' ');
|
||||
const itemName = spl.slice(1).join(' ');
|
||||
e.nodeValue = ` ${spl[0].replace('x', '个')} ${itemName}`;
|
||||
e.nodeValue =
|
||||
` ${
|
||||
spl[0].replace('x', '个')
|
||||
} ${
|
||||
itemNameDict[itemName] ? itemNameDict[itemName] : itemName
|
||||
}`;
|
||||
} else {
|
||||
if (/[\u4e00-\u9fa5]/.test(e.nodeValue)) return;
|
||||
if (/\b\$?[0-9,]+$/.test(e.nodeValue)) return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user