Created
September 14, 2017 04:11
-
-
Save bob1171/83a1b65be0c91f0fee5dc56bf8ea47bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Love-Archiver | |
// @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== | |
var currentURL = window.location.href; | |
var studio = localStorage.getItem("studioId"); | |
if (studio === null || studio === '') { | |
var studioPrompt = prompt('Put in the ID of your studio'); | |
localStorage.setItem("studioId", studioPrompt); | |
var studio = studioPrompt;} | |
(function() { | |
'use strict'; | |
$(document).ready(function() { | |
$("#love-this").on("click",function() { | |
$.ajax({ | |
type: "PUT", | |
url: "https://scratch.mit.edu/site-api/projects/in/" + studio + "/add/?pks=" + ID | |
}); | |
} | |
); | |
}); | |
})(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah so it uses local storage now.