您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
this script calculates the ratio of # book read and # books in common
// ==UserScript== // @name Anobii Anobian Ratio // @namespace http://tampermonkey.net/ // @version 0.3 // @description this script calculates the ratio of # book read and # books in common // @author Michele // @match https://www.anobii.com/*/anobians** // @icon https://www.google.com/s2/favicons?sz=64&domain=anobii.com // @require https://code.jquery.com/jquery-latest.min.js // @grant none // ==/UserScript== (function() { 'use strict'; jQuery(jQuery("app-table-field-filter")[0]).append("<button id='processRatioButton'>Calculate Ratio</button>"); jQuery("button#processRatioButton").click(function(){ jQuery("tr.hoverDiv a").each((k, v) => { var reads = parseInt(jQuery(jQuery(v).children("td")[2]).text().replace(",","").trim()); var commons = parseInt(jQuery(jQuery(v).children("td")[4]).text().replace(",","").trim()); var ratio = Math.round(commons/reads*100*100)/100; var commonsText = jQuery(jQuery(v).children("td")[4]).text(); jQuery(jQuery(v).children("td")[4]).text(commonsText + " | " + ratio + "%"); }); }); })();