Skip to content

Instantly share code, notes, and snippets.

@luckycdev
Last active July 15, 2022 19:35
Show Gist options
  • Save luckycdev/c4d0b47381a8040d7ce6f7da67c6d559 to your computer and use it in GitHub Desktop.
Save luckycdev/c4d0b47381a8040d7ce6f7da67c6d559 to your computer and use it in GitHub Desktop.
show youtube dislikes with a bookmarklet / youtube dislikes bookmarklet

Show the dislikes a youtube video has in a new tab.

Code:

javascript:
var a="https://returnyoutubedislikeapi.com/votes?videoId=";
var b=location.search.split("v=")[1].split("&")[0];
if(location.hostname==="www.youtube.com")
{
open(a+b);
}
else if(location.hostname==="youtu.be")
{
open(a+b);
}
else if(location.hostname==="www.youtube-nocookie.com")
{
open(a+b);
}

Bookmarklet:

javascript:var a="https://returnyoutubedislikeapi.com/votes?videoId=";var b=location.search.split("v=")[1].split("&")[0];if(location.hostname==="www.youtube.com"){open(a+b);}else if(location.hostname==="youtu.be"){open(a+b);}else if(location.hostname==="www.youtube-nocookie.com"){open(a+b);}

only issue:cant figure out how to do at the end else{alert("not on youtube");} if not on youtube (check my unblock youtube gist to see what i mean)

javascript:var a="https://returnyoutubedislikeapi.com/votes?videoId=";var b=location.search.split("v=")[1].split("&")[0];if(location.hostname==="www.youtube.com"){open(a+b);}else if(location.hostname==="youtu.be"){open(a+b);}else if(location.hostname==="www.youtube-nocookie.com"){open(a+b);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment