Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

what does this do?

Name: Anonymous 2010-07-04 17:10

i have a meta search site using frames and want to see if any of this is useful to me. the original coder is german so suche = search etc..
/* torrents.to javascript :) */
var myConn = new XHConn();
var flashTimer = null;
var flashState = flashCount = 0;
var __tto_disable_okusearch = false;
$ = function(el){ return document.getElementById(el); }
ce = function(el){ return document.createElement(el); }

window.onload = function()
{
    $("skyscraperBox").style.display = "block";
    $("bannerBox").style.display = "block";
   
   
    $("link").target="_blank";
    dl = document.getElementsByTagName("a");
    for(i in dl)
    {
        clnm = dl[i].className+"";
        if(clnm.substring(0,12) == "target_blank")
        {
            dl[i].target = "_blank";
        }
    }
};

function sbku(ttoe)
{
    if(__tto_disable_okusearch)return;
    if(ttoe.keyCode == 13)
    {
        if(checkData())
        {
            setUrl($("link"));
            document.location = $("link").href;
        }
    }
}

function rateSite(sid)
{
    rating = $("rateSelect_"+sid).value;

    if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.\nYou will not be able to vote:(");
    var fnWhenDone = function (oXML) {
         response = eval(oXML.responseText);

         if(response == "ok")
         {
             $("rateButton_"+sid).innerHTML = "THX!";
             $("rateButton_"+sid).style.fontWeight = "bolder";
             $("rateButton_"+sid).href = "javascript:void(0);";
         }
        else
        {
            $("rateButton_"+sid).innerHTML = "NOPE";
            $("rateButton_"+sid).style.fontWeight = "bolder";
             $("rateButton_"+sid).href = "javascript:void(0);";
        }
        $("rateSelect_"+sid).disabled = true;
    };
    myConn.connect("/php/rate.php", "GET", "sid="+sid+"&rating="+rating, fnWhenDone);
}

function reportSite(sid)
{
   
    if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.\nYou will not be able to report:(");
    var fnWhenDone = function (oXML) {
         response = eval(oXML.responseText);
            $("reportLink_"+sid).innerHTML = "thanks for your help!";
            $("reportLink_"+sid).href = "javascript:void(0);";
    };
    myConn.connect("/php/report.php", "GET", "sid="+sid, fnWhenDone);
}


function showSiteInfo(sid,hin,hout)
{

   
    if(child2remove = $("rateBox_"+sid))
    {
        $("showRateBox_"+sid).src="/img/open.gif";
        $("site_"+sid).removeChild(child2remove);
    }
    else
    {
       
        $("showRateBox_"+sid).src="/img/close.gif";
   
    rateBox = ce("div");
    rateBox.className = "rateBox";
    rateBox.id = "rateBox_"+sid;

        leftCol = ce("div");
        leftCol.className = "leftCol";
   
            hitsOut = ce("div");
            hitsOut.className = "hBox";
                hoTitle = ce("span");
                hoTitle.innerHTML = "<img src=\"/img/hitsout.gif\" alt=\"\" />";
                hoTitle.className = "hTitle";
               
                hoCount = ce("span");
                hoCount.className = "hocount";
                hoCount.innerHTML = hout;

            hitsOut.appendChild(hoTitle);
            hitsOut.appendChild(hoCount);   

            hitsIn = ce("div");               
                hitsIn.className = "hBox";
               
                hiTitle = ce("span");
                hiTitle.innerHTML = "<img src=\"/img/hitsin.gif\" alt=\"\" />";
                hiTitle.className = "hTitle";
               
                hiCount = ce("span");
                hiCount.className = "hicount";
                hiCount.innerHTML = hin;
               
            hitsIn.appendChild(hiTitle);
            hitsIn.appendChild(hiCount);

        leftCol.appendChild(hitsOut);
        leftCol.appendChild(hitsIn);

        rightCol = ce("div");
        rightCol.className = "rightCol";

            rateButton = ce("a");
            rateButton.className = "rateLink";
            rateButton.id = "rateButton_"+sid;
            rateButton.innerHTML = "RATE";
            rateButton.href = "javascript:rateSite("+sid+")";

        rightCol.appendChild(rateButton);
           
            rateSelect = ce("select");
            rateSelect.className = "rateSelect";
            rateSelect.id = "rateSelect_"+sid;
                rOption0 = ce("option");
                rOption0.value = "5";
                rOption0.innerHTML = "awesome";

                rOption1 = ce("option");
                rOption1.value = "4";
                rOption1.innerHTML = "nice";

                rOption2 = ce("option");
                rOption2.value = "3";
                rOption2.innerHTML = "useful";
               
                rOption3 = ce("option");
                rOption3.value = "2";
                rOption3.innerHTML = "poor";

                rOption4 = ce("option");
                rOption4.value = "1";
                rOption4.innerHTML = "crappy";

            rateSelect.appendChild(rOption0);
            rateSelect.appendChild(rOption1);
            rateSelect.appendChild(rOption2);
            rateSelect.appendChild(rOption3);
            rateSelect.appendChild(rOption4);
       
        rightCol.appendChild(rateSelect);
        tmp = ce("br");
        tmp.style.clear = "both";
       
        rightCol.appendChild(tmp);
       
                reportLink = ce("a");
                reportLink.className = "repLink";
                reportLink.id = "reportLink_"+sid;
                reportLink.innerHTML = "report broken link!";
                reportLink.href = "javascript:reportSite("+sid+")";
                rightCol.appendChild(reportLink);
       
    rateBox.appendChild(leftCol);
   
rateBox.appendChild(rightCol);
    tmp = ce("br");
    tmp.style.clear = "both";
   
    rateBox.appendChild(tmp);   
    $("site_"+sid).appendChild(rateBox);
    }

}


function setUrl(a)
{
    /* opera kann kein onfocus() :/ */

    qy = $("suche").value;
    while(qy.indexOf(" ") > -1){ qy = qy.replace(" ","+"); }
    qy = escape(qy);
    a.href =  "http://torrents.to/search/"+ $("site").value + "/" + qy + ".html";
   
   
   
}



function checkData()
{
    if($("suche").value.length == 0 || $("suche").value == "search torrents")
    {
        $("suche").value = "";
        flash("suche");
        return false;
    }

    if($("site").value == "choose")
    {
       
        flash("site");
        return false;
    }

    return true;
}


function flash(el)
{
    if(flashState == 1)
    {
        $(el).style.backgroundColor = "#FFF";
        flashState = 0;
    }
    else
    {
        $(el).style.backgroundColor = "#F00";   
        flashState = 1;
    }
   
    if(flashCount == 5)
    {
        $(el).focus();
        clearTimeout(flashTimer);
        flashCount = flashState = 0;
    }
    else
    {
        flashTimer = setTimeout("flash('"+el+"')",50);
        flashCount++;
    }
   
}

Name: Anonymous 2010-07-04 17:13

I lol'd

Name: Anonymous 2010-07-04 17:17

code thief! >:(

Name: Anonymous 2010-07-04 17:26

don't use german code - it's probably embedded with nazi ideals

Name: Anonymous 2010-07-04 17:32

>>4
I lol'd :D

卍卍卍卍卍卍卍卍卍卍卍卍卍卍

Name: Anonymous 2010-07-04 17:33

I got it from ze internet archive so im only stealing their old code which they no longer use.

Name: Adolf Culver 2010-07-04 17:36

OP, don't listen to >>4, He is a marxist pig

Name: Anonymous 2010-07-04 18:16

meta search site using frames
Go to 4-ch, where HTML is a respectable choice of programming language.

Name: Anonymous 2010-07-04 18:24

>>8
u mean 7chan

Name: Anonymous 2010-07-05 9:27

>>9
vdvsdv

Name: Anonymous 2010-07-05 9:28

buttercups and tulips.

Name: Anonymous 2010-07-05 12:59

sunshine lollipops

Name: Anonymous 2010-12-06 9:02

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-06 9:13

Back to /b/, ``GNAA Faggot''

Don't change these.
Name: Email:
Entire Thread Thread List