懒人工具箱a été signalé 27/02/2025 pour Autre

Le rapport dit :

for the sole purpose adding antifeatures on


getCouponData(GMPrefix,url){

var _this = this;

return new Promise((resolve,reject)=>{

(async function(){

let GMValue = GM_listValues();

if(GMValue.length>0){

GMValue.forEach(function(item){

if(item.startsWith(GMPrefix)){

let info = GM_getValue(item,false);

if(info && new Date().getTime() - info.addTime > 3600*1000){

GM_deleteValue(item);

}
}

})
}

let GMValueName = GMPrefix+'_'+_this.goods_id;

let info = GM_getValue(GMValueName,false);

console.log('GM中数据:',info);

if(!info){

let result = await _this.request('get',url);

let data = JSON.parse(result);

if(data.code==200){

data.addTime = new Date().getTime();

GM_setValue(GMValueName,data);

resolve(data);

}else{
console.log('服务端错误:',data);
resolve(false)
}

}else{

resolve(info);
}

})()

})

}

tbCouponHtml(resp){

var _this = this;

if(resp.code==200){

_this.coupon_info.amount = resp.data.youhuiquan;

_this.coupon_info.link = `https://api.typechrome.com/code.php?link=${resp.data.code_url}`;

let html =
`


¥
${resp.data.youhuiquan}
${resp.data.coupon_info}
有效期
${resp.data.coupon_end_time}

`;
document.getElementById(_this.className.zhm_div_s).innerHTML=html;

_this.createQrcode(_this.className.tbqrcode,resp.data.code_url,67);

_this.positionQrcode(resp.data.code_url,'淘宝/天猫APP扫码领券');

if(document.querySelector('.Actions--root--hwEujgc')){

document.querySelector('.Actions--root--hwEujgc').style="position:unset";

}

(async function(){

let cssObj = await _this.getCssData(_this.nowName);

for(let i=0;i{

let timer = setInterval(function(){

if(_this.goods_title){

clearInterval(timer);

resolve(_this.goods_title);
}

})
})

}

keywordSearch(){

var _this = this;

(async function(){

let keywordData = [
{
'indexName':'jd',
'text':'京东',
'icon':'https://www.jd.com/favicon.ico'
},{
'indexName':'pdd',
'text':'拼多多',
'icon':'https://www.pinduoduo.com/homeFavicon.ico'
},{
'indexName':'vip',
'text':'唯品汇',
'icon':'https://www.vip.com/favicon.ico'
},{
'indexName':'tb',
'text':'淘宝',
'icon':'https://gw.alicdn.com/imgextra/i4/O1CN01qOI6vB1zaqrBKbyFr_!!6000000006731-73-tps-64-64.ico'
}
];

let html = `

    `;

    html +=`
  • 找同款
  • `;

    keywordData.forEach(function(item){

    html += `
  • ${item.text}`;

    html += `
      `;

      html +=`
    • `


      html += `
      `;

      html += `
      `;

      html += `
      `;

      html += `加载中...
    • `;

      html += `
    `;

    html += `
  • `;
    })

    html +=`
`;

html +=`
`;

let n=0;

let timer = setInterval(function(){

if(_this.coupon_info.amount){

clearInterval(timer);

let html = '';

html +=`
`;

html +=`
当前商品领券立减
¥${_this.coupon_info.amount}
`;

let navLiDom = document.createElement("li");

navLiDom.style='list-style: none;';

navLiDom.innerHTML = html;

document.querySelector(`.${_this.className.keywordNav}`).appendChild(navLiDom);

}

if(n++>20){

clearInterval(timer);
}

},500);

let keywordDom = document.createElement('div');


keywordDom.innerHTML = html;

document.body.appendChild(keywordDom);

let keywordTabList = document.querySelectorAll('.'+_this.className.keywordNavLiActive);

keywordTabList.forEach(function(item){

item.className='';

item.addEventListener('mouseenter',function(){

keywordTabList.forEach(function(e){

e.className='';

e.nextElementSibling.className =_this.className.keywordGoodsList;

})

item.className=_this.className.keywordNavLiActive;

item.nextElementSibling.className=`${_this.className.keywordGoodsList} ${_this.className.keywordGoodsListActive}`;

(async function(){

let keyword = await _this.keywordGoodTitle();

if(!keyword){console.log(_this.nowName+':页面商品名称未获取');return;}

let platform = item.getAttribute('data');

let itemIcon = item.querySelector('img').src;

let goodsListDom = document.querySelector(`#${platform}${_this.className.keywordGoodsUl}`);

if(goodsListDom.innerText != '加载中...'){

return true;
}

let keywordUrl = `https://api.typechrome.com/goods_title_search.php?goods_title=${encodeURIComponent(keyword)}&platform=${platform}`;

let resp = await _this.request('get',keywordUrl);

let jsonData = JSON.parse(resp);

var html = '';

if(jsonData.code==200){

let data = jsonData.data;

let vipCurrentLineHeight = _this.nowName=='vip'?'line-height:18px':'';

if(data[platform].length>0){

data[platform].forEach(function(e){

html +=``;

html +=`
  • ¥${e.goods_price}`;

    if(e.goods_coupon){

    html += `券后`;
    }

    html += `
    ${e.goods_title}
  • `;

    })

    }else{

    html +=`
  • 暂无商品
  • `;

    }

    }else{

    html +=`
  • 暂无商品
  • `;

    }

    goodsListDom.innerHTML=html;

    })()

    });

    item.nextElementSibling.addEventListener('mouseleave', function(e) {

    keywordTabList.forEach(function(e){

    e.className='';

    e.nextElementSibling.className =_this.className.keywordGoodsList;

    })

    })

    });

    let keywordSearch = document.querySelector('.'+_this.className.keywordSearch);

    keywordSearch.addEventListener('mouseleave', function() {

    keywordTabList.forEach(function(e){

    e.className='';

    e.nextElementSibling.className =_this.className.keywordGoodsList;

    })

    });

    })()

    }
    taobaoSearch(item){

    let timer = setInterval(function(){

    let dom = document.querySelector('#selectTb');

    if(!dom){

    let selectsDom =document.querySelector('.next-checkbox-group');

    if(selectsDom){

    let labels = selectsDom.querySelectorAll('label');

    labels.forEach(function(item){

    let itemText = item.querySelector('span:last-child').innerText;

    if(itemText=='天猫'){

    let tbLabels = item.cloneNode(true);

    tbLabels.setAttribute('id','selectTb');

    let inputDom = tbLabels.querySelector('span:first-child > input');

    inputDom.value='service:taobao';

    tbLabels.querySelector('.next-checkbox-label').innerText='淘宝';

    let insertDom = selectsDom.querySelector('label:nth-of-type(2)');

    insertDom.before(tbLabels);

    tbLabels.addEventListener('click',selectTaobao);

    tbLabels.querySelector('.next-checkbox-label').addEventListener('click',function(e){
    e.stopPropagation();
    })
    }

    })

    }

    }else{

    if(dom.className == 'next-checkbox-wrapper checked '){

    showTbPage();

    }
    }


    })

    function selectTaobao(e){

    let parentDom = e.target.parentNode;

    if(parentDom.className =='next-checkbox' && parentDom.parentNode.className == 'next-checkbox-wrapper '){

    parentDom.parentNode.className='next-checkbox-wrapper checked ';

    showTbPage();

    return;

    }else{

    parentDom.parentNode.className='next-checkbox-wrapper ';

    let items = document.querySelectorAll('.Content--contentInner--QVTcU0M > div > a');

    items.forEach(function(item){

    item.parentNode.style='display:block';

    });


    }



    }

    function showTbPage(){

    let items = document.querySelectorAll('.Content--contentInner--QVTcU0M > div > a');

    items.forEach(function(item){

    if(!item.href.match(/^https:\/\/item\.taobao\.com/)){

    item.parentNode.style='display:none';

    }

    });

    }

    }

    Ce script a été mis à jour depuis le dépôt du rapport.

    Ce script a fait l'objet d' 1 rapport précédemment confirmé ou corrigé.

    GoodJoe(l'utilisateur signalé) a effectué:

    signalerCe rapport a été approuver par un modérateur.