Greasy Fork is available in English.

返利推广链接自动清洗

自三方购物推荐网站(什么值得买,没得比等)点击推广链接进入京东/易迅/亚马逊/一号店/当当等商城时,自动清除推广尾巴并净化cookies。支持列表详见说明。

< Feedback on 返利推广链接自动清洗

Review: Good - script works

CYD
§
Posted: 29.4.2018
Edited: 29.4.2018

京东优惠券coupon.m.jd.com无法领取

http://coupon.m.jd.com/coupons/show.action?key=d570541fc2f346148a102d09ff18b50f&roleId=11083415

function getQueryString(name) {  
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
    var r = window.location.search.substr(1).match(reg);  
    if (r != null) return unescape(r[2]);  
    return null;  
}  
if (window.location.host.indexOf("jd.") > 0) {  
    if (window.location.host.indexOf("re.jd.com") == 0) {  
        location.replace(document.getElementsByClassName("gobuy")[0].getElementsByTagName("a")[0].href);  
    }  
    if (window.location.search.indexOf("jd_pop=") > 0 || window.location.search.indexOf("utm_source") > 0) {  
        for (i = 0; i < jdad.length; i++) {  
            setcookie(jdad[i], jdad[i + 1]);  
        }  
        if(window.location.host.indexOf("coupon.m.jd.com") == 0 ){  
            location.replace(window.location.origin + window.location.pathname + "?key=" + getQueryString("key") + "&roleId=" + getQueryString("roleId"));
        }else{  
            location.replace(window.location.origin + window.location.pathname);  
        }  
    }  
}  

稍微改进了下。 感谢原作者。

§
Posted: 16.10.2018

这是放在哪段啊?

§
Posted: 16.10.2018

@CYD 说道: http://coupon.m.jd.com/coupons/show.action?key=d570541fc2f346148a102d09ff18b50f&roleId=11083415

function getQueryString(name) {  
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
    var r = window.location.search.substr(1).match(reg);  
    if (r != null) return unescape(r[2]);  
    return null;  
}  
if (window.location.host.indexOf("jd.") > 0) {  
    if (window.location.host.indexOf("re.jd.com") == 0) {  
        location.replace(document.getElementsByClassName("gobuy")[0].getElementsByTagName("a")[0].href);  
    }  
    if (window.location.search.indexOf("jd_pop=") > 0 || window.location.search.indexOf("utm_source") > 0) {  
        for (i = 0; i < jdad.length; i++) {  
            setcookie(jdad[i], jdad[i + 1]);  
        }  
        if(window.location.host.indexOf("coupon.m.jd.com") == 0 ){  
            location.replace(window.location.origin + window.location.pathname + "?key=" + getQueryString("key") + "&roleId=" + getQueryString("roleId"));
        }else{  
            location.replace(window.location.origin + window.location.pathname);  
        }  
    }  
}  

稍微改进了下。 感谢原作者。

放在哪段啊

Post reply

Sign in to post a reply.