Skip to content

Instantly share code, notes, and snippets.

@bob1171
Created August 28, 2017 15:08
Show Gist options
  • Save bob1171/75bcb908efa8502a22307a7c19c19c9d to your computer and use it in GitHub Desktop.
Save bob1171/75bcb908efa8502a22307a7c19c19c9d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Love-Commenter
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Does cool magic fluffy unicorn kind of stuff.
// @author @TheUltimatum, @bob1171
// @match https://scratch.mit.edu/projects/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
$("#love-this").on("click",function() {
$.ajax({type:"POST",
url: "/site-api/comments/project/"+$(location).attr("href").split("/")[4]+"/add/",
data: JSON.stringify({content:"nice!",parent_id:"",commentee_id:""}),
success:function(){location.reload();}});
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment