Greasy Fork

RYM Review Hider

Tired of letting other people's opinions influence your own? This simple userscript hides other user's ratings by default. Already rated a release and want to see what others said? Just press the toggle rating data button.

目前为 2021-04-13 提交的版本。查看 最新版本

// ==UserScript==
// @name     RYM Review Hider
// @version  1
// @require  http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant    none
// @description  Tired of letting other people's opinions influence your own? This simple userscript hides other user's ratings by default. Already rated a release and want to see what others said? Just press the toggle rating data button.
// @match    https://rateyourmusic.com/release/*
// @match    http://rateyourmusic.com/release/*
// @exclude  /https?://rateyourmusic\.com/.+/reviews/*
// @namespace https://greasyfork.org/users/758717
// ==/UserScript==

var rating = $('.avg_rating').text();
var hidden = true;

$('.section_reviews').hide();
$('.avg_rating').text("?");
$('.section_catalog').hide();
$('.section_my_catalog').append("<div class='review_btn' id='toggle_reviews'>Click to show rating data</div>");
$('#toggle_reviews').css({"margin": "auto", "display": "block", "background-image": "initial"});

$('#toggle_reviews').on('click', function() {
  hidden == true ? hidden = false : hidden = true;
  $('#toggle_reviews').text(hidden ? "Click to show rating data" : "Click to hide rating data");
  $('.section_reviews').toggle();
  $('.section_catalog').toggle();
  $('.avg_rating').text() == "?" ? $('.avg_rating').text(rating) : $('.avg_rating').text("?");
});