diff --git a/zhcn_translate.js b/zhcn_translate.js index 05a6012..3f8963c 100644 --- a/zhcn_translate.js +++ b/zhcn_translate.js @@ -297,15 +297,11 @@ */ if ($(e).text().indexOf('bazaar') >= 0) { const bazEN=e.childNodes[1].nodeValue; - // const itemStart=bazEN.indexOf(' x ')+3; - // const itemEnd=bazEN.indexOf(' from your bazaar for '); const spl=bazEN.split(' '); - const num=spl[2].replace('.',''); - // const item=bazEN.slice(itemStart,itemEnd); + const num=spl[2]; const item=spl.slice(4,spl.indexOf('from')).join(' '); - console.log(item) - const money=spl[spl.length-1]; + const money=spl[spl.length-1].replace('.',''); e.childNodes[1].nodeValue=' 花费 '+money+' 从你的 bazaar 买了 '+num+' 个 '+' '+item+'。'; return;