您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Calculates the price of
当前为
// ==UserScript== // @name Average Calculator for MoogleMail // @description Calculates the price of // @include http://hentaiverse.org/?s=Bazaar&ss=mm&filter=* // @version 0.0.1.20141121095347 // @namespace https://greasyfork.org/users/2233 // ==/UserScript== var wnd = window var doc = wnd.document var loc = location var href = loc.href var $ = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelector(css) } var $$ = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelectorAll(css) } var body_section = $('#leftpane').children[1] var s = body_section.textContent.replace(/>/g, '') var m = s.match(/(?:Attached item removed: )(?:([0-9]+)x )?([^\(]+)\(.+, CoD was ([0-9]+)C/i) //var m = s.match(/(?:(?:Originally attached item was: )|(?:Attached item removed: ))(?:([0-9]+)x )?([^\(]+)\(.+, CoD was ([0-9]+)C/i) console.log(m) if(m) { var quantity = parseInt(m[1]) if(isNaN(quantity)) { quantity = 1 } var item = m[2].replace(/^ +| +$/g, '') var cod = parseInt(m[3]) var avg_price = cod/quantity body_section.innerHTML = body_section.innerHTML + '<HR>Item: ' + item + '<BR>Quantity: ' + quantity + '<BR>CoD: ' + cod + 'c<BR>Average Price: ' + avg_price + 'c' }