Last active
September 18, 2017 17:33
-
-
Save prail/2ea978e39d48f0315a9d972bde05ceae to your computer and use it in GitHub Desktop.
Userscript to follow topics you post on.
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 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