Last active
December 8, 2016 07:24
-
-
Save amayiruKiariM/379934359450c92300eaab7e67a7d574 to your computer and use it in GitHub Desktop.
This file contains 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 Apollo Artists Page Collage | |
// @namespace Expander | |
// @description Strips the images out of the torrent group and prepends it to the top of the page. | |
// @include https://apollo.rip/artist.php?id=* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
window.addEventListener('load', function () { | |
$('.group_image').each(function (el) { | |
var tlink = $(this).siblings().find('strong .tooltip').attr('href'); | |
$(this).wrap('<a class="group_image_link" href="' + tlink + '" target="_blank"></a>'); | |
}); | |
$('#discog_table').prepend('<div class="album_container"></div>'); | |
$('.group_image').parent().appendTo('.album_container'); | |
$('.album_container').css({ | |
'display': 'flex', | |
'flex-flow': 'row wrap', | |
'justify-content': 'space-around' | |
}); | |
$('.group_image_link').css({ | |
'width': '24%', | |
'margin': '.2em 0' | |
}) | |
$('.group_image').css({ | |
'width': '100%' | |
}) | |
$('.group_image img').css({ | |
'width': '100%', | |
'height': 'auto' | |
}) | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment