User:Lidia.Pereira/PTSP/SCPL

From XPUB & Lens-Based wiki
< User:Lidia.Pereira‎ | PTSP
Revision as of 02:03, 30 June 2014 by Lidia.Pereira (talk | contribs) (Created page with "<div style="width:70%"> '''CybersTalk''' CybersTalk is a browser plug-in which pops up chat windows on your screen for every third-party website tracking you. It is a play o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CybersTalk

CybersTalk is a browser plug-in which pops up chat windows on your screen for every third-party website tracking you. It is a play on cyberstalker common behaviour.

<syntaxhighlight lang="javascript"> var head = document.getElementsByTagName("head")[0]; var body = document.getElementsByTagName("body")[0]; var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"; var jqueryui ="http://code.jquery.com/ui/1.10.4/jquery-ui.js"; var jquerymin = "http://code.jquery.com/jquery-1.11.0.min.js"; var script1 = document.createElement("SCRIPT"); var script2 = document.createElement("SCRIPT"); var script3 = document.createElement("SCRIPT"); head.appendChild(script1); head.appendChild(script2); head.appendChild(script3); script1.src = jquery; script2.src = jqueryui; script3.src = jquerymin; script1.type = "text/javascript"; script2.type = "text/javascript"; script3.type = "text/javascript"; var links = document.getElementsByTagName("link"); var linkSrc = []; var closingDiv = document.createElement("button"); var text=document.createTextNode("x") closingDiv.appendChild(text) closingDiv.id = "close";


for (var i = 0; i < links.length; i++) {

   var check = links[i].href.substring(7, links[i].href.length-1).split("/");
   var hoolahoop = "http://"+check[0]
   if (links[i].href.substring(0, 4) === "http") {
       if (hoolahoop != "http://"){
       linkSrc.push(hoolahoop);
       console.log(hoolahoop);}
           
       }
   }


uniqueArray = linkSrc.filter(function(elem, pos) {

   return linkSrc.indexOf(elem) == pos;

})

function janelas(){

   var iframe = document.createElement("iframe");
   body.insertBefore(iframe,body.firstChild);
   iframe.id = "trackerchat";
   iframe.src = "http://headroom.pzwart.wdka.hro.nl/~lpereira/cgi-bin/trackerscrape.cgi?url="+uniqueArray[0];
   document.getElementById('trackerchat').setAttribute("style","width: 190px; height: 255px; bottom:0; right:15px; z-index: 555555;");
   document.getElementById('trackerchat').style.position = 'fixed';
   body.insertBefore(closingDiv, body.firstChild)
   document.getElementById('close').setAttribute("style","width:23px; height:23px;background-color:#0099FF;z-index:999999;right:20px; bottom:227px; border:none; color: #FFFFFF; font-weight:bold; font-size:13px;")
   document.getElementById('close').style.position = 'fixed';
   document.getElementById('close').setAttribute("onclick","closeWin()");
   uniqueArray.splice(0,1)

}

if(linkSrc!=0){

   janelas();

}

function closeWin() {

   document.getElementById('close').setAttribute("style","display:  none")
   document.getElementById('trackerchat').setAttribute("style","display:  none")
   if (uniqueArray.length>0){
       janelas();
   }

}


</syntax>