NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @id KKTIX // @name KKTIX // @version 1.2 // @namespace demo // @author demo.fan // @description // @include https://kktix.com/dashboard/events/*/orders // @require http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.11.1.js // @run-at document-end // ==/UserScript== $(document) .ready(function () { setTimeout(sumCommission, 1500); }); function sumCommission() { var total = 0; var payment_fee=$("[data-mdata='payment_fee']").index(); $('table tr') .each(function (index) { var $current = $(this); var tmp = parseInt($current.find('td:eq('+payment_fee+') .currency-value') .text().replace(',',''), 10); if (isNaN(tmp) === false) { total += tmp; } }); $('table tr th:eq('+payment_fee+')') .html('$ ' + total) .css('color', 'red'); }