Pithy JD | 简洁 京东

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

当前为 2020-08-14 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Pithy JD | 简洁 京东
// @namespace    https://greasyfork.org/zh-CN/scripts/407394
// @version      0.3.3
// @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)
    {
        var style1='#J_searchbg, #J_accessibility, #J_promotional-top, #J_mobile{'+
            '    display:none !important;'+
            '}'+
            'html, body, .mod_container{'+
            '    height:100%;'+
            '}'+
            '#header{'+
            '    border:none ;'+
            '    height:calc(100% - 31px);'+
            '}'+
            ''+
            '.logo_subtit, .logo_extend, .logo_scene.logo_scene_hide, #logo>a{'+
            '    display:none !important;'+
            '}'+
            ''+
            '#navitems, #hotwords, #treasure{'+
            '    display:none !important;'+
            '}'+
            ''+
            '.fs, #app{'+
            '    display:none !important;'+
            '}'+
            ''+
            '#logo{'+
            '    position:fixed;'+
            '    top:calc(30% - 80px);'+
            '    left:calc(50% - 100px);'+
            '}'+
            ''+
            '.logo_tit_lk{'+
            '    position:fixed;'+
            '    top:calc(30% - 80px);'+
            '    left:calc(50% - 100px);'+
            '    margin:0px auto;'+
            '    width:250px;'+
            '}'+
            ''+
            '#search .form{'+
            '    position:fixed;'+
            '    top:calc(60% - 80px);'+
            '    left:calc(50% - 273px);'+
            '    width:546px;'+
            '}'+
            ''+
            '#settleup .cw-icon{'+
            '    position:fixed;'+
            '    top:33px;'+
            '    left:calc(100% - 137px);'+
            '    width:132px;'+
            '    height:32px;'+
            '}'

        $("head").append($("<style>"+style1+"</style>"))

        $("#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;");

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

    }

    var style2=".choose-support a span{"+
        "    z-index:1;"+
        "}"+
        "   "+
        "    "+
        "a.service, a.feedback, a.backtop{"+
        "    border: 0px; border-top: 1px solid #fff !important; border-bottom: 1px solid #fff!important;"+
        "}"+
        ""+
        ".product-intro.clearfix{"+
        "    display:flex;justify-content:center;"+
        "}"+
        ".itemInfo-wrap{"+
        "    margin-left:20px;"+
        "}"+
        ""+
        "#J_fs_act_lk, #toolbar-qrcode, #J_news, #shopRecSuit, #pop-hot, #sp-new, #shop-similar-promotion {"+
        "    display:none !important;"+
        "}"+
        ""+
        ".jTdCode, .user_profit, .track, .mobile_static, .purchase-op, .smart-guide-bottom{"+
        "    display:none !important;"+
        "}"+
        ""+
        "#fittings{"+
        "    display:none !important;"+
        "}"+
        ""+
        "#view-buy, #yuyue-reco, #view-view, #cart-smart, #c-tabs-new{"+
        "    display:none !important;"+
        "}"+
        ".m.m-aside:not([class*='popbox']){"+
        "    display:none !important;"+
        "}"+
        ".m.m-content.hide{"+
        "    display:none !important;"+
        "}"+
        ""+
        "#shareRecDemo, #guessing-liked, #orderAdids, #menu-ads, #miaozhen10772{"+
        "    display:none !important;"+
        "}"+
        ""+
        ".bottom-search, .may-like, #main>.mod-main:nth-last-of-type(1){"+
        "    display:none !important;"+
        "}"+
        ".m.m-block.m-plus, .m.m-block.m-what"+
        "{"+
        "    display:none !important;"+
        "}"

    $("head").append($("<style>"+style2+"</style>"))


    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/"));
        })

    },1);

    var timer = setInterval(function(){
        if($(".jdm-tbar-tab-top").length>0)
        {
            $(".jdm-tbar-tab-top a").children().unwrap();

            $(".jdm-tbar-tab-top").click(function(){
                $(window).scrollTop(0);
            })
            clearInterval(timer);
        }
    },100)

})();