Greasy Fork

Greasy Fork is available in English.

自动京东配送

在京东浏览商品时,可选择自动为你勾选 [京东配送]、[仅显示有货]、[销量排序]。方便实用!

当前为 2016-03-26 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         自动京东配送
// @namespace    http://hzy.pw
// @description  在京东浏览商品时,可选择自动为你勾选 [京东配送]、[仅显示有货]、[销量排序]。方便实用!
// @authuer      Moshel
// @homepageURL  http://hzy.pw/p/1349
// @supportURL   http://weibo.com/moshel
// @icon         http://hzy.pw/wp-content/uploads/2015/04/i.jpeg

// @include      http://list.jd.com/*
// @include      http://search.jd.com/*
// @grant        none
// @run-at       document_start

// @version      2.2.2
// ==/UserScript==


! function() {
    "use strict";

    var href = location.search;

    if (href.indexOf("delivery") < 0)
        href += "&delivery=1";
    if (href.indexOf("stock") < 0)
        href += "&stock=1";
    /* 图书页面的京东配送 */
    if (href.indexOf("wtype") < 0)
        href += "&wtype=1";
    /* 销量排序 */
    if (href.indexOf("psort") < 0)
        href += "&psort=3";

    if(location.search != href)
        location.search = href;

}();