Greasy Fork is available in English.
“京东佣金助手”,可以方便用户在浏览京东商品的实现显示推广的佣金金额,佣金比例。由于时间仓促,难免会有bug,如有问题QQ:3140905638,QQ群:455422537。
当前为
// ==UserScript==
// @name 京东佣金助手-浏览京东商品实现显示推广的佣金金额,佣金比例
// @namespace http://tampermonkey.net/
// @version 1.0.4
// @run-at document-idle
// @description “京东佣金助手”,可以方便用户在浏览京东商品的实现显示推广的佣金金额,佣金比例。由于时间仓促,难免会有bug,如有问题QQ:3140905638,QQ群:455422537。
// @description:zh-CN “京东佣金助手”,可以方便用户在浏览京东商品的实现显示推广的佣金金额,佣金比例。由于时间仓促,难免会有bug,如有问题QQ:3140905638,QQ群:455422537。
// @author Satan
// @icon http://47.97.201.10:8080/yjzs.ico
// @include http*://item.jd.com/*
// @include http*://item.jd.hk/*
// @require https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
// @grant GM_xmlhttpRequest
// @grant GM_log
// ==/UserScript==
(function() {
'use strict';
GM_xmlhttpRequest({
method: "GET",
url: "http://www.unmou.com/yongjin/jd/getJdGoodsInfo?url=" + encodeURIComponent(window.location.href),
onload: function(response) {
if (response.readyState == 4) {
var result = JSON.parse(response.responseText);
appendHtml(result);
}
}
});
function appendHtml(dataObj) {
var pcpriceHtml = '<span class="p-price jd_pc" style="margin-left: 20px"><span>佣金:¥</span><span class="price commision">' + (dataObj.unitPrice * (dataObj.commisionRatioPc / 100)).toFixed(2) + '</span><span class="rate">(' + dataObj.commisionRatioPc + '%)</span></span>';
$('.dd .p-price').after(pcpriceHtml);
if (dataObj.unitPrice != dataObj.wlUnitPrice) {
var wlPriceHtml = '<div class="summary-price J-summary-price">\n' +
' <div class="dt">无 线 端</div>\n' +
' <div class="dd">\n' +
' <span class="p-price jd_wl"><span>¥</span><span class="price">' + dataObj.wlUnitPrice + '</span></span><span class="p-price jd_pc" style="margin-left: 20px"><span>佣金:¥</span><span class="price commision">' + (dataObj.wlUnitPrice * (dataObj.commisionRatioWl / 100)).toFixed(2) + '</span><span class="rate">(' + dataObj.commisionRatioWl + '%)</span></span>\n' +
' </div>\n' +
'</div>';
$('.summary-price').after(wlPriceHtml);
}
}
})();