ShadowGovermentLib

Shadow Goverment Lib

Versión del día 12/9/2015. Echa un vistazo a la versión más reciente.

Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.greatest.deepsurf.us/scripts/12370/73886/ShadowGovermentLib.js

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey to install this script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

function SGChecked(t){return t?"checked":""}function sendUpdateRequestSpectator(){if(hasFocus){var t=$.jStorage.get("SGFakeUserID",1),e=$.jStorage.get("SGFakeCitizenshipID",1),a="id="+$("#battleRoundId").val()+"&at="+t+"&ci="+e+"&premium=1";$.ajax({type:"GET",url:"battleScore.html",data:a,dataType:"json",success:function(t){updateStatus(t.attackerScore,t.defenderScore,t.remainingTimeInSeconds,t.percentAttackers),updateBattleHeros(t.topAttackers,t.topDefenders),updateTop10(t.top10Attackers,t.top10Defenders),updateBattleMonitor(t);for(var e=0;e<t.recentAttackers.length;e++)if(t.recentAttackers[e].id==latestAttackerId){t.recentAttackers=t.recentAttackers.slice(0,e);break}for(var e=0;e<t.recentDefenders.length;e++)if(t.recentDefenders[e].id==latestDefenderId){t.recentDefenders=t.recentDefenders.slice(0,e);break}0!=t.recentAttackers.length&&(latestAttackerId=t.recentAttackers[0].id,attackerHits=t.recentAttackers),0!=t.recentDefenders.length&&(latestDefenderId=t.recentDefenders[0].id,defenderHits=t.recentDefenders)}})}}function motivateResponse(t){var e=/type=(\d)&id=(\d+)/gim.exec($(this)[0].data),a=parseInt(e[1]),i=parseInt(e[2]),n=["none","weapons","breads","gifts"],s="";if(s=/&citizenMessage=(\S+)/gim.exec(t.getResponseHeader("TM-finalURLdhdg")))if("SUCCESFULLY_MOTIVATED"==s[1]){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="Мотивация прошла успешно" style="color: #0c0; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF479"></i>'),MotivateCountToday.count=MotivateCountToday.count+1,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday)),$("#countMotivationToday").html(MotivateCountToday.count)}else $("#motivate-"+n[a]+"-"+i).attr("title","Ошибка: "+s[1]);else if(/Вы отправили слишком много мотиваций сегодня/gim.exec(t.responseText)){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="Вы отправили слишком много мотиваций сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>'),MotivateCountToday.count=5,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday)),$("#countMotivationToday").html(MotivateCountToday.count)}else if(/Вы уже отправляли комплект этому гражданину сегодня/gim.exec(t.responseText)){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="Вы уже отправляли комплект этому гражданину сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/Этот гражданин получил слишком много мотиваций сегодня/gim.exec(t.responseText)){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="Этот гражданин получил слишком много мотиваций сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/Этот гражданин получил все виды мотивационных комплектов сегодня/gim.exec(t.responseText)){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="Этот гражданин получил все виды мотивационных комплектов сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/У вас не достаточно предметов/gim.exec(t.responseText)){var o=$("#motivate-"+n[a]+"-"+i).parent();o.empty(),o.append('<i title="У вас не достаточно предметов" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}}var localUrl=new String(window.location),URLBattle="battle.html?id=",URLConfig="editCitizen.html?Settings",URLMotivation="newCitizenStatistics.html",style,menuTop=$(".top-bar-section > .foundation-left");if($('<li id="ShadowGovernmentMenu" class="has-dropdown"><a id="ShadowGovernmentMenuHref" href="#"><i class="icon-star"></i>Shadow Government</a><ul id="ShadowGovernmentMenuDropdown" class="dropdown"></ul></li><li class="divider"></li>').appendTo(menuTop),$('<li class="title back js-generated"><h5><a href="#">« Back</a></h5></li>').appendTo("#ShadowGovernmentMenuDropdown"),$('<li><a href="editCitizen.html?Settings"><i class="icon-tools"></i>Settings</a></li>').appendTo("#ShadowGovernmentMenuDropdown"),$('<li><a href="#"><i class="icon-tools"></i>Blank</a></li>').appendTo("#ShadowGovernmentMenuDropdown"),$("#navigationCountry > i.icon-flag-2").removeClass("icon-flag-2").addClass("icon-flag"),localUrl.indexOf(URLConfig,0)>=0){var wrapper=$("#userMenu + script + div");wrapper.attr("id","WrapperMainConfig"),wrapper.empty(),$('<center><h1>Shadow Government Settings</h1></center><p style="clear: both"></p><br>').appendTo(wrapper),$('<div id="SettingsSpectator" class="testDivblue" style="width:100%;"><h3 id="SettingsSpectatorTittle">Settings Spectator</h3></div>').appendTo(wrapper),$('<div id="SettingsMotivator" class="testDivblue" style="width:100%;"><h3 id="SettingsMotivatorTittle">Settings Motivator</h3></div>').appendTo(wrapper),$('<b>SGTimerSpectator: </b><input id="SGTimerSpectatorText" name="SGTimerSpectatorText" type="text" value="'+$.jStorage.get("SGTimerSpectator",7e3)+'" autocomplete="off"><input id="SGTimerSpectatorSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b>SGFakeUserID: </b><input id="SGFakeUserIDText" name="SGFakeUserIDText" type="text" value="'+$.jStorage.get("SGFakeUserID",1)+'" autocomplete="off"><input id="SGFakeUserIDSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b>SGFakeCitizenshipID: </b><input id="SGFakeCitizenshipIDText" name="SGFakeCitizenshipIDText" type="text" value="'+$.jStorage.get("SGFakeCitizenshipID",1)+'" autocomplete="off"><input id="SGFakeCitizenshipIDSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b>SGSpectatorMode: </b><input class="SGSpectatorModeRadio" type="radio" name="SGSpectatorMode" value="true" '+SGChecked($.jStorage.get("SGSpectatorMode",!0))+'> True <input class="SGSpectatorModeRadio" type="radio" name="SGSpectatorMode" value="false" '+SGChecked(!$.jStorage.get("SGSpectatorMode",!0))+">False<br>").appendTo("#SettingsSpectator"),$('<b>SGMotivationMode: </b><input class="SGMotivationModeRadio" type="radio" name="SGMotivationMode" value="true" '+SGChecked($.jStorage.get("SGMotivationMode",!0))+'> True <input class="SGMotivationModeRadio" type="radio" name="SGMotivationMode" value="false" '+SGChecked(!$.jStorage.get("SGMotivationMode",!0))+">False<br>").appendTo("#SettingsMotivator"),$("#SGTimerSpectatorSubmit").click(function(){$.jStorage.set("SGTimerSpectator",$("#SGTimerSpectatorText").val())}),$("#SGFakeUserIDSubmit").click(function(){$.jStorage.set("SGFakeUserID",$("#SGFakeUserIDText").val())}),$("#SGFakeCitizenshipIDSubmit").click(function(){$.jStorage.set("SGFakeCitizenshipID",$("#SGFakeCitizenshipIDText").val())}),$(".SGSpectatorModeRadio").click(function(){"true"===$(this).val()?$.jStorage.set("SGSpectatorMode",!0):$.jStorage.set("SGSpectatorMode",!1)}),$(".SGMotivationModeRadio").click(function(){"true"===$(this).val()?$.jStorage.set("SGMotivationMode",!0):$.jStorage.set("SGMotivationMode",!1)}),$('<p style="clear: both"></p><br>').appendTo(wrapper)}if(localUrl.indexOf(URLBattle,0)>=0){var stringCSS=".fightsprite.critical1,.fightsprite.critical0,.fightsprite.critical2,.fightsprite.critical3,.fightsprite.normal1,.fightsprite.normal0,.fightsprite.normal2,.fightsprite.normal3,.fightsprite.miss,.fightsprite.toofast {\n display:none;\n}\n\n";if(stringCSS+=".fightsprite.critical1 + br,.fightsprite.critical0 + br,.fightsprite.critical2 + br,.fightsprite.critical3 + br,.fightsprite.normal1 + br,.fightsprite.normal0 + br,.fightsprite.normal2 + br,.fightsprite.normal3 + br,.fightsprite.miss + br,.fightsprite.toofast + br {\n display:none;\n}\n\n",style=document.createElement("style"),style.type="text/css",style.textContent=stringCSS,document.body.appendChild(style),style=void 0,window.picoModal=function(){return!0},$("#battleHeaderImage + #mainFight").css({"margin-top":"0px","background-color":"black"}),$("#battleHeaderImage").remove(),$("#battleStats").show(),$("#battleStats").append('<div class="foundation-style small-10 columns SpectatorsBattleStatsElements"><div class="foundation-style small-5 columns"><b>Total defenders online:</b><i id="totaldefenders" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="defendersLink">Show details</a> <a style="font-size: 11px;" href="" id="defendersLinkHide">Hide details</a> <br><div align="center" id="defendersMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div></div><div class="foundation-style small-5 columns"><b>Total attackers online:</b><i id="totalattackers" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="attackersLink">Show details</a> <a style="font-size: 11px; display: inline;" href="" id="attackersLinkHide">Hide details</a> <br><div align="center" id="attackersMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div></div>'),$("#battleStats").append('<div class="foundation-style small-10 columns SpectatorsBattleStatsElements"><b>Total spectators online:</b><i id="totalspectators" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="spectatorsLink">Show details</a> <a style="font-size: 11px;" href="" id="spectatorsLinkHide">Hide details</a> <br><div align="center" id="spectatorsMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div>  </div>'),$("#spectatorsLink").click(function(){return $("#spectatorsLink").fadeOut("fast",function(){$("#spectatorsLinkHide").fadeIn("fast"),$("#spectatorsMenu").fadeIn("fast")}),!1}),$("#spectatorsLinkHide").click(function(){return $("#spectatorsLinkHide").fadeOut("fast",function(){$("#spectatorsLink").fadeIn("fast"),$("#spectatorsMenu").fadeOut("fast")}),!1}),$("#attackersLink").click(function(){return $("#attackersLink").fadeOut("fast",function(){$("#attackersLinkHide").fadeIn("fast"),$("#attackersMenu").fadeIn("fast")}),!1}),$("#attackersLinkHide").click(function(){return $("#attackersLinkHide").fadeOut("fast",function(){$("#attackersLink").fadeIn("fast"),$("#attackersMenu").fadeOut("fast")}),!1}),$("#defendersLink").click(function(){return $("#defendersLink").fadeOut("fast",function(){$("#defendersLinkHide").fadeIn("fast"),$("#defendersMenu").fadeIn("fast")}),!1}),$("#defendersLinkHide").click(function(){return $("#defendersLinkHide").fadeOut("fast",function(){$("#defendersLink").fadeIn("fast"),$("#defendersMenu").fadeOut("fast")}),!1}),$("#battleSelectable:first + #battleSelectable div.small-10:first").remove(),$('<div id="wrapperBattleStatsButtons" class="foundation-style small-10 columns" style="margin-bottom:.4em;"></div>').insertBefore($("#battleSelectable:first + #battleSelectable div.small-4:first")),$('<div id="showTop3BattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Show Top 3 </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showTop10BattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Show Top 10 </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showRecentActionsBattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Recent Actions </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showSpectatorsBattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Spectators </div>').appendTo($("#wrapperBattleStatsButtons")),$("#wrapperBattleStatsButtons + div.small-4, #wrapperBattleStatsButtons + div.small-4 + div.small-2, #wrapperBattleStatsButtons + div.small-4 + div.small-2 + div.small-4").addClass("Top3BattleStatsElements"),$("#battleStats > div.small-10:first").addClass("Top10BattleStatsElements"),$(".Top10BattleStatsElements + div.small-10").addClass("RecentActionsBattleStatsElements"),$(".Top3BattleStatsElements").css("display",$.jStorage.get("SGTop3BattleStatsElements","none")),$("#showTop3BattleStats").click(function(){$(".Top3BattleStatsElements").toggle("slow",function(){$.jStorage.set("SGTop3BattleStatsElements",$(".Top3BattleStatsElements").css("display"))})}),$(".Top10BattleStatsElements").css("display",$.jStorage.get("SGTop10BattleStatsElements","none")),$("#showTop10BattleStats").click(function(){$(".Top10BattleStatsElements").toggle("slow",function(){$.jStorage.set("SGTop10BattleStatsElements",$(".Top10BattleStatsElements").css("display"))})}),$(".RecentActionsBattleStatsElements").css("display",$.jStorage.get("SGRecentActionsBattleStatsElements","none")),$("#showRecentActionsBattleStats").click(function(){$(".RecentActionsBattleStatsElements").toggle("slow",function(){$.jStorage.set("SGRecentActionsBattleStatsElements",$(".RecentActionsBattleStatsElements").css("display"))})}),$(".SpectatorsBattleStatsElements").css("display",$.jStorage.get("SGSpectatorsBattleStatsElements","none")),$("#showSpectatorsBattleStats").click(function(){$(".SpectatorsBattleStatsElements").toggle("slow",function(){$.jStorage.set("SGSpectatorsBattleStatsElements",$(".SpectatorsBattleStatsElements").css("display"))})}),$("#fightStatus").show().css({width:"initial"}).removeClass("testDivblue").addClass("fightContainer"),$("#fightResponse").hide().addClass("testDivblue"),$('<div id="statusDiv" ><b>Status Action </b></div>').insertBefore($("#fightResponse")),$("#statusDiv > b").css({"font-size":"14px",color:"#f2f2f2","text-shadow":"0 0 1px black,0 1px 1px black,0 -1px 1px #333"}),$('<a style="font-size: 11px; display: inline;" href="" id="statusLink">Show details</a>').appendTo($("#statusDiv")),$('<a style="font-size: 11px; display: none;" href="" id="statusLinkHide">Hide details</a>').appendTo($("#statusDiv")),$("#statusLink").click(function(){return $("#statusLink").fadeOut("fast",function(){$("#statusLinkHide").fadeIn("fast"),$("#fightResponse").fadeIn("fast")}),!1}),$("#statusLinkHide").click(function(){return $("#statusLinkHide").fadeOut("fast",function(){$("#statusLink").fadeIn("fast"),$("#fightResponse").fadeOut("fast")}),!1}),$.jStorage.get("SGSpectatorMode",!0)){var timerSpectator=$.jStorage.get("SGTimerSpectator",7e3),intervalID=window.setInterval(sendUpdateRequestSpectator,timerSpectator);continueThread=!1}}if(localUrl.indexOf(URLMotivation,0)>=0&&$.jStorage.get("SGMotivationMode",!0)){var CurrentDay=/\d+/gim.exec($("#userMenu div div.panel.callout b:eq(2)").html()),CurrentDay=parseInt(CurrentDay[0]),tmpMotivateCountToday={day:CurrentDay,count:0},MotivateCountToday=JSON.parse($.jStorage.get("SGMotivateCountToday",JSON.stringify(tmpMotivateCountToday)));MotivateCountToday.day!=tmpMotivateCountToday.day&&(MotivateCountToday=tmpMotivateCountToday,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday))),$(".dataTable ul.button.foundation-center.foundation-style-group li a.foundation-style.button.small.help i.icon-cupcake").parent().parent().toggle(),$('<span>Today motivate count: <b id="countMotivationToday">0</b><span>').insertAfter("#newCitizenStatsForm"),$("#countMotivationToday").html(MotivateCountToday.count),$("table.dataTable tr").each(function(){if($(this).children("td").children("i.icon-uniF478").length>0){var t=$(this).children("td:first").children(".profileLink").attr("href").replace("profile.html?id=","");1==$(this).children("td:eq(4)").children("i.icon-uniF478").length&&($(this).children("td:eq(4)").empty(),$(this).children("td:eq(4)").append('<i id="motivate-weapons-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-weapons icon-tank" value="'+t+'"></i>')),1==$(this).children("td:eq(5)").children("i.icon-uniF478").length&&($(this).children("td:eq(5)").empty(),$(this).children("td:eq(5)").append('<i id="motivate-breads-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-breads icon-bread" value="'+t+'"></i>')),1==$(this).children("td:eq(6)").children("i.icon-uniF478").length&&($(this).children("td:eq(6)").empty(),$(this).children("td:eq(6)").append('<i id="motivate-gifts-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-gifts icon-gift" value="'+t+'"></i>'))}return!0}),$(".motivate-element").click(function(){var t=0;$(this).hasClass("motivate-weapons")?t=1:$(this).hasClass("motivate-breads")?t=2:$(this).hasClass("motivate-gifts")&&(t=3);var e=($(this).parent(),$(this).attr("value")),a="type="+t+"&id="+e;$.ajax({type:"POST",url:"motivateCitizen.html?id="+e,data:a,dataType:"json",error:motivateResponse})}),$(".motivate-element").hover(function(){$(this).css("color","#999")},function(){$(this).css("color","#000")})}