Skip to content

Instantly share code, notes, and snippets.

@tunalad
Last active January 28, 2024 23:01
Show Gist options
  • Save tunalad/65d91dadfd0b8cd78799fa53d2583773 to your computer and use it in GitHub Desktop.
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
// ==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