Space Tumblr Themes
// ==UserScript== // @name XKit // @namespace http://userscripts.org/users/atesh // @description Extension framework for Tumblr. Useful additions and tweaks. // @include http://www.tumblr.com/* // @exclude http://www.tumblr.com/upload/image* // @version 0.5.7 // ==/UserScript== // Versioning information. var xframework_version_major = "5"; var xframework_version_minor = "7"; var xframework_version = xframework_version_major + "." + xframework_version_minor; var xframework_update_url = "http://userscripts.org/scripts/source/109272.user.js"; var xversion = xframework_version; // here for compatibility reasons. var xframework_in_reset_mode = false; var xframework_panic = false; var xframework_debug_mode = true; // Bootstrap code. var xbootstrap_code = GM_getValue("xkit_bootstrap_code", ""); // debug mode: var xlog_debugmode = GM_getValue("xkit_log_debug_mode", "true"); // Bootstrap download URLs. var xbootstrap_fetch_url_c = 0; var xbootstrap_fetch_urls = new Array(); xbootstrap_fetch_urls[0] = "http://www.studioxenix.com/xkit/bootstrap/bootstrap.1.2.js.php"; xbootstrap_fetch_urls[1] = "http://studioxenix.com/xkit/bootstrap/bootstrap.1.2.js.php"; xbootstrap_fetch_urls[2] = "http://www.puaga.com/xkit/bootstrap/bootstrap.1.2.js.php"; xbootstrap_fetch_urls[3] = "http://xkit.puaga.com/bootstrap/bootstrap.1.2.js.php"; var xbootstrap_page_url = window.location.href; var xbootstrap_global_name = new Array(); var xbootstrap_global_data = new Array(); var xbootstrap_globalf_name = new Array(); var xbootstrap_globalf_data = new Array(); var xbootstrap_internal_name = new Array(); var xbootstrap_internal_data = new Array(); var xkit_is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; // Boot the XKit! try { xkit_init(); } catch(e) { if (document.location.href.indexOf("www.tumblr.com") !== -1) { xpanic("JS error: " + e.message, "xkit_usrptlandcode"); } else { xlog("Detected the following error: " + e.message, "xbootstrapinit"); } } function xkit_init() { // Framework initial startup section. if (xkit_is_chrome === true) { alert("XKit Error: Wrong browser! It looks like you've installed a version of XKit intended for Firefox users! You need to download XKit from xkit-extension.tumblr.com or www.studioxenix.com. Please click on the Wrench button on top right of your browser, select Preferences, then Extensions, and remove XKit and re-download it from the links provided above."); GM_setValue("xkit_unsupported_browser","true"); return; } // Lets set the 'next generation' variable. GM_setValue("xkit_5","true"); // let's first check if we are in a 'special' page, such as log and reset. if (xframework_in_reset_mode === false) { if (xkit_special_pages() === true) { // we are! stop. xlog("XKit 'special' page. Stopping init.", "xkit_init"); return; } } // Check if XKit was disabled by code. if (GM_getValue("xkit_unsupported_browser","false") === "true") { xlog("XKit is disabled.", "xkit_init"); return; } // Let's first check if the bootstrap code is installed. xbootstrap_code = GM_getValue("xkit_bootstrap_code", ""); var start_up_text = "*** Welcome to XKit! ***"; start_up_text = start_up_text + " Edition: Userscript version"; start_up_text = start_up_text + " Copyright 2011-2012 STUDIOXENIX "; start_up_text = start_up_text + " Framework Version: " + xframework_version; if (xbootstrap_code === "") { start_up_text = start_up_text + " *** NO BOOTSTRAP CODE! ***"; } else { start_up_text = start_up_text + " Bootstrap version: '" + xkit_package_information("xkit_bootstrap_code","version") + "'"; start_up_text = start_up_text + " xkit_main version: '" + xkit_package_information("xkit_main","version") + "'"; } start_up_text = start_up_text + " On Chrome: '" + xkit_is_chrome + "'"; start_up_text = start_up_text + " Platform: '" + navigator.platform + "'"; start_up_text = start_up_text + " Browser UA: '" + navigator.userAgent + "'"; start_up_text = start_up_text + " Debug Mode: '" + xframework_debug_mode + "'"; start_up_text = start_up_text + " Working on: " + window.location.href; start_up_text = start_up_text + " Last Panic: '" + xget("xkit_framework_last_panic", "none") + "'"; xlog(start_up_text, "xkit_init"); if (xbootstrap_code === "" || xframework_in_reset_mode === true) { // It is not. xlog("Bootstrap code not found, installing.", "xkit_init"); // xkit_silent_reset(); xkit_bootstrap_download(); } else { // It is! // let's first check if the user is upgrading from 4.x. var xkit_main_package_version = xkit_package_information("xkit_main","version"); if (xkit_main_package_version === "1.0 REV B" || xkit_main_package_version === "1.1 REV B") { xkit_reset(true); } else { xkit_bootstrap_boot(); } } } function xkit_special_pages() { // checks if we are in a 'special' page. if (xframework_in_reset_mode === true) { return false; } var page_location = window.location.href; if (page_location.search("www.tumblr.com/xkit_clear_log") != -1) { // clear the log! GM_setValue("xkit_log", ""); alert("XKit diagnostics log cleared."); } if (page_location.search("www.tumblr.com/xkit_log") != -1) { // show the log! xkit_special_pages_remove_not_found(""); try { document.getElementById('l10n_title').innerHTML = 'XKit Diagnostics Log'; if (document.createTextNode){ var log_html = GM_getValue("xkit_log",""); log_html = log_html.replace(/ /g,'
'); log_html = log_html.replace(/NaN/g,''); log_html = log_html.replace(/

