您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds standard deviation to IMDb ratings breakdown pages.
当前为
// ==UserScript== // @name IMDb Standard Deviation // @namespace http://userscripts.org/users/7063 // @include http://www.imdb.com/title/tt*/ratings // @include http://www.imdb.com/title/tt*/ratings-* // @include http://www.imdb.com/title/tt*/ratings?* // @version 2013.2.17.4.3 // @grant none // @description Adds standard deviation to IMDb ratings breakdown pages. // ==/UserScript== (function () { "use strict"; var $ = function (a, b) {return b.getElementsByTagName(a); }, tn = document.getElementById("tn15content"), table = $("table", tn), votes = [], product = 0, votecount = 0, sd = 0, mean, i; if (table.length) { for (i = 0; i < 10; i++) { votes.push(+table[0].rows[i + 1].cells[0].textContent); product += votes[i] * (10 - i); votecount += votes[i]; } //votecount--; mean = product / votecount; for (i = 1; i <= 10; i++) { sd += Math.pow(i - mean, 2) * votes[10 - i]; } $("p", tn)[2].textContent += ". \xA0Standard Deviation = " + Math.sqrt(sd / votecount).toFixed(2); } }());
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址