Sunday, March 23, 2014

Google Music Power Hour Using GreaseMonkey

Hey Everyone,

A few months ago I went to Atlantic City for my brother in-laws birthday party. This occurs every year and we drink a lot of alcohol. We decided to go "easy" with the pregame this year and do a Power Hour since last year ended pretty badly when we took shots of hard alcohol.

For those of you who don't know what a "Power Hour" is, a Power Hour is "An hour in which you drink 60 beer shots, one per minute." (Urban Dictionary). Usually this game is played with music, where the songs are changed every 60 seconds to sign that a minute has passed. There are various apps on the phone that may help to do this, but I am not sure if they have any that pair up with Google Music, but I could be wrong since I haven't checked in a few months. Regardless! Let's get to how this works.

There are some per-requisites for this script to work.
     1. You need a laptop, computer, or anything that has a browser that can install GreaseMonkey
     2. You need a Google account and use Google Music
     3. You need to install GreaseMonkey. (https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/)
     4. You need my fancy script installed into GreaseMonkey.

To get this working:
    Install GreaseMonkey into your browser. I have the url for Firefox pasted above.
    Click on the link for my fancy script  , on the top of your browser it should say "This is a GreaseMonkey script, do you want to install (then probably a scary warning message)", now click install, or show script source if you want to check out what it does.

Cool. Now you should have it installed. Next, go to music.google.com, or google.com/music.
Let it load and wait about 4 seconds. You should see a button saying "Play Power Hour!" And some text saying "JA Power Hour You Are On Song: 0". THIS IS GOOD!

The next step is very important, pick a playlist that you want to play. You can actually select anything. If you have 60 songs by an artist you love, then you can select that artist too, or just songs on random. After you select a playlist or the artist you like, or All Songs the PLAY BUTTON should now be active (I.E. you can click it and a song will play). Now you click the "Play Power Hour" button. Some magic will happen, music will play and it will say "You are on song 1". After 60 seconds the next button will be clicked and the next song will start, and the text will progress to Song 2 and so on and so forth.

I don't imply that this is guaranteed to work and this is distributed "As Is" and I am not liable for anything you do to screw up your computer using this script! (However if you do break something please let me know because this script is really elementary). The worst thing that can happen is it will skip the song a couple times when it shouldn't have or the count might be  messed up.

ANYWAY! Let me know what you think.