Created
July 29, 2008 14:43
-
-
Save subtleGradient/3098 to your computer and use it in GitHub Desktop.
Pandora Awesomizer! Hides the Ad Container and resizes to the minimum size for the player
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 Pandora Awesomizer! | |
// @description Hides the Ad Container and resizes to the minimum size for the player | |
// @namespace http://fluidapp.com | |
// @include http://pandora.com/* | |
// @author Thomas Aylott / subtleGradient | |
// ==/UserScript== | |
(function () { | |
window.addEventListener('load',function(){ | |
var CSS = { | |
'body':{padding:'12px'}, | |
'#tuner_ad_container':{display:'none'} | |
}; | |
var C$$ = ''; | |
for (var rule in CSS) { | |
C$$ += rule + "{"; | |
for (var property in CSS[rule]) | |
C$$ += property+':'+CSS[rule][property]+';'; | |
C$$ += "}\n"; | |
} | |
C$$; | |
var s = document.createElement('style'); | |
s.appendChild( document.createTextNode( C$$ ) ); | |
document.getElementsByTagName('head')[0].appendChild(s); | |
document.getElementById('spacer').setAttribute('style',''); | |
},true); | |
var resize = function(){ | |
window.resizeTo(662,270); | |
}; | |
window.addEventListener('resize',function(e){ | |
setTimeout(resize, 0); | |
e.stopPropagation(); | |
},true); | |
resize(); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment