Skip to content

Instantly share code, notes, and snippets.

@unRARed
Created August 15, 2021 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unRARed/4a90c30d87f139bd424324a4fd19ec0b to your computer and use it in GitHub Desktop.
Save unRARed/4a90c30d87f139bd424324a4fd19ec0b to your computer and use it in GitHub Desktop.
Only "New" songs in Billboard Top-100 (Bookmarklet)
javascript: (function() {
var showNew = function () {
$('.chart-element__trend:not(.chart-element__trend--new)').
closest('.chart-list__element').remove();
$('.chart-list__ad').remove();
$('.chart-list__element').each(function () {
if ($(this).find('.chart-element__trend').text() === 'Re-Enter') {
$(this).remove();
return;
}
console.log(
$(this).find('.chart-element__information__artist').text() +
': ' + $(this).find('.chart-element__information__song').text()
);
});
};
const url = "https://www.billboard.com/charts/hot-100";
if (this.document.location.href !== url) { return this.document.location.href = url; }
if (document.readyState === "complete") { showNew(); }
else { window.addEventListener('DOMContentLoaded', (event) => { showNew(); }); }
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment