custom advertisement
by frogggeee McFrogggeee
HTML
comment:
<br>
<textarea id = "comment" style = ""></textarea>
<br>
<button onclick = ' document.getElementById("text").select();document.execCommand("copy");window.open("https://mrcoles.com/bookmarklet/");'>
done
</button><br>
<textarea id = "text" style = "opacity: 0; width: 1px; height: 1px;"></textarea>
<br>
JavaScript
function submit() {
document.getElementById("text").value = ('let user=window.getSelection();0==user&&(user=window.location.href.split("/")[4]);let num="qwertyuiopasdfghjklzxcvbnm";function numm(){num=num.charAt(Math.floor(Math.random()*num.length))+num.charAt(Math.floor(Math.random()*num.length))+num.charAt(Math.floor(Math.random()*num.length));["ass","fuc","cum","fag","tit"].includes(num)&&numm()}numm();let comment="' + document.getElementById("comment").value + ' "+num;function postcomm(){var t=new XMLHttpRequest;t.open("POST","https://scratch.mit.edu/site-api/comments/user/"+user+"/add/",!0),t.setRequestHeader("X-CSRFToken",document.cookie.split(";").reduce((t,e)=>t+(e.trim().startsWith("scratchcsrftoken")?e.split("=")[1]:""),"")),t.send(JSON.stringify({content:comment,parent_id:"",commentee_id:""}))}postcomm();');
}
setInterval(submit, 1);