From dd94eb0a17dcf39bea776cf86780472c5c995d8d Mon Sep 17 00:00:00 2001 From: woohoo Date: Sat, 6 Nov 2021 21:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=BF=E5=B1=8B=E4=B9=B0?= =?UTF-8?q?=E5=8D=96=E7=A7=9F=E8=B5=81=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- torn-trans-zhcn.user.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/torn-trans-zhcn.user.js b/torn-trans-zhcn.user.js index 8bb165e..6c0acff 100644 --- a/torn-trans-zhcn.user.js +++ b/torn-trans-zhcn.user.js @@ -464,28 +464,28 @@ Yes No - 你确定要以2750万美元租用另一个私人岛屿,为期30天? */ $('div[class="confirm-text"] span.question').each((i, e) => { - const cost=e.children[1].innerText.trim().split(' ')[1]; - const period=isRent?e.children[1].innerText.trim().split(' ')[6]:null; + //const cost=e.children[1].innerText.trim().split(' ')[1]; + //const period=isRent?e.children[1].innerText.trim().split(' ')[6]:null; const propName=e.firstElementChild.innerText.trim().split(' ').slice(8).join(' '); const hasAnother=$(e).text().indexOf('another')>0; - // console.log(cost); - // console.log(period); - // console.log(propName); if(hasAnother){ e.firstElementChild.firstChild.nodeValue='你确定要'; e.firstElementChild.firstChild.nodeValue+=isRent?'租用':'购买'; e.firstElementChild.childNodes[1].firstChild.nodeValue='另一个'; - e.firstElementChild.childNodes[2].nodeValue=propName; + e.firstElementChild.childNodes[2].nodeValue=propertyDict[propName]; } else{ e.firstElementChild.firstChild.nodeValue='你确定要'; e.firstElementChild.firstChild.nodeValue+=isRent?'租用':'购买'; - e.firstElementChild.firstChild.nodeValue+='另一个 '+propName; + e.firstElementChild.firstChild.nodeValue+='另一个'+propertyDict[propName]; } + e.children[1].firstChild.nodeValue='花费 '; + e.children[1].childNodes[2].nodeValue=isRent?' 租期 ':'?'; + if(isRent) + e.children[1].childNodes[4].nodeValue=' 天?'; }); propertyOB.observe($('div#properties-page-wrap')[0], {childList: true, subtree: true});