Skip to content

Instantly share code, notes, and snippets.

@prail
Last active September 18, 2017 17:33
Show Gist options
  • Save prail/2ea978e39d48f0315a9d972bde05ceae to your computer and use it in GitHub Desktop.
Save prail/2ea978e39d48f0315a9d972bde05ceae to your computer and use it in GitHub Desktop.
Userscript to follow topics you post on.
// ==UserScript==
// @name Topic Follower
// @namespace http://ateesdalejr.tk/
// @version 1.0
// @description Follows any topic you post on.
// @author TheUltimatum
// @match https://scratch.mit.edu/discuss/topic/*
// @updateURL https://rawgit.com/ateesdalejr/2ea978e39d48f0315a9d972bde05ceae/raw/cef03f1e53056013005b44aa9b9f099897a25a4c/topicfollower.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.getElementById("post").onsubmit = function() {
$.ajax({
method: "POST",
url: "/discuss/subscription/topic/" + location.pathname.split("/")[3] + "/add/",
data: {
csrfmiddlewaretoken: getCookie("scratchcsrftoken")
}
});
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment