Last active
January 28, 2024 23:01
-
-
Save tunalad/65d91dadfd0b8cd78799fa53d2583773 to your computer and use it in GitHub Desktop.
Helps with identifying if the release is a track or an album, right under the release's title
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 Bandcamp Release Identifier | |
// @version 1.1 | |
// @description tells you if the release is a track or album under its title | |
// @author tunalad | |
// @match *://*.bandcamp.com/* | |
// @exclude *://bandcamp.com/ | |
// @grant none | |
// ==/UserScript== | |
(function($) { | |
'use strict'; | |
$(document).ready(function() { | |
const musicGrid = $('#music-grid'); | |
if (musicGrid.length) { | |
$('.music-grid-item').each(function() { | |
const link = $(this).find('a').attr("href") | |
const newElement = $('<p style="margin: 0"></p>'); | |
const releaseType = link.split("/")[1]; | |
newElement.text(releaseType) | |
$(this).append(newElement) | |
}) | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment