Skip to content

Substituting fields from URL parameters #257

@deevroman

Description

@deevroman

Sometimes I listen to music on radio sites that don't support scrobblers like WebScrobbler. So now I copy the track title and artist name manually, which is quite tedious.

Describe the solution you'd like

I want to scrobble music in a couple of clicks using bookmarklets. But for this somehow transfer information about the track to OpenScrobbler. I suggest via URL parameters. Prototype of bookmarklet:

const title = navigator.mediaSession.metadata.title;         // or document.querySelector(".title-selector")
const artist = navigator.mediaSession.metadata.artist;       // or document.querySelector(".artist-selector");
window.open(`https://openscrobbler.com/scrobble/song?text=${artist} — ${name}` , "_blank", "popup,left=200,top=200,width=600,height=600");

After clicking on the bookmark, OpenScrobbler opens and you just need to click Scrobble!

Additional context

  1. Bookmarklets can receive the current selection on the page, which can give even more flexibility

  2. I quickly looked through the source code and did not find such a possibility. If you are interested, I can implement this function

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions