Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Idea) Add last played track to badges at /following page #10

Open
myfonj opened this issue May 18, 2018 · 1 comment
Open

(Idea) Add last played track to badges at /following page #10

myfonj opened this issue May 18, 2018 · 1 comment

Comments

@myfonj
Copy link

myfonj commented May 18, 2018

Visiting https://www.last.fm/user/…/following currently displays quite dumb list of friends (I like this therm better as well). I suppose it could be viable for this extension to enrich them by "last played" or other info that is accessible, in (pseudo-)realtime manner.

As an example, here is a quick'n'dirty console / bookmarklet-ish proof-of-concept scraping information from /library pages:

document.querySelectorAll('.user-list-link').forEach(l=>{fetch(l.href+'/library').then(r=>r.text()).then(t=>(new DOMParser()).parseFromString(t,"text/html")).then(d=>{l.parentNode.appendChild(d.querySelector('.chartlist-name')).style.display='block';l.parentNode.appendChild(d.querySelector('.chartlist-timestamp>*')).style.display='block'}).catch(e=>console.error(e))})

producing after

from original before.

@xxdavid
Copy link
Owner

xxdavid commented May 19, 2018

Hey, yep, this might be useful. Unfortunately, I don't think I have time to implement it now, although it doesn't look hard to do. However, you are free to implement it yourself and if you want it to be part of this extension, just send a PR and I'll merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants