Last active
October 7, 2020 15:53
-
-
Save 0x07dc/14a5ffa038aa3e8bd68d37d2009cf08b to your computer and use it in GitHub Desktop.
Pandora website sleep timer
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
// This is a sleep timer for Pandora. To work this, just copy this entire file to notepad, | |
// edit the number at the bottom where it says, "Sleep time in minutes," putting | |
// how many minutes you'd like, then copy all of that, go to Pandora, | |
// press F12, then in the box near the bottom of the window that shows up, paste the code and | |
// press enter. | |
// This is useful if you need a sleep timer for Pandora. | |
// If this stops working, or if you'd like a sleep timer on a different site, | |
// try to find something like a pause or mute button, then right-click it, | |
// select "inspect" (in Chrome -- not sure what it says in other browsers) | |
// and then it should give you some HTML that corresponds to the tag. | |
// Right-click the HTML tag, click "Copy," then select "Copy-selector," and paste that | |
// between the two quotes in the call to "querySelector" (replacing what's there currently). | |
(function(minutes){ | |
setTimeout( | |
function(){ | |
document.querySelector(".Tuner__Audio__Control__Play > span > button").click() | |
}, | |
minutes*60*1000); | |
}) | |
//////////////////////////////////////////// | |
(5) // Sleep time in minutes | |
/////////////////////////////////////////// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment