no seriously, get in my bed

message    hipsturrrrrr blog   faq   my face xoxo   
just follow. . .
// ==UserScript== // @name UnfollowHater // @namespace openminded // @description Shows who unfollowed you on Tumblr // @include http://www.tumblr.com/blog/* // @author Adrian Sanchez aka Openmindeo // @version 1.0.6 // @require http://sizzlemctwizzle.com/updater.php?id=112207&days=1 // ==/UserScript== //*********************************************************************************** // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.html //*********************************************************************************** //--UTIL Array.prototype.unique=function(a){ return function(){return this.filter(a)}}(function(a,b,c){return c.indexOf(a,b+1)<0 }); function getElementsByClass(clase){ var elementos = new Array(); var a=0; var htmlTags = new Array(); var htmlTags= document.getElementsByTagName('*'); for(var i=0; i 400 && pagina_requerida.status < 600){ error = true; crearBotonError(); } } } function obtenerCantidadSeguidores(pagina_requerida, tumblelog, listado){ if (pagina_requerida.readyState == 4){ if(pagina_requerida.status == 200 || window.location.href.indexOf ("http") == - 1){ var tempDiv = document.createElement("div"); tempDiv.innerHTML = pagina_requerida.responseText; var head = tempDiv.getElementsByTagName("h1")[0].innerHTML; head = head.replace(/\,/g,''); head = head.replace(/\./g,''); head = head.replace(/\ /g,''); head = head.match("[0-9]+"); crearLista(head, tumblelog, listado); cerrarListado(); }else if(pagina_requerida.status > 400 && pagina_requerida.status < 600){ error = true; crearBotonError(); } } } //---FIN AJAX //************ function crearNotificador(unfollowers){ if(unfollowers>0){ var divNotif = document.createElement("div"); divNotif.id='unfollow_notif'; divNotif.setAttribute("style","left:10px; width:"+(unfollowers.length*2)+"px;"); divNotif.setAttribute("class","tab_notice"); var notifValue = document.createElement("span"); notifValue.setAttribute("class","tab_notice_value"); notifValue.innerHTML = unfollowers; divNotif.appendChild(notifValue); var nipple = document.createElement("span"); nipple.setAttribute("class","tab_notice_nipple"); divNotif.appendChild(nipple); document.getElementById("unfollow_button").appendChild(divNotif); } } function crearEstilo(){ //AGREGAR ESTILO var header = document.getElementsByTagName("head")[0]; if (!header) { setTimeout(crearBoton,100); } var newCss = document.createElement("style"); newCss.setAttribute("type","text/css"); var innHTML = "#header #unfollow_button img {opacity: 0.5; width:24px; margin-top:8px;}"; innHTML += "\n#header #unfollow_button img:hover {opacity: 1;cursor:pointer;}"; innHTML += "#header #error_button img {opacity: 0.7; width:24px; margin-top:8px;}"; innHTML += "\n#header #error_button img:hover {opacity: 1;cursor:pointer;}"; newCss.innerHTML = innHTML; header.appendChild(newCss); } function crearBoton(){ //BOTON var newDiv = document.createElement("div"); newDiv.id="unfollow_button"; newDiv.setAttribute("class","tab iconic"); var unfButton = document.createElement("img"); unfButton.setAttribute("src","http://media.tumblr.com/tumblr_ltol2vLsnl1qzkqhi.png"); unfButton.addEventListener("click", mostrarUnfollows, false); newDiv.appendChild(unfButton); document.getElementById('pageCounter').innerHTML=""; document.getElementById("user_tools").appendChild(newDiv); if(localStorage[getTumblelog()+"_unfollowersList"]!=null){ var unfollowers = localStorage[getTumblelog()+"_unfollowersList"].split("|||"); unfollowers = borraElPrimero(unfollowers); crearNotificador(unfollowers.length); } } function crearBotonError(){ if(document.getElementById("error_button")==null){ var errDiv = document.createElement("div"); errDiv.id="error_button"; errDiv.setAttribute("class","tab iconic"); var errButton = document.createElement("img"); errButton.setAttribute("src","http://media.tumblr.com/tumblr_luxy5iWv8H1qzkqhi.png"); errButton.addEventListener("click", mostrarError, false); errDiv.appendChild(errButton); document.getElementById("user_tools").appendChild(errDiv); } } function crearCaja(){ var newDiv = document.createElement("div"); newDiv.setAttribute("class","tab iconic"); var pageCounter = document.createElement("span"); pageCounter.id="pageCounter"; pageCounter.setAttribute("title",(esEspanol)?"Páginas Revisadas":"Revised Pages"); newDiv.appendChild(pageCounter); document.getElementById("user_tools").appendChild(newDiv); var borde = document.createElement("div"); borde.id="containerA"; borde.setAttribute("style","position:absolute;float:right;opacity:0.9;z-index:100;display:none; background-color:#21364A; padding:8px; margin-left:225px; width:350px; top:75px; -moz-border-radius:7px; -webkit-border-radius:7px;"); var newDivA = document.createElement("div"); newDivA.id="listA"; newDivA.setAttribute("style","z-index:99;background-color:#F0F8FF;padding:6px;"); var newTextA = document.createElement("div"); newTextA.id="textA"; var pageCounter = document.createElement("div"); pageCounter.id="pageCounter"; var imgLoading = document.createElement("img"); imgLoading.id="imgLoading"; imgLoading.setAttribute("src","http://media.tumblr.com/tumblr_ltol2rpeAN1qzkqhi.gif"); imgLoading.setAttribute("style","display:block;width:225px;margin-left:65px;"); var cerrar = document.createElement("a"); cerrar.id="close"; cerrar.setAttribute("href","#"); cerrar.innerHTML="X"; cerrar.setAttribute("style","display:none; text-decoration:none;font-weight:bold;margin-left:325px;"); cerrar.setAttribute("onclick","document.getElementById(\"textA\").innerHTML=\"\";document.getElementById(\"containerA\").style.display=\"none\";document.getElementById(\"imgLoading\").style.display=\"block\";document.getElementById(\"close\").style.display=\"block\""); newDivA.appendChild(cerrar); newDivA.appendChild(newTextA); newDivA.appendChild(pageCounter); newDivA.appendChild(imgLoading); borde.appendChild(newDivA); document.getElementById("container").appendChild(borde); } function cerrarNotif(){ if(document.getElementById("unfollow_notif")!=null) document.getElementById("unfollow_notif").style.display="none"; } function cerrarListado(){ document.getElementById("textA").innerHTML=""; document.getElementById("containerA").style.display="none"; document.getElementById("imgLoading").style.display="block"; document.getElementById("close").style.display="block"; } function openListado(){ document.getElementById("containerA").style.display="block"; document.getElementById("imgLoading").style.display="block"; document.getElementById("close").style.display="none"; } function crearDivDummy(){ var newDiv = document.createElement("div"); newDiv.id="nuevo"; newDiv.setAttribute("style","display:none"); document.getElementById("header").appendChild(newDiv); var div = document.createElement("div"); div.setAttribute("class","post"); document.getElementById("header").appendChild(div); } function getTumblelog(){ return document.URL.split("/")[4].replace(/[#]/gi,""); } function getFollowerElement(claseABuscar, elementoABuscar){ var elementosPorClase = new Array(); var a=0; var htmlTags = new Array(); var htmlTags= elementoABuscar.getElementsByTagName('*'); for(var i=0; i"; instruccion+="

