您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds standard deviation to IMDb ratings breakdown pages.
当前为
// ==UserScript== // @name IMDb Standard Deviation // @namespace http://userscripts.org/users/7063 // @include https://www.imdb.com/title/tt*/ratings // @include https://www.imdb.com/title/tt*/ratings-* // @include https://www.imdb.com/title/tt*/ratings?* // @version 2018.12.2.6.36 // @grant none // @description Adds standard deviation to IMDb ratings breakdown pages. // ==/UserScript== /*eslint-env browser*/ "use strict"; (function () { const main = document.querySelector("#main"); if (!main) { return; } const votes = [...main.querySelector("table").rows] .map(k => +k.cells[2].textContent); votes.shift(); let product = 0; let votecount = 0; votes.forEach((v, i) => { product += v * (10 - i); votecount += v; }); // votes.forEach((v, i) => product += (votecount += v) * (10 - i)); const redFun = (p, c, i) => p + Math.pow(10 - i - product / votecount, 2) * c; const out = main.querySelector(".title-ratings-sub-page .allText[align=\"center\"]"); out.textContent = `${out.textContent.trim()}. \xA0Standard Deviation = ${ Math.sqrt(votes.reduce(redFun, 0) / (votecount - 1)).toFixed(2)}`; }());
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址