i know this is pretty simple but i dont get it done anyway... :( I want the script to automaticly klick the playbutton on a spotify page (like this one: Spotify Page). So when the page is loaded the script should start the song by itself.
Asked
Active
Viewed 116 times
0
-
What have you tried so far? Show us some code, do you want it as an extension, or enter it in the console? – Adam Jul 05 '16 at 22:52
-
Take a look at user scripts, such as TamperMonkey for Chrome or Greasy Fork for Firefox. When you have some code you can come back and ask something specific. – yuriy636 Jul 05 '16 at 22:53
-
Possibly duplicate of http://stackoverflow.com/questions/24278469/click-a-button-programmatically-js – Adam Jul 05 '16 at 22:54
1 Answers
0
Clicks can be programmatically triggered. On this particular page the play button's ID is "play-button".
$(document).ready(function() {
$("#play-button").click();
})
window.onload() = function() {
document.getElementById("play-button").click();
}

Erik Engervall
- 269
- 1
- 8