2021-06-19 at 10:29 PM UTC
// main
var edit = function() {
$('.post').each(function(){
console.log(this.id)
var post = getPost(this.id)
var csrf = getCSRF()
data = {
csrfmiddlewaretoken: csrf,
content: "This post has been edited by a bot I made to preserve my privacy.",
preview_action: "edit-post",
post: post
};
$.post("https://niggasin.space/post/" + post + "/edit", data)
})
setTimeout(function() {
nextPage()
}, 5000);
}
// Get the token
var getCSRF = function() {
return $('input[name=csrfmiddlewaretoken]').val()
}
// Get the total pages
var nextPage = function() {
var next = $('a.next-page')[0]
console.log(next)
if(next) {
next.click();
}
return
}
// Get the id of the post
var getPost = function(post) {
var id = post.split("-")
return id[1]
}
edit()
The following users say it would be alright if the author of this
post didn't die in a fire!