Greasy Fork

Greasy Fork is available in English.

LRH京东插件

LRH京东插件.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         LRH京东插件
// @namespace    http://leironghua.com/
// @version      0.4
// @description  LRH京东插件.
// @author       雷荣华
// @include      *jd.com*
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function (d) {
    'use strict';
    var t = d.createElement("script"); t.type = "text/javascript"; t.async = "async"; t.id = "_lrh_js";
    t.setAttribute("exparams", JSON.stringify({
        GMVersion: GM_info.version,
        GMScriptName: GM_info.script.name,
        GMScriptDescription: GM_info.script.description,
        GMScriptVersion: GM_info.script.version,
        GMScriptUUID: GM_info.script.uuid
    }));
    // 京东商品详情页
    if (window.location.href.indexOf("//item.jd.com/") != -1) {
        t.src = window.location.protocol + "//plugin.leironghua.com/bundles/jd.com/" + encodeURI('京东商品详情页PC');
    }

    // 京东商品详情页手机端
    if (window.location.href.indexOf("//item.m.jd.com/") != -1) {
        t.src = window.location.protocol + "//plugin.leironghua.com/bundles/jd.com/" + encodeURI('京东商品详情页M');
    }

    // 京东商品详情页手机端
    if (window.location.href.indexOf("//wqs.jd.com/pingou") != -1) {
        t.src = window.location.protocol + "//plugin.leironghua.com/bundles/jd.com/" + encodeURI('京东商品详情页pingou');
    }

    if (t.src && t.src != "") {
        t.src += "?v=" + new Date().getTime();
        d.getElementsByTagName("head")[0].appendChild(t);
    }
})(document);