更新通知

This commit is contained in:
woohoo 2021-11-18 19:49:09 +08:00
parent 9d80ef1932
commit 7c90052609

View File

@ -678,6 +678,10 @@
'ALL EVENTS (': '全部通知 (',
'RECEIVED (': '收到的通知 (',
'SAVED (': '保存的通知 (',
'hospitalized': '强制住院了',
'and earned your': ',赢得',
'bounty reward': '赏金',
'Someone hospitalized': '某人强制住院了',
};
const chatDict = {
'Global': '世界',
@ -2609,6 +2613,27 @@
return;
}
/**
* 悬赏已被领取
*/
if ($(e).text().contains(/bounty reward/)) {
$(e).contents().each((i, e) => {
if (e.nodeType === 3) {
if (eventsDict[e.nodeValue.trim()]) {
e.nodeValue = ` ${eventsDict[e.nodeValue.trim()]} `;
} else {
if (e.nodeValue.contains(/bounty reward/)) {
const bountyAmount = e.nodeValue.trim().split(' ')[3];
if (eventsDict['and earned your'] && eventsDict['bounty reward']) {
e.nodeValue = ` ${eventsDict['and earned your']} ${bountyAmount} ${eventsDict['bounty reward']}`;
}
}
}
}
});
return;
}
/**
* oc开启
* You have been selected by
@ -2774,8 +2799,7 @@
if (bookTitle) {
$(e).text(`你在家门口发现了 ${item1.numWordTrans()} 和《${bookTitle}》。`);
}
else {
} else {
$(e).text(`你在家门口发现了 ${item1.numWordTrans()}${item2.numWordTrans()}`);
}
return;