let user = window.getSelection();
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));
let banned = ["ass", "fuc", "cum", "fag", "tit"];
if (banned.includes(num)) {
numm();
}
}
numm();
if (user == false) {
user = window.location.href.split("/")[4];
}
let comment = "would you like to be a beta tester for my multiplayer paintball game? https://scratch.mit.edu/projects/671101322/ we are testing right now so if you want, come on down! thank you " + num;
postcomm();
function postcomm() {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://scratch.mit.edu/site-api/comments/user/' + user + '/add/', true);
xhr.setRequestHeader('X-CSRFToken', document.cookie.split(";").reduce((a, b) => a + (b.trim().startsWith("scratchcsrftoken") ? b.split("=")[1] : ""), ""));
xhr.send(JSON.stringify({
"content": comment,
"parent_id": "",
"commentee_id": ""
}));
}
let comm = prompt("comment");
postcomm();
function postcomm() {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://scratch.mit.edu/site-api/comments/user/' + "badmode" + '/add/', true);
xhr.setRequestHeader('X-CSRFToken', document.cookie.split(";").reduce((a, b) => a + (b.trim().startsWith("scratchcsrftoken") ? b.split("=")[1] : ""), ""));
xhr.send(JSON.stringify({
"content": comm,
"parent_id": "",
"commentee_id": ""
}));
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.