您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove review information from the band and album pages.
A browser extension to remove review information from certain pages on metal-archives.com.
This script functions on the band and album pages, though differently for each. Taking the easiest first, on the album page, it looks for a description term with the value "Review:" and sets the corresponding description detail to "None yet", which is the default value when a release doesn't have any reviews.
On the band page, a function that looks at the tables in the document is called in a loop. If there is a change, it checks for a discography table and sets, for each release, the corresponding text showing review information to the empty string.
This script doesn't do anything with or on the "Reviews" tabs on the band and album pages since I assume the user wants to see that information if they navigate there.
Due to my poor knowledge of JS, there are certainly several improvements that can be made. Here are a few I've thought of, though the script works well enough for me as is.
setInterval()
loop. This causes a tradeoff in having the loop not run too often (though I've tried to have the function return as quickly as possible if there are no changes) vs removing the review information in a timely manner. (In my testing, however, even setting the loop timer down to 10 ms resulted in a noticeable blip on the screen if one is looking for it. The delay caused with 250 ms isn't much worse.)