在京东浏览商品时,可选择自动为你勾选 [京东配送]、[仅显示有货]、[销量排序]。方便实用!
当前为
// ==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 /https?://search.jd.com/.+/
// @grant none
// @run-at document_start
// @version 2.3.0
// ==/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;
}();