Created
August 15, 2021 18:56
-
-
Save unRARed/4a90c30d87f139bd424324a4fd19ec0b to your computer and use it in GitHub Desktop.
Only "New" songs in Billboard Top-100 (Bookmarklet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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