Pithy JD | 简洁 京东

首页仅保留导航栏、logo、搜索框。商品详情页信息居中,商品大图去水印,隐藏二维码,隐藏相关商品推荐,删除按钮边框虚线,隐藏搜索框推荐词

目前为 2020-07-29 提交的版本。查看 最新版本

// ==UserScript==
// @name         Pithy JD | 简洁 京东
// @namespace    https://greasyfork.org/zh-CN/scripts/407394
// @version      0.2.5
// @description  首页仅保留导航栏、logo、搜索框。商品详情页信息居中,商品大图去水印,隐藏二维码,隐藏相关商品推荐,删除按钮边框虚线,隐藏搜索框推荐词
// @author       AN drew
// @run-at       document-end
// @match        *://*.jd.com/*
// ==/UserScript==

(function() {
    'use strict';

    if(window.location.href=="https://order.jd.com/center/list.action"||window.location.href=="https://order.jd.com/center/list.action?search=0&d=1&s=4096")
    {
        window.location.href="https://order.jd.com/center/list.action?search=0&d=2&s=4096";
    }
    if(window.location.href=="https://order.jd.com/center/recycle.action"||window.location.href=="https://order.jd.com/center/recycle.action?d=1"||window.location.href=="https://order.jd.com/center/recycle.action?search=0&d=1&s=4096")
    {
        window.location.href="https://order.jd.com/center/recycle.action?search=0&d=2&s=4096";
    }

    if(window.location.href.indexOf("www.jd.com") > -1)
    {

        $("html, body, .mod_container").attr("style","height:100%; background:white;");
        $("#header").attr("style","border:none;");

        $("#logo").attr("style","position:fixed;");
        $("#logo").css('top', '30%').css('top', '-=80px');
        $("#logo").css('left', '50%').css('left', '-=100px');

        $(".logo_tit_lk").attr("style","position:fixed; margin:0px auto; width:250px;");
        $(".logo_tit_lk").css('top', '30%').css('top', '-=80px');
        $(".logo_tit_lk").css('left', '50%').css('left', '-=100px');

        $("#search .form").attr("style","position:fixed; width:546px;");
        $("#search .form").css('top', '60%').css('top', '-=80px');
        $("#search .form").css('left', '50%').css('left', '-=273px');

        $("#settleup .cw-icon").attr("style","position:fixed; width:132px; height:32px; cursor:pointer");
        $("#settleup .cw-icon").css('top', '33px');
        $("#settleup .cw-icon").css('left', '100%').css('left', '-=120px');
        $("#settleup .cw-icon").wrap('<a target="_blank" href="//cart.jd.com/cart.action"></a>');
        $("#settleup .cw-icon a").replaceWith('<span>我的购物车<span>');
        $("#settleup .cw-icon span").attr("style","color: #e1251b;");

        setInterval(function() {
            $("#J_searchbg, #J_accessibility, #J_promotional-top, #J_mobile").hide();
            $(".logo_subtit, .logo_extend, .logo_scene.logo_scene_hide, #logo>a").hide();
            $("#navitems, #hotwords, #treasure").hide();
            $(".fs, #app").hide();
        },1)
    }

    $("a.service, a.feedback, a.backtop, a.issue-tips").attr("style","border: 0; border-top: 1px solid #fff; border-bottom: 1px solid #fff;");

    $(".product-intro.clearfix").attr("style","display:flex;justify-content:center;");

    $(".logo_tit_lk").attr("href","javascript:void(0);").css("cursor","default");


    var timer = setInterval(function(){
        if($(".jdm-tbar-tab-top").length>0)
        {
            $(".jdm-tbar-tab-top").click(function(){
                $(window).scrollTop(0);
            })
            clearInterval(timer);
        }
    },100)

    setInterval(function() {
        if($(".bigimg").length>0 && $(".bigimg").attr("src").indexOf("/n0/") > -1)
        {
            $(".bigimg").attr("src", $(".bigimg").attr("src").replace("/n0/","/n12/"));
        }
        $(".zoomImg").each(function(){
            if($(this).attr("src").indexOf("/n0/") > -1)
                $(this).attr("src", $(this).attr("src").replace("/n0/","/n12/"));
        })

        $(".choose-support a span").css({"z-index":"1"});

        $(".jdm-tbar-tab-top a").children().unwrap();

        $("#J_fs_act_lk, #toolbar-qrcode, #J_news, #shopRecSuit, #pop-hot, #sp-new, #shop-similar-promotion").hide();
        $(".jTdCode, .user_profit, .track, .mobile_static, .purchase-op, .smart-guide-bottom").hide();
        $("#fittings").hide();
        $("#view-buy, #yuyue-reco, #view-view, #cart-smart, #c-tabs-new").hide();
        $(".m.m-aside:not([class*='popbox'])").hide();
        $(".m.m-content.hide").hide();
        $("#shareRecDemo, #guessing-liked, #orderAdids, #menu-ads, #miaozhen10772").hide();
        $(".bottom-search, .may-like, #main>.mod-main:nth-last-of-type(1)").hide();

        $(".m.m-block.m-plus, .m.m-block.m-what").hide();
 
    },1);
})();