Untitled
By: a guest | Mar 20th, 2010 | Syntax:
JavaScript | Size: 1.60 KB | Hits: 45 | Expires: Never
// ==UserScript==
// @name lol
// @include http://www.lgc-family.com/forum/newreply.php?do=postreply&t=12863*
// @include http://www.lgc-family.com/forum/showthread.php?t=12863*
// ==/UserScript==
var msg = Math.floor(Math.random()*100000000);
if(document.URL.match("showthread.php"))
{
postReply();
}
function postReply()
{
get("http://www.lgc-family.com/forum/showthread.php?t=12863", function(r){
turing = FindText(r,'name="securitytoken" value="','"');
p = "wysiwyg=vB_Editor_001_mode&s=&securitytoken=" + turing + "&do=postreply&t=12863&p=&specifiedpost=0&posthash=46241619198ed644229ee2f58e8237c2&poststarttime=1261592090&loggedinuser=383&multiquoteempty=&message=hey+seneca+whats+up+bro+" + msg;
post("http://www.lgc-family.com/forum/newreply.php",p,function(html){
//alert(p);
setTimeout(refresh, 22000);
})
})
}
function refresh()
{
window.location.href = "/forum/showthread.php?t=12863";
}
function post(url,data,cb){
GM_xmlhttpRequest({
method: "POST",
url: url,
headers:{'Content-type':'application/x-www-form-urlencoded'},
data:encodeURI(data),
onload: function(xhr) { cb(xhr.responseText); }
});
}
function get(url, cb) {
GM_xmlhttpRequest({
method: "GET",
url: url,
onload: function(xhr) {
cb(xhr.responseText);
}
});
}
function FindText(str, str1, str2)
{
var pos1 = str.indexOf(str1);
if (pos1 == -1) return '';
pos1 += str1.length;
var pos2 = str.indexOf(str2, pos1);
if (pos2 == -1) return '';
return str.substring(pos1, pos2);
}