修改飞行部分
This commit is contained in:
parent
f01b969c08
commit
7536e63892
@ -26,9 +26,10 @@
|
||||
'\nRemaining Flight Time -\n': ' 剩余时间 - ',
|
||||
'Travel Home': "回国",
|
||||
'Rehabilitation': "戒毒康复",
|
||||
'People': "用户列表"
|
||||
'People': "用户列表",
|
||||
'Torn to Zurich.':'正在飞往瑞士苏黎世(Zurich)。',
|
||||
};
|
||||
//界面tips
|
||||
// 界面tips todo 全收集全翻译
|
||||
const tipsDict = {
|
||||
'\nAccording to the Economist Intelligence Unit\'s Quality of Life Index, Switzerland is the second best place in the world to be born, after Denmark. Torn ranked 224th, despite there being only 194 recognised nations in the world.\t': "根据经济学人信息部提供的生活质量指数,瑞士是世界上第二个最适合出生的地方,仅次于丹麦。尽管世界上只有194个公认的国家,但托恩却排名第224位。",
|
||||
|
||||
@ -43,17 +44,18 @@
|
||||
};
|
||||
|
||||
//如果在飞行页面
|
||||
if ($('span.remaining-time')[0] != null) {
|
||||
$('#skip-to-content')[0].firstChild.nodeValue += '飞行中';
|
||||
if ($('span.remaining-time').length !== 0) {
|
||||
$('#skip-to-content')[0].firstChild.nodeValue = '飞行中';
|
||||
|
||||
//飞行提示小文章
|
||||
//document.querySelector("#mainContainer > div.content-wrapper.logged-out.left.autumn.travelling > div.travel-agency-travelling > div.popup-info > div.inner-popup").textContent = '\nOne of the main requirements for a wedding to take place in Torn is the procurement of a ring. You may either purchase one from the Jewellery Store, or you can choose the more romantic option of stealing one, which requires far more effort if you think about it.\t'
|
||||
// 气泡 需要判断是否存在 因为torntools默认关闭云和飞机 冰蛙也会关闭
|
||||
if ($('div.inner-popup').length!==0 && tipsDict[$('div.inner-popup')[0].textContent]) {
|
||||
$('div.inner-popup')[0].textContent = tipsDict[$('div.inner-popup')[0].textContent];
|
||||
}
|
||||
|
||||
document.querySelector("#mainContainer > div.content-wrapper.logged-out.left.autumn.travelling > div.travel-agency-travelling > div.popup-info > div.inner-popup").textContent =
|
||||
tipsDict[document.querySelector("#mainContainer > div.content-wrapper.logged-out.left.autumn.travelling > div.travel-agency-travelling > div.popup-info > div.inner-popup").textContent];
|
||||
|
||||
// eg. Remaining Flight Time -
|
||||
$('span.remaining-time')[0].firstChild.nodeValue = travelingDict[$('span.remaining-time')[0].firstChild.nodeValue];
|
||||
// Remaining Flight Time -
|
||||
if(travelingDict[$('span.remaining-time')[0].firstChild.nodeValue]) {
|
||||
$('span.remaining-time')[0].firstChild.nodeValue = travelingDict[$('span.remaining-time')[0].firstChild.nodeValue];
|
||||
}
|
||||
|
||||
$("#recruit-citizens")[0].firstChild.nodeValue = travelingDict[$("#recruit-citizens")[0].firstChild.nodeValue];
|
||||
}
|
||||
@ -61,16 +63,21 @@
|
||||
//Events
|
||||
$("#events")[0].firstChild.nodeValue = travelingDict[$("#events")[0].firstChild.nodeValue]
|
||||
|
||||
// eg. Torn to London.
|
||||
if ($("#travel-home")[0] != null) {
|
||||
if ($("#travel-home").length !== 0) {
|
||||
$("#travel-home")[0].firstChild.nodeValue = travelingDict[$("#travel-home")[0].firstChild.nodeValue];
|
||||
$("#rehab")[0].firstChild.nodeValue = travelingDict[$("#rehab")[0].firstChild.nodeValue];//todo 在瑞士就加rehab
|
||||
$("#people")[0].firstChild.nodeValue = travelingDict[$("#people")[0].firstChild.nodeValue];
|
||||
}
|
||||
|
||||
new MutationObserver(mutations => {
|
||||
const remainingTime=new MutationObserver(mutations => {
|
||||
if(!travelingDict[$('span.description')[0].firstChild.nodeValue]) return;
|
||||
/**
|
||||
* Torn to {dest}.
|
||||
* <span class="description">Torn to Zurich.</span>
|
||||
*/
|
||||
$('span.description')[0].firstChild.nodeValue = travelingDict[$('span.description')[0].firstChild.nodeValue];
|
||||
}).observe($('span.description')[0], {attributes: true, childList: true, subtree: true});
|
||||
});
|
||||
remainingTime.observe($('span.remaining-time')[0], {childList: true, subtree: true});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user