/g,'

'); var err_div = create('

XKit Diagnostics Log:
To clean the log, go to www.tumblr.com/xkit_clear_log
'); document.getElementById("container").appendChild(err_div); } } catch(e) { alert("XKit Log: " + GM_getValue("xkit_log","Can't find log.")); } return true; } if (page_location.search("www.tumblr.com/xkit_reset") != -1) { // show the log! xkit_special_pages_remove_not_found("Please wait and check the message boxes."); if (confirm("Are you sure you want to reset XKit?")){ xkit_reset(true); } else { window.location.href = "http://www.tumblr.com/dashboard/"; } return true; } if (page_location.search("www.tumblr.com/xkit_reinstall_xprefs") != -1) { // show the log! xkit_special_pages_remove_not_found("One second..."); var remoteurl = "http://www.puaga.com/xkit/ext/fetch.php?fln=xkit_preferences"; remoteurl = remoteurl + "&rn2=" + Math.floor(Math.random()*669); remoteurl = remoteurl + "&rn3=" + Math.floor(Math.random()*69); remoteurl = remoteurl + "&rn4=" + Math.floor(Math.random()*9); GM_xmlhttpRequest({ method: "GET", url: remoteurl, onerror: function(response) { document.getElementById('l10n_title').innerHTML = 'Failed, retry later.'; return; }, onabort: function(response) { document.getElementById('l10n_title').innerHTML = 'Failed, retry later.'; return; }, onload: function(response) { document.getElementById('l10n_title').innerHTML = 'OK!'; GM_setValue("xkit_preferences", response.responseText); // window.location = "http://www.tumblr.com/dashboard/"; } }); return true; } } function xkit_special_pages_remove_not_found(msg) { // removes the "not found" text on 'special' pages. // otherwise, this confuses the users. try { // remove the stuff from page. var element = document.getElementById("l10n_sorry_1"); element.parentNode.removeChild(element); element = document.getElementById("l10n_email_button"); element.parentNode.removeChild(element); document.getElementById('l10n_title').innerHTML = 'XKit'; document.title = "XKit"; if (msg != undefined) { document.getElementById('l10n_sorry_2').innerHTML = msg; } else { element = document.getElementById("l10n_sorry_2"); element.parentNode.removeChild(element); } } catch(e) { // oh well at least we tried. return; } } function xkit_bootstrap_download_i(array_index) { try { // this download the bootstrap. var remoteurl = xbootstrap_fetch_urls[array_index]; xlog("Array index: " + array_index,"xkit_bootstrap_download_i"); xlog("Downloading bootstrap from: " + remoteurl,"xkit_bootstrap_download_i"); if (remoteurl.indexOf("?") != -1) { remoteurl = remoteurl + "&rn1=" + Math.floor(Math.random()*9669); } else { remoteurl = remoteurl + "?rn1=" + Math.floor(Math.random()*9669); } remoteurl = remoteurl + "&rn2=" + Math.floor(Math.random()*666); remoteurl = remoteurl + "&rn3=" + Math.floor(Math.random()*666); remoteurl = remoteurl + "&rn4=" + Math.floor(Math.random()*666); GM_xmlhttpRequest({ method: "GET", url: remoteurl, synchronous: true, onabort: function(response) { xkit_bootstrap_log("download failed, retrying...."); xkit_bootstrap_download(); return; }, onload: function(response) { if (response.responseText.indexOf("// Bootstrapper for XKit.") == -1) { // oops! download failed! retry. xlog("Download failed. Retrying, using another server.","xkit_bootstrap_download_i"); xkit_bootstrap_download(); return; } else { xlog("Download of bootstrap was successful.","xkit_bootstrap_download_i"); xlog("Booting new code.","xkit_bootstrap_download_i"); GM_setValue("xkit_bootstrap_code", response.responseText); xframework_in_reset_mode = false; xbootstrap_fetch_url_c = 0; xkit_init(); } } }); } catch(e) { alert("An error occurred while trying to download the bootstrap code: " + e.message); throw("Error 1031"); } } function xkit_bootstrap_download_i_chrome(array_index) { try { // this download the bootstrap. var remoteurl = xbootstrap_fetch_urls[array_index]; xlog("Array index: " + array_index,"xkit_bootstrap_download_i"); xlog("Downloading bootstrap from: " + remoteurl,"xkit_bootstrap_download_i"); if (remoteurl.indexOf("?") != -1) { remoteurl = remoteurl + "&rn1=" + Math.floor(Math.random()*9669); } else { remoteurl = remoteurl + "?rn1=" + Math.floor(Math.random()*9669); } document.title = "Downloading XKit Bootstap [Chrome Mode]"; remoteurl = remoteurl + "&rn2=" + Math.floor(Math.random()*666); remoteurl = remoteurl + "&rn3=" + Math.floor(Math.random()*666); remoteurl = remoteurl + "&rn4=" + Math.floor(Math.random()*666); if (typeof GM_xmlhttpRequest === 'undefined') { xkit_give_out_chrome_xml_error("502"); } GM_xmlhttpRequest({ method: "GET", url: remoteurl, synchronous: false, onload: function(response) { if (typeof response === 'undefined') { xkit_give_out_chrome_xml_error("504"); } try { if (response.responseText.indexOf("// Bootstrapper for XKit.") == -1) { // oops! download failed! retry. xlog("Download failed. Retrying, using another server.","xkit_bootstrap_download_i"); xkit_bootstrap_download(); return; } else { xlog("Download of bootstrap was successful.","xkit_bootstrap_download_i"); xlog("Booting new code.","xkit_bootstrap_download_i"); alert("(XKit Chrome Safe-Mode) XKit Bootstrap downloaded sucessfully. Trying to start the XKit Installer. Server ID: " + xbootstrap_fetch_url_c); GM_setValue("xkit_bootstrap_code", response.responseText); xframework_in_reset_mode = false; xbootstrap_fetch_url_c = 0; xkit_init(); } } catch(e) { xkit_give_out_chrome_xml_error("508"); } } }); } catch(e) { alert("An error occurred while trying to download the bootstrap code: " + e.message); throw("Error 1031"); } } function xkit_give_out_chrome_xml_error(error_id) { alert("XKit: You are using a version of Google Chrome that does not support cross domain fetching, which is required for XKit to run. Please update your browser or go to xkit-extension.tumblr.com to file a bug report or get more information about this issue. (Error Code: " + error_id + ")"); } function xkit_bootstrap_download() { // downloads the bootstrap code from studioxenix.com // or any other server specified on the array above. if (xbootstrap_fetch_url_c > xbootstrap_fetch_urls.length) { // we tried all the urls but could not download the // bootstrap code! shit. panic? xpanic("ERROR! Could not download the bootstrap code. Server down.", "xkit_bootstrap_download"); xlog("ERROR! Could not download the bootstrap code. Server down.", "xkit_bootstrap_download"); return; } // call the sub-function that will download the file. if (xkit_is_chrome === true) { xkit_bootstrap_download_i_chrome(xbootstrap_fetch_url_c); } else { xkit_bootstrap_download_i(xbootstrap_fetch_url_c); } xbootstrap_fetch_url_c++; } function xkit_package_boot(package_name, die_silently) { // "boots up" a package. // if "die_silently" is set to true, won't make a fuss about it. // returns true if ran successfully. try { // lets just run it. eval(GM_getValue(package_name)); return true; } catch(e) { xlog("Unable to run package '" + package_name + "': " + e.message, "xkit_package_boot(" + package_name + ")"); if (die_silently === undefined) { xpanic("Unable to run package '" + package_name + "'! XKit will disable this extension now, and it it recommended that you file a bug report about it, and perform a reset to XKit to avoid more problems. (Javascript Error: " + e.message + ")", "xkit_package_boot"); } return false; } } function xkit_show_log_page() { window.location.href = 'http://www.tumblr.com/xkit_log'; } function xkit_bootstrap_boot() { // "boots up" the bootstrap code. //if(unsafeWindow.top != unsafeWindow.self) { // return; //} try { // lets just run it. // eval(xbootstrap_code); eval(GM_getValue("xkit_bootstrap_code")); return true; } catch(e) { // ooops, something bad has happened? // let's just re-download the bootstrap? xlog("ERROR! Unable to boot Bootstrap code..", "xkit_bootstrap_boot"); xlog(" *** Javascript error: '" + e.message + "'", "xkit_bootstrap_boot"); xpanic("Unable to run Bootstrap code. XKit will now reset to its default settings so you can continue using it. (Javascript Error: " + e.message + ")", "xkit_bootstrap_boot"); xkit_reset(); return false; } } function xkit_silent_reset() { try { GM_deleteValue("xkit_bootstrap_code"); GM_deleteValue("xkit_main"); GM_deleteValue("xkit_installer"); GM_deleteValue("xkit_installed_extensions"); GM_deleteValue("xm_xkit_preferences_on"); GM_deleteValue("xkit_installation_complete"); GM_deleteValue("xkit_unsupported_browser"); var mlist = GM_listValues(); var i = 0; for (i=0; i 20240) { prev_log = ""; } prev_log = prev_log + + "
  • " + originator + ":

    " + logtext + "

  • "; GM_setValue("xkit_log", prev_log); if (xframework_debug_mode === true) { console.log(originator + ": * " + logtext); } } catch(e) { // sth bad happened but meh. return; } } function xpanic(msg, originator) { // used to halt the operation of the extension. // only used when something catastrophic has happened. try { if (xframework_panic === false) { var panic_msg = "XKIT PANIC! XKit stopped working. Something catastrophic has happened. Extension-wise, at least. Please consult the XKit FAQ on xkit-extension.tumblr.com, or go to www.tumblr.com/xkit_reset to reset and re-install XKit. Message: " + msg + " Originator: '" + originator + "'"; xlog(panic_msg, "xpanic"); alert(panic_msg); xframework_panic = true; xset("xkit_framework_last_panic", panic_msg); } } catch(e) { alert("XKIT PANIC! The following error occurred while trying to run the framework: " + e.message); } } function xkit_package_information(gmsavealias, info_needed) { var tempdata = GM_getValue(gmsavealias, ""); info_needed = info_needed.toUpperCase(); var inf_string = "/* " + info_needed + " "; var str_start = tempdata.indexOf(inf_string); if (str_start === -1) { return ""; } var str_end = tempdata.indexOf("**/", str_start); if (str_end === -1) { return ""; } return tempdata.substring(str_start + (inf_string.length), str_end - 1); } function xkit_bootstrap_attach_source(gmsavealias) { var source = GM_getValue(gmsavealias, ""); if (xkit_bootstrap_installed(gmsavealias) === false || source === "") { return ""; } var headID = document.getElementsByTagName("head")[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = source; headID.appendChild(newScript); } function xkit_bootstrap_installed(gmsavealias) { if (gmsavealias === "") { return false; } else { return true; } } function xglobalf_check(variablename) { var i = 0; for (i = 0; i" + data + ""); } function xkit_bootstrap_load_nosafeguard(scriptalias) { // same as xkit_bootstrap_boot, but when failed, doesn't shut down // the whole extension. xlog("xkit_bootstrap_load_nosafeguard: " + scriptalias, "xkit_bootstrap_load_nosafeguard"); var xload_code = GM_getValue(scriptalias, ""); if (xload_code === "") { xkit_bootstrap_log("xkit_bootstrap_load_nosafeguard: " + scriptalias + " > ERROR! Empty!"); return; } try{ eval(xload_code); } catch(e){ // nothing! xkit_bootstrap_log(" **** xkit_bootstrap_load_nosafeguard: " + scriptalias + " > ERROR! -> " + e.message); } finally{ return; } xkit_bootstrap_log("xkit_bootstrap_load_nosafeguard: " + scriptalias + " > DONE!"); } function xset(gmalias, data) { // chrome fails unless we do this. GM_deleteValue(gmalias); GM_setValue(gmalias, data); } function xappend(gmalias, data) { // chrome fails unless we do this. var old_data = GM_getValue(gmalias, ""); var new_data = old_data + data; GM_deleteValue(gmalias); GM_setValue(gmalias, new_data); } function xget(gmalias, defaultdata) { // chrome fails unless we do this. return GM_getValue(gmalias, defaultdata); } function create(htmlStr) { var frag = document.createDocumentFragment(), temp = document.createElement('div'); temp.innerHTML = htmlStr; while (temp.firstChild) { frag.appendChild(temp.firstChild); } return frag; } //--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; i0){ 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; margin-left:10px;}"; innHTML += "\n#header #unfollow_button img:hover {opacity: 1;cursor:pointer;}"; innHTML += "#header #error_button img {opacity: 0.7; width:24px; margin-top:8px;; margin-left:10px;}"; 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').parentNode.style.display="none"; document.getElementById('pageCounter').innerHTML=""; var userTools = document.getElementById("user_tools"); userTools.appendChild(newDiv); if(localStorage[getTumblelog()+"_unfollowersList"]!=null){ var unfollowers = localStorage[getTumblelog()+"_unfollowersList"].split("|||"); unfollowers = borraElPrimero(unfollowers); crearNotificador(unfollowers.length); } } function crearBotonError(statusCode){ error = true; 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", function(event){mostrarError(statusCode);}, false); errDiv.appendChild(errButton); document.getElementById('pageCounter').innerHTML=""; 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); var userTools = document.getElementById("user_tools"); userTools.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:95px; -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

    "; if(esEspanol){ 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...

    "; }else{ instruccion+="

    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...

    "; } instruccion+=""; 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 "+(esEspanol?"Nuevos":"New")+" 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 (por Tumblr) 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 (by Tumblr) 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+=""; if(oldUnfollowers.length>0){ listaStr+="
    "; listaStr+="
    "+(esEspanol?"Antiguos Unfollowers":"Old Unfollowers")+"
    "; listaStr+=""; listaStr+=""; for(var k=0; k"+oldUnfollowers[k]+""; } } listaStr+="
    Total: "+oldUnfollowers.length+"
    "; document.getElementById("imgLoading").style.display="none"; lista.innerHTML += listaStr; document.getElementById("close").style.display="block"; guardarTotalUnfollowers(tumblelog); localStorage.setItem(tumblelog+"_unfollowersList",""); } function mostrarError(statusCode){ openListado(); document.getElementById("imgLoading").style.display="none"; var cuadro = document.getElementById("textA"); cuadro.innerHTML=""; var instruccion=""; instruccion += ""; instruccion+=""; var intStatusCode = parseInt(statusCode); if(esEspanol){ if(intStatusCode>=400 && intStatusCode<500){ instruccion+=""; }else if(intStatusCode>=500 && intStatusCode<600){ instruccion+=""; }else if(intStatusCode==999 || !intStatusCode){ instruccion+=""; } }else{ if(intStatusCode>=400 && intStatusCode<500){ instruccion+=""; }else if(intStatusCode>=500 && intStatusCode<600){ instruccion+=""; }else if(intStatusCode==999 || intStatusCode){ instruccion+=""; } } instruccion+="

    UNFOLLOW HATER

    Error "+statusCode+".
    Error del script al intentar realizar la búsqueda, por favor envíame un submit con un screenshot de esta pantalla.

    Error "+statusCode+".
    Error del servidor de tumblr al intentar realizar la búsqueda, el servidor no está aceptando las peticiones del script. Por favor intenta más tarde cuando el servicio de Tumblr funcione con normalidad.

    Error.
    Tiempo agotado para la solicitud (conexión muy lenta), no se pudo obtener el listado de followers, refresca e intenta nuevamente.

    Error "+statusCode+".
    Script error while sending request to tumblr, please send me a screenshot with this message to my Submit

    Error "+statusCode+".
    Tumblr's server error while sending request to Tumblr, the server is not accepting the script'ss requests. Please try again later when the Tumblr service will operate normally.

    Error.
    Timeout for the request (too slow connection), failed to get the list of followers, refresh and try again.

    "; 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, 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(); }