Created
February 9, 2026 06:32
-
-
Save donal56/8f2b61d5a3501c35df364720feeb0ba4 to your computer and use it in GitHub Desktop.
rym-auto-album-rate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name RateYourMusic auto album rate | |
| // @namespace rym-auto-album-rate | |
| // @version 09-02-2026 | |
| // @description Adds a button with the calculated rating of an album | |
| // @match https://rateyourmusic.com/release/album/*/*/ | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function calculateAlbumRate() { | |
| const ratings = document.querySelectorAll("#track_ratings .rating_num"); | |
| const noTracks = ratings.length; | |
| let sum = 0; | |
| ratings.forEach(rating => sum+= Number(rating.textContent)) | |
| const avg = (sum / noTracks).toFixed(2) | |
| return String(avg); | |
| } | |
| const buttonsBar = document.getElementsByClassName("release_my_catalog")[0]; | |
| const avgButton = document.createElement('button'); | |
| avgButton.innerHTML = "Avg: " + calculateAlbumRate(); | |
| avgButton.className = "track_rating_btn has_ratings"; | |
| buttonsBar.appendChild(avgButton); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment