NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name JustPray Bot // @namespace http://tampermonkey.net/ // @version 0.1 // @description Script for real christians. Makes praying easier. // @author Anon // @match http://www.justpray.uk/justpray/submit/ // @grant none // ==/UserScript== /* jshint -W097 */ 'use strict'; var cookie = document.cookie; var token = cookie.match(/csrftoken=(.*);/); if(token != null) { console.log("Got token: " + token[1]); var buttonparent = $("button").parent(); $("button").remove(); buttonparent.append('<button id="spambtn" type="button">Pray instantly!!</button>'); $("#spambtn").click(function() { var prayer = $("#id_message").val(); var prayername = $("#id_name").val(); if(prayer.length > 0){ if($("#count").length == 0) { $("#spambtn").html('Prayed: <span id="count">0</span> prayers. (Klick again to pray more)'); } $.post("http://www.justpray.uk/justpray/submit/", { csrfmiddlewaretoken: token[1], message: prayer, name: prayername }).success(function(data){ var count = parseInt($("#count").text()); count = count + 1; $("#count").text(count); }); } else { alert("Prayer must be at least 1 character long!"); } }); } else { console.log("Cannot get token, refreshing page"); window.location = window.location; }