更新房屋买卖租赁页面
This commit is contained in:
parent
852bf471f0
commit
36096527c6
@ -421,6 +421,7 @@
|
||||
* properties 从玩家租买和自己的房子页面
|
||||
*/
|
||||
if (window.location.href.indexOf('properties.php') >= 0) {
|
||||
const isRent = window.location.href.indexOf('rent') >= 0;
|
||||
const propertyOB = new MutationObserver(() => {
|
||||
propertyOB.disconnect();
|
||||
|
||||
@ -457,9 +458,28 @@
|
||||
<a class="t-blue bold m-left10 yes-btn c-pointer" href="#" data-id="3176475" data-market="selling" data-price="1705000000">Yes</a>
|
||||
<a href="#" class="t-blue no-btn bold m-left10 c-pointer">No</a>
|
||||
</span>
|
||||
你确定要以2750万美元租用另一个私人岛屿,为期30天?
|
||||
*/
|
||||
$('div[class="confirm-text"] span.question').each((i, e) => {
|
||||
console.log($(e).text());
|
||||
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;
|
||||
}
|
||||
else{
|
||||
e.firstElementChild.firstChild.nodeValue='你确定要';
|
||||
e.firstElementChild.firstChild.nodeValue+=isRent?'租用':'购买';
|
||||
e.firstElementChild.firstChild.nodeValue+='另一个 '+propName;
|
||||
}
|
||||
});
|
||||
|
||||
propertyOB.observe($('div#properties-page-wrap')[0], {childList: true, subtree: true});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user