
webpage-scrobbler
Updated the DOM parser logic to treat an empty separator as a signal to use the entire string rather than attempting to split it. Previously, an empty separator could lead to unexpected behavior in certain string processing scenarios. By falling back to a dummy string that is assumed not to exist in the input, we ensure the scrobbler correctly preserves track, artist, and album text when no splitting is desired.
This update fixes an issue where splitting track metadata strings could produce unexpected results. By hardcoding the separand index to 0, the scrobbler now consistently takes the first segment from metadata string splits, improving parsing reliability for supported pages. Version bumped to 0.2.1.
We've added a sanity check when extracting metadata from the DOM via XPath. By validating that the split operation on the resolved string does not return undefined, we prevent potential runtime errors during the scrobbling process. This improvement increases the robustness of our scraping logic.
Users can now configure custom separators for track, artist, and album parsing via the extension options. This change moves logic previously hardcoded in webpage-scrobbler.js into configurable settings, making it easier to handle diverse webpage layouts without code changes. The update also upgrades the extension to version 0.2.0.
Users can now back up and migrate their configuration settings via JSON imports and exports directly from the options page. I've implemented these features using the File API and browser storage sync to ensure settings persistence across sessions. This update makes managing custom XPath configurations significantly easier, especially across different browser instances.
This change refactors hostToModifiers in js/webpage-scrobbler.js so host-specific parsing is indexed by field position rather than property name. For www.midomi.com, the modifiers are now expressed as an ordered array with the album transform in the third slot, which likely aligns the mapping logic with how metadata is consumed elsewhere in the scrobbler. The practical effect is more consistent host override handling and less room for field-name mismatches during parsing.
This change splits login from settings, adds a proper options UI for editing per-host XPath selectors, and seeds default settings for www.midomi.com in synced storage. The content script now reads the current tabβs host configuration dynamically and only reports success after both scrobble and now-playing calls validate cleanly, with clearer error handling when the user is unauthenticated or a host is unsupported. In practice, users can now teach the add-on how to extract track metadata from other sites instead of being locked to one hardcoded source.
This patch corrects XML validation in the scrobbling flow by checking the ignoredMessage code attribute instead of relying on the message text itself, which could be empty and cause false negatives. The content script now treats ignoredCode === "0" as success, improves error logging, and aligns the shared validator logic in constants.js with that behavior. The result is more reliable success/failure detection when submitting tracks to Last.fm, plus a version bump to 0.1.3.
This change makes the browser action icon flash to a light variant on successful Last.fm calls and a dark variant when scrobble or updateNowPlaying requests fail, instead of silently logging results to the console. It also factors XML response validation into shared logic for auth and request handling, then wires the background script to reset the icon back to default after a short delay. The docs and usage page were updated to explain the new behavior, so users now get quick feedback on whether a scrobble actually worked.
This change rewrites html/usage.html to match the project's current purpose, replacing outdated Netflix translation instructions with usage notes for the Webpage Scrobbler addon. The page now explains the midomi.com scrobbling flow, clarifies that only a session key is stored locally, and trims the TODO list down to the current roadmap. The practical effect is that users and contributors now see documentation that reflects the actual extension behavior.
This initial commit sets up a browser extension that extracts track, artist, and album data from webpages and submits it to the Last.fm API, with midomi.com wired in as the first supported site. It includes the full extension scaffold: background handling, content-script scraping via XPath, a credentials flow that stores only the Last.fm session key, and install/options UI pages. For developers following the project, this establishes the end-to-end architecture and a clear path to add support for more sites next. Practical effect: the project now has a working MVP instead of just an idea.