Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name BBS ReCaptcha Fix
- // @version 1.0
- // @description Fix the BBS's ReCaptcha
- // @author Degritone
- // @match *://dollars-bbs.org/*
- // @grant none
- // @run-at document-end
- // ==/UserScript==
- window.nameWithoutCollision = window.location.href.match(/\.org\/.+?\//)[0].replace(".org","").replace("/","")+"/kareha.pl";
- window.self = window;
- window.preview_post = function(formid,thread){
- let form=document.getElementById(formid);
- let preview=document.getElementById("preview"+thread);
- if(!form||!preview) return;
- preview.style.display="";
- preview.innerHTML="<em>Loading...</em>";
- let text;
- text="task=preview";
- text+="&comment="+encodeURIComponent(form.comment.value);
- text+="&markup="+encodeURIComponent(form.markup.value);
- if(thread) text+="&thread="+thread;
- let xmlhttp=get_xmlhttp();
- xmlhttp.open("POST",nameWithoutCollision);
- xmlhttp.onreadystatechange=function() {
- if(xmlhttp.readyState==4) preview.innerHTML=xmlhttp.responseText;
- }
- if(is_ie()||xmlhttp.setRequestHeader) xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
- xmlhttp.send(text);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement