Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
Created July 29, 2008 14:43
Show Gist options
  • Save subtleGradient/3098 to your computer and use it in GitHub Desktop.
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
// ==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