UNFOLLOW HATER

"; instruccion+="

No se ha detectado una ejecución anterior del Unfollow Hater desde este navegador para el tumblelog "+tumblelog; instruccion+=" por lo que se recopilara lista de followers actuales. Al concluir se refrescará esta página. Por favor espera...

"; instruccion+=""; }else{ instruccion = ""; instruccion+=""; instruccion+=""; instruccion+="

UNFOLLOW HATER

Has not been detected a previous run of the Unfollow Hater from this browser and for the tumblelog "+tumblelog; instruccion+=" so it will collect the list of current followers. When is ready this page will be refreshed. Please Wait...

"; } lista.innerHTML += instruccion; localStorage.setItem(tumblelog+"_unfollowersList",""); } buscarUnfollower(); } function crearLista(cantFollowers, tumblelog, listadoFollowers){ if(localStorage[tumblelog+"_cantFollowers"]==null) localStorage.setItem(tumblelog+"_cantFollowers",cantFollowers); else{ localStorage.setItem(tumblelog+"_newFollowers",cantFollowers); } var paginaTotal = Math.ceil(cantFollowers/40); if(paginaTotal == 0) paginaTotal = 1; for(var i=0; i"; listaStr+="

UNFOLLOW HATER

"; listaStr+=""; listaStr+=""; listaStr+=(esEspanol)?"":""; listaStr+=""; listaStr+=(esEspanol)?"":""; listaStr+=(esEspanol)?"":""; listaStr+=""; listaStr+=""; listaStr+=(esEspanol)?"":""; listaStr+=""; listaStr+=""; listaStr+="
Estado Followers:
Followers Stats:
AntesDespues
BeforeAfter
Todos:
All: "+actualFollowers+""+nuevoFollowers+"
No bloqueados:
Non-blocked:"+cantViejoListado+""+cantNuevoListado+"

"; listaStr+="Total Unfollowers: "+unfollowers.length+"" if(unfollowers.length>0) listaStr+=""+((esEspanol)?"Estos blogs han dejado de seguirte, cambiaron su nombre, borraron su cuenta, fueron marcados como bloqueados o spam o simplemente dejaron de aparecer en la lista de followers y puede que aún te sigan: ":"These blogs have ceased to follow you, are renamed, deleted their account, have been blocked, marked as spam or simply they don't appear in your followers list anymore but maybe they still following you.")+"" for(var k=0; k"+unfollowers[k]+""; } listaStr+=""; document.getElementById("imgLoading").style.display="none"; lista.innerHTML += listaStr; document.getElementById("close").style.display="block"; localStorage.setItem(tumblelog+"_unfollowersList",""); actualFollowers=nuevoFollowers; } function mostrarError(){ openListado(); document.getElementById("imgLoading").style.display="none"; var cuadro = document.getElementById("textA"); var instruccion=""; if(esEspanol){ instruccion = ""; instruccion+=""; instruccion+=""; instruccion+="

UNFOLLOW HATER

Ocurrió un problema en la conexión mientras se obtenía el listado de seguidores. Revisa tu conexión y refresca esta página.

"; }else{ instruccion = ""; instruccion+=""; instruccion+=""; instruccion+="

UNFOLLOW HATER

A connection problem ocurred while getting the followers list. Try to check your connection and refreshing this page.

"; } cuadro.innerHTML += instruccion; document.getElementById("close").style.display="block"; } function alimentarLista(divHTML,listadoGuardar){ var index = listadoGuardar.length; var paginaFollowers = getFollowerElement("follower_",divHTML); for(var i=0; i","").replace("",""); listadoGuardar[index] = url; index++; } return listadoGuardar; } function buscarUnfollower(){ i=0; setTimeout(function(){ var tumblelog = getTumblelog(); ajax(blogUrl+tumblelog+"/followers/", null, null, new Array(), null, null, tumblelog, "axa2"); },2000); } var error = false; var virgen = (localStorage[getTumblelog()+"_followersList"]==null); var blogUrl = "http://www.tumblr.com/blog/"; var i=0; var esEspanol = (navigator.language.indexOf("es")!=-1); if(document.URL.indexOf(blogUrl)!=-1){ obtenerListadoFollowers(); }