Created
September 4, 2013 17:02
-
-
Save lloeki/6439796 to your computer and use it in GitHub Desktop.
Google Music Fluid userscript
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
// pattern: *play.google.com/music* | |
setTimeout(removeTopBar, 100); | |
setTimeout(removeUser, 100); | |
var $ = function () { | |
return document.getElementById.apply(document, arguments); | |
} | |
function removeTopBar() { | |
console.log('removing top bar'); | |
var black_bar = $('gbx3'); | |
var black_bar_height = black_bar.clientHeight; | |
black_bar.parentNode.removeChild(black_bar); | |
var menu = $('gbzw'); | |
menu.parentNode.removeChild(menu); | |
var bar = $('gb'); | |
bar.style.height = "" + (parseInt(bar.clientHeight) - black_bar_height) + "px"; | |
var search = $('gbq'); | |
search.style.top = 0; | |
search = $('gbu'); | |
search.style.top = 0; | |
search = $('gbx1'); | |
search.style.top = 0; | |
doc = $('doc'); | |
doc.style.height = "" + (parseInt(doc.clientHeight) + black_bar_height) + "px"; | |
} | |
function removeUser() { | |
console.log('removing user'); | |
var user = $('gbu'); | |
user.parentNode.removeChild(user); | |
} | |
function removePlus() { | |
console.log('removing plus'); | |
var user = $('gbu'); | |
var items = user.getElementsByTagName('li'); | |
console.log(items); | |
for (i=0; i<items.length; i++) { | |
console.log(items[i]); | |
var item = items[i]; | |
// no workie? | |
//item.parentNode.removeChild(item); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment