Skip to content

Instantly share code, notes, and snippets.

@mikemanger
Last active December 6, 2016 03:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikemanger/ca837343473033b1d9bb to your computer and use it in GitHub Desktop.
Save mikemanger/ca837343473033b1d9bb to your computer and use it in GitHub Desktop.
Indie Royal Collection Labeler
// ==UserScript==
// @name Indie Royale Bundle Labeler
// @include http://www.indieroyale.com/collection
// @updateURL https://gist.githubusercontent.com/ohmanger/ca837343473033b1d9bb/raw
// @downloadURL https://gist.githubusercontent.com/ohmanger/ca837343473033b1d9bb/raw
// @grant none
// @version 1.3.1
// ==/UserScript==
function irbl_add_global_styles() {
var head, style;
head = document.getElementsByTagName( 'head' )[0];
if ( ! head ) {
return;
}
style = document.createElement( 'style' );
style.type = 'text/css';
style.innerHTML = '.hasbundle h3 { background-color: rgba(0,0,0,0.7); color: white; padding: 0 5px; position: absolute; left: 0; right: 0; }';
head.appendChild( style );
}
irbl_add_global_styles();
var bundles = document.getElementsByClassName('hasbundle'), header, title, i;
for ( i = 0; i < bundles.length; i++ ) {
title = bundles[i].getAttribute('title');
header = document.createElement('h3');
header.innerHTML = title;
bundles[i].insertBefore(header, bundles[i].firstChild);
}
@mikemanger
Copy link
Author

Just updated it to overlay the name. Fixes new bundle images overlapping but does cover up the old bundle 'banner' names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment