您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Adds a button to the top of the movie genre page to open the chart.
当前为
// ==UserScript== // @name Rateyourmusic Movie Genre Chart Button // @license GPLv3 // @description Adds a button to the top of the movie genre page to open the chart. // @run-at document-start // @version 1.1.2 // @match *://rateyourmusic.com/film_genre/* // @namespace http://greasyfork.icu/users/908137 // ==/UserScript== // Genre names that also describe a music genre need a "-1" appended in the chart URL to differentiate themsa const ADD_ONE = ["comedy", "experimental", "satire"]; function init(f) { let genreName = window.location.pathname .replaceAll("+", "-") .split("/")[2] .toLowerCase(); let a = document.createElement("a"); a.innerHTML = "View genre chart"; a.href = `https://rateyourmusic.com/charts/top/film/all-time/g:${genreName}`; if (ADD_ONE.includes(genreName)) a.href = a.href.concat("-1"); a.style = "display: inline-block; float: right;"; f.appendChild(a); } window.addEventListener("load", function () { const frame = document.getElementById("page_breadcrumb"); init(frame); });