Skip to content

Instantly share code, notes, and snippets.

@kevinadi
Last active June 15, 2017 00:43
Show Gist options
  • Save kevinadi/91e2ce59908768dd1f9807422dd2896a to your computer and use it in GitHub Desktop.
Save kevinadi/91e2ce59908768dd1f9807422dd2896a to your computer and use it in GitHub Desktop.
Print Google Play Music current playlist to console
document.querySelectorAll('.song-row').forEach(function(el) {
var title = el.querySelector('td[data-col="title"]')
var artist = el.querySelector('td[data-col="artist"]')
if(title) console.log(title.textContent.trim() + ' - ' + artist.textContent.trim())
})
document.querySelectorAll('.song-row').forEach(function(el) {
var title = el.querySelector('.song-title')
var artist = el.querySelector('.song-artist')
if(title) console.log(title.textContent.trim() + ' - ' + artist.textContent.trim())
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment