Last active
December 6, 2016 03:10
-
-
Save mikemanger/ca837343473033b1d9bb to your computer and use it in GitHub Desktop.
Indie Royal Collection Labeler
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 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just updated it to overlay the name. Fixes new bundle images overlapping but does cover up the old bundle 'banner' names.