Skip to content

Instantly share code, notes, and snippets.

@jojobyte
Last active February 10, 2026 01:05
Show Gist options
  • Select an option

  • Save jojobyte/667a86dd795db4565612fa84dab8f079 to your computer and use it in GitHub Desktop.

Select an option

Save jojobyte/667a86dd795db4565612fa84dab8f079 to your computer and use it in GitHub Desktop.
Bookmarklet to display estimated YouTube Dislikes based on returnyoutubedislikeapi.com. Paste as the URL inside a bookmark.
javascript:void function(){
let a=new URL(location).searchParams.get("v"),
b=new Intl.NumberFormat("en-US"),
c=trustedTypes.createPolicy("forceInner", { createHTML: a => a });
fetch(`https://returnyoutubedislikeapi.com/Votes?videoId=${a}`).then(a=>a?.text?.())
.then(a => "{" === a[0] && JSON.parse(a) || a)
.then(a => {
console.log("dislikes",a);
a?.dislikes && document.body.insertAdjacentHTML(
"beforeend",
c.createHTML(`<div style="font-size:2rem;color:#ff0;position:absolute;right:2rem;top:8rem;z-index:10000;">
${b.format(a.dislikes)} dislikes
</div>`)
)
})
}();
javascript:void function(){let a=new URL(location).searchParams.get("v"),b=new Intl.NumberFormat("en-US"),c=trustedTypes.createPolicy("forceInner",{createHTML:a=>a});fetch(`https://returnyoutubedislikeapi.com/Votes%3FvideoId=${a}`).then(a=>a%3F.text%3F.()).then(a=>"{"===a[0]%26%26JSON.parse(a)||a).then(a=>{console.log("dislikes",a),a%3F.dislikes%26%26document.body.insertAdjacentHTML("beforeend",c.createHTML(`<div style="font-size:2rem;color:%23ff0;position:absolute;right:2rem;top:8rem;z-index:10000;">${b.format(a.dislikes)} dislikes</div>`))})}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment