Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:(function () {
- var postId = location.href.substring(location.href.lastIndexOf("/"), location.href.lastIndexOf("?") > 0 ? location.href.lastIndexOf("?") : location.href.length);
- fetch('https://api.hejto.pl/posts/' + postId + '/likes?limit=9999').then((response) => response.json()).then((response) => {
- var nicki = '';
- response['_embedded']['items'].forEach((user) => {
- nicki += '@' + user['author']['username'] + ' ';
- });
- alert(nicki);
- console.log(nicki);
- var dummy = document.createElement("textarea");
- document.body.appendChild(dummy);
- dummy.value = nicki;
- dummy.select();
- document.execCommand("copy");
- document.body.removeChild(dummy);
- });
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement