Skip to content

Commit

Permalink
Update the bookmarklet
Browse files Browse the repository at this point in the history
Mixcloud has changed their page structure a little, so the bookmark has been confused about when a page contained music or not. This unconfuses it.
  • Loading branch information
jakshin committed Jan 31, 2024
1 parent ead8ad0 commit d06f3ac
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/resources/jakshin/mixcaster/http/banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,14 @@
<div class="bookmarklet">Use this bookmarklet on a Mixcloud page that lists music,<br>
to load RSS for a podcast containing that music:
<a href="javascript:(function(){
if (location.host != 'www.mixcloud.com' ||
document.querySelector('section.profile-header') == null)
if (location.host != 'www.mixcloud.com')
return alert('This bookmarklet is for use on www.mixcloud.com');
if (document.querySelector('div[class^=\'AudioCardTitle\']') != null
|| confirm('Can\'t find any music listed on this page.\n\nContinue anyway?'))
{
alert('This isn\'t a Mixcloud page that lists music.');
return;
var podcastUrl = 'http://localhost:{{port}}' + location.pathname;
location.href = podcastUrl;
}
var podcastUrl = 'http://localhost:{{port}}' + location.pathname;
location.href = podcastUrl;
})();">Mixcaster</a>
</div>

Expand Down

0 comments on commit d06f3ac

Please sign in to comment.