You will need to install a user script manager extension to install this script.
The primary function of this script, is to add "album-headers" with album-links in Recent Tracks and Library Scrobbles lists on last.fm profiles. Besides that it's generally nice information to have on scrobbles, this can for example also be helpful if you want to find or upload album cover art-work, especially if it is a new or rare album not (yet) available on the artist's album-overview page on last.fm.
When two or more tracks from same "album" has been played successively, an album-header row will be inserted above.
The script also has two "bonus features":
This script is primarily tested (daily use) with Firefox/Greasemonkey (including Greasemonkey 4 on Firefox 57+), but quick tests with Chrome/Tampermonkey, Edge/Tampermonkey and Opera/Violentmonkey also looks fine. Also it has only been tested on the English last.fm site. Please, do let me know if it doesn't work on some of the localized lastfm.* sites.
Btw, I'm rockland on Last.fm.
You might also want to try one of my other userscripts: