// ==UserScript== // @name Remove Junk In Gaia Signatures (Toggle Aquarium) // @description Remove Junk In Gaia Signatures allows you to toggle aquariums with one click. Aquariums are removed my default (less lag). Can predict glowing time and what fish will glow (if any)!!! // @include http://www.gaiaonline.com/forum/* // @include http://www.gaiaonline.com/guilds/viewtopic.php?* // @include https://www.gaiaonline.com/forum/* // @include https://www.gaiaonline.com/guilds/viewtopic.php?* // @exclude http://www.gaiaonline.com/forum/mytopics/* // @exclude http://www.gaiaonline.com/forum/myposts/* // @exclude http://www.gaiaonline.com/forum/subscription/* // @exclude https://www.gaiaonline.com/forum/mytopics/* // @exclude https://www.gaiaonline.com/forum/myposts/* // @exclude https://www.gaiaonline.com/forum/subscription/* // @namespace http://userscripts.org/users/62850 // @version 89 // @downloadURL https://update.greasyfork.icu/scripts/1629/Remove%20Junk%20In%20Gaia%20Signatures%20%28Toggle%20Aquarium%29.user.js // @updateURL https://update.greasyfork.icu/scripts/1629/Remove%20Junk%20In%20Gaia%20Signatures%20%28Toggle%20Aquarium%29.meta.js // ==/UserScript== /*-------------------------------SETTINGS-------------------------------*/ var cl = "off"; // This one is for cars licenses, etc. ---cl means Cars Licenses var ad = "off"; // This is for aquariums. (default setting) ---ad means Aquarium Display var fb = "on"; // Insert the control in the lower right of the screen ---fb means Fixed Buttons var ct = "on"; // Checks the tank to see if it is glowing ---ct means Check Tank var jg = "off"; // ct (above option) must be set to on for this to work. Jump to active game when one is found. ---jg mean Jump to Glow /*-------------------------------SETTINGS-------------------------------*/ function $(id){ return document.getElementById(id); } function id2Name(id){ if(!id){ return "N/A"; } switch(Number(id)){ case 17710: return "Ring: Mantis"; case 17711: return "Ring: Slash"; case 17712: return "Ring: Dervish"; case 17713: return "Ring: Bump"; case 17714: return "Ring: Hack"; case 17715: return "Ring: Shuriken"; case 17716: return "Ring: Shark Attack"; case 17717: return "Ring: Hot Foot"; case 17718: return "Ring: Hornet Nest"; case 17719: return "Ring: Heavy Water Balloon"; case 17720: return "Ring: Solar Rays"; case 17721: return "Ring: Hunter's Bow"; case 17722: return "Ring: Duct Tape "; case 17723: return "Ring: Quicksand"; case 17724: return "Ring: Taunt"; case 17725: return "Ring: Scaredy Cat"; case 17726: return "Ring: Teflon Spray"; case 17727: return "Ring: Turtle"; case 17728: return "Ring: Rock Armor"; case 17729: return "Ring: Pot Lid"; case 17730: return "Ring: Improbability Sphere"; case 17731: return "Ring: Wish"; case 17732: return "Ring: Bandage"; case 17733: return "Ring: Diagnose"; case 17734: return "Ring: Defibrillate"; case 17735: return "Ring: Meat"; case 17736: return "Ring: Healing Halo"; case 17737: return "Ring: Divinity"; case 17738: return "Ring: Coyote Spirit"; case 17739: return "Ring: Knife Sharpen"; case 17740: return "Ring: Keen Aye"; case 17741: return "Ring: Adrenaline"; case 17742: return "Ring: Ghost"; case 17743: return "Ring: Gumshoe"; case 17744: return "Ring: Iron Will"; case 17745: return "Ring: My Density"; case 17747: return "Ring: Guns,Guns,Guns"; case 17748: return "Ring: Fire Rain"; case 17749: return "Ring: Fleet Feet"; case 17866: return "Ring: Fitness"; case 1167: return "Brown Magical Giftbox"; case 2242: return "Blue Magical Giftbox"; case 1141: return "Pink Magical Giftbox"; case 6960: return "Enchanted Wooden Trunk"; case 6961: return "Enchanted Golden Trunk"; case 77022: return "Enki\\'s Catch"; case 33881: return "Aquarium Hermit Cat"; case 31851: return "Aquarium Dark Knight Fish"; default: return id; } } function seconds2HMS(inputval,x){ var dd = Math.floor(inputval/(3600*24)); var hh_remaining = (inputval-(dd*(24*3600))); var hh = Math.floor(hh_remaining/3600); var ss_remaining = (hh_remaining-(hh*3600)); var mm = Math.floor(ss_remaining/60); var ss = (ss_remaining-(mm*60)); if(hh<10){ hh='0'+hh; } if(mm<10){ mm='0'+mm; } if(ss<10){ ss='0'+ss; } if(x==2||dd>0){ return dd+':'+hh+':'+mm+':'+ss; } else{ return hh+':'+mm+':'+ss; } } function unixTime2HumanTime(unixTimeStamp){ var time=new Date(unixTimeStamp*1000); var M=time.getMonth()+1; var d=time.getDate(); var y=time.getFullYear(); var h=time.getHours(); var m=time.getMinutes(); var s=time.getSeconds(); if(h<12){ var u="AM"; } else{ var u="PM"; } if (M<10){ M='0'+M; } if (d<10){ d='0'+d; } if (h>12){ h=h-12; } if(h==0){ h=12; } else if(h<10){ h='0'+h; } if(m<10){ m='0'+m; } if(s<10){ s='0'+s; } return M+'/'+d+'/'+y+' @ '+h+':'+m+':'+s+' '+u; } function calcTimePassed(ele){ var t=Number(ele.getAttribute('seconds'))+1; var p=Number(ele.getAttribute('players')); ele.setAttribute('seconds',t); if(t<0){ ele.textContent='Will glow in '+seconds2HMS(t*-1,1)+' second'+((t==-1)?'.':'s.'); } else if(t>gameTime){ ele.textContent='Ended '+seconds2HMS(t-gameTime,1)+' ago, had '+ele.getAttribute('players')+' player'+(p==1?'.':'s.'); ele.style.color='red'; } else if(p==maxPlayers){ ele.textContent='Sorry, this game is full.'; ele.style.color='black'; } else{ ele.textContent='Glowing has '+seconds2HMS(gameTime-t,1)+' left, has '+p+' player'+((p==1)?'.':'s.'); ele.style.color='green'; } setTimeout(function(){ calcTimePassed(ele); },999);//assume 1 ms of lag } function addCommas(nStr){//http://www.mredkj.com/javascript/nfbasic.html nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } function inArray(arr,val){ if((arr.constructor==Array)===false){ if(arr.toString().indexOf(',')!=-1){ arr=arr.split(','); } else{ if(arr==val){ return true; } else{ return false; } } } for(var i=0;i'||!aquaN){ aquaN=tankId; } var userN=json[1][2][tankId]['user_id']; try{ var glowT=json[1][2][tankId]['game_info'][1]["open_time"]; } catch(e){ var glowT=''; } try{ var play=json[1][2][tankId]['game_info'][1]["player_count"]; } catch(e){ var play=''; } var gameCap=0; var glowCt=0; var fishCt=0; var ghost=0; var cap=0; var tankVal=0; var tankLink=''; var glowDay=''; var glow=''; var item='';// Don't even try to read the next line var fishHTML='Aquarium Analysis for '+aquaN+''; getGlow(id,vs,NewE.childNodes[0],0); } } } else{ var gm_div=document; } var q=document.getElementsByName('quality'); var m=document.getElementsByName('wmode'); for(var i=0,stp=q.length;i
'; if(glowT){ if(glowT<=gaiaT){ if(glowT+gameTime>gaiaT){ if(play'+aquaN+''; } else{ fishHTML+=''; } fishHTML+=''; var fish=''; var ghostGlow=0; for(var i in json[2][2]){ var goldOR=''; var items=''; if(json[2][2][i]['in_env']==1){ fishCt++; var fishId=json[2][2][i]['item_id']; var fishImg=json[2][2]['item_specifics'][fishId]['thumbfile']; var fishDob=json[2][2][i]['inhab_incept']; var fishDod=json[2][2][i]['inhab_expires']; var fishName=json[2][2][i]['name']; var fishSpecies=json[2][2]['item_specifics'][fishId]['name']; var fishInfo=json[2][2]['item_specifics'][fishId]['description'].replace(/\\/g,'
').replace(/\"/g,'"'); if(!fishName){ fishName=' '; } if(fishDodgaiaT){ gameCap+=Number(cap); //} } else{ cap=' '; } var fishVal=0; glowCt++; items='Odds:
'; for(var x=0;x        This fish can give you '+json[2][2][i]['game_specifics']['rewards'][x]['cap']+' of this item.
'; } else { var amt=json[2][2][i]['game_specifics']['rewards'][x]['amount']; var fqcy=json[2][2][i]['game_specifics']['rewards'][x]['frequency']; var prob=json[2][2][i]['game_specifics']['rewards'][x]['chance']; fishVal=fishVal+(((prob*amt)/fqcy)*60); if(amt==1){ goldOR+=prob+' gold coin(s) every '+fqcy+' second(s).
        Gold coins are worth '+amt+' gold.
'; } else if(amt==2){ goldOR+=prob+' green coin(s) every '+fqcy+' second(s).
        Green coins are worth '+amt+' gold.
'; } else if(amt==3){ goldOR+=prob+' blue coin(s) every '+fqcy+' second(s).
        Blue coins are worth '+amt+' gold.
'; } else{ goldOR+=prob+' red coin(s) every '+fqcy+' second(s).
        Red coins are worth '+amt+' gold.
'; } } } //if(fishDod>gaiaT){ tankVal+=Number((fishVal'; if(items.length==10){ item='False'; items=''; } else{ item='True'; } } else{ glow='False'; item=' '; cap=' '; } if(fishDod>gaiaT){ var timeLeft=seconds2HMS(fishDod-gaiaT,2); } else{ var timeLeft='Ghost fish'; } fishHTML+='
'; } else{ //Fish not in aquarium so I dont care about it. } } if (state==2){//during Game var game=(glowCt/*-ghostGlow*/)+'/'+fishCt+' fish have been glowing since '+unixTime2HumanTime(glowT)+'. This game has '+play+'/'+maxPlayers+' players. The max score for this game is '+gameCap+'/'+Math.round(gameCap*.25)+'.'; } else if(state==4){//full Game var game=(glowCt/*-ghostGlow*/)+'/'+fishCt+' fish have been glowing since '+unixTime2HumanTime(glowT)+'. This game is full. The max score for this game was '+gameCap+'/'+Math.round(gameCap*.25)+'.'; } else if(state==3){//post Game var game=(glowCt/*-ghostGlow*/)+'/'+fishCt+' fish stopped glowing on '+unixTime2HumanTime(glowT+gameTime)+'. This game had '+play+'/'+maxPlayers+' players. The max score for this game is '+gameCap+'/'+Math.round(gameCap*.25)+'.'; } else if(state==1){//pre Game var game=(glowCt/*-ghostGlow*/)+'/'+fishCt+' fish will glowing in '+(glowT-gaiaT)+' seconds. The max score for this game will be '+gameCap+'/'+Math.round(gameCap*.25)+'.'; } else{//between Games var game=(glowCt/*-ghostGlow*/)+'/'+fishCt+' fish fish will glow in the next game. The max score for this game will be '+gameCap+'/'+Math.round(gameCap*.25)+'.'; } fishHTML+=''+ ''+ ''+ '
This tank does not exist. (How did you even open this?)
Fish SpeciesFish Name'+glowTime+'Gold CapItem GrantDate of BirthDate of DeathTime Till Death
'+fishName+''+glow+''+cap+''+item+''+unixTime2HumanTime(fishDob)+''+unixTime2HumanTime(fishDod)+''+timeLeft+'
This tank has made '+addCommas(goldN)+' gold.This tank has beed viewed '+addCommas(viewN)+' times.This tank has had '+addCommas(tapsN)+' taps.
'+game+'
Share these results with this link:
'; var analysis=window.open('data:text/html;charset=utf-8,'+escape(fishHTML)); if(analysis){ analysis.addEventListener('load',function(){ analysis.document.getElementById('gameLink').addEventListener('click',function(){ $('open_tank_'+this.name).click(); },false); },false); } else{ alert('Please enable popups for '+document.domain); } GM_xmlhttpRequest({//sends glowing tank data to page for use in possible new site feature. method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, data: "tankId="+tankId+"&fishCt="+fishCt+"&glowCt="+glowCt+"&playCt="+play+"&glowT="+glowT+"&ghostCt="+ghost+"&ghostGlowCt="+ghostGlow+"&fish="+fish.substr(0,fish.length-1), url: 'http://awesomolocity.org/gtools/background/glowRecorder.php', onload: function(r){} }); } catch(e){//Should not be required but failure is not acceptable. alert('An error occured:\n'+e+'\n----------------------------------------\nWill load web based php version.\nThis may have been caused by a connection issue.'); window.open('http://awesomolocity.org/gtools/glowTime.php?id='+tankId+'&GMT='+(new Date().getTimezoneOffset()/60*-1)); } ele.removeAttribute('disabled'); ele.childNodes[0].textContent='Analyze This Tank'; } else{ try{ if(typeof JSON != 'undefined'){ var json=JSON.parse(r.responseText); } else{ var json=eval(r.responseText); } var gaiaT=json[0][2]['gaia_curr_time']; var userN=json[1][2][tankId]['user_id']; var oldTank="/aquariumViewer/FishTankViewer.html"; var newTank="/tank/"+userN+"/"; var tankUrl="?version="+aquVs+"&userEnvironmentId="+tankId+"&gsiUrl=www&isInEdit=false&firstTime=&location=popUp&quality=low&graphicsServer=http://s.cdn.gaiaonline.com/images/Gaia_Flash/aquarium/&isGameActive="; try{ var glowT=json[1][2][tankId]['game_info'][1]["open_time"]; } catch(e){ var glowT=''; } try{ var play=json[1][2][tankId]['game_info'][1]["player_count"]; } catch(e){ var play=''; } var glowCt=0; var fishCt=0; var ghost=0; var ghostGlow=0; var fish=''; var seeked=false; var seeking=new Array(27421,31853,32635,34445,36938,39738,40136,44396,54475,54479,54481,54483,54487); for(var i in json[2][2]){ if(json[2][2][i]['in_env']==1){ fishCt++; if(json[2][2][i]['inhab_expires']0){ ele.setAttribute('seconds',gaiaT-glowT); ele.setAttribute('players',play); if(glowT<=gaiaT){ if(glowT+gameTime>gaiaT){ if(play .forum-flash-signature{\ position:relative;\ }\ object.hidden-Aquarium *,.sims3-wrapper{\ display:none !important;\ }\ object.forum-flash-sigs *{\ z-index:2;\ position:relative;\ }\ .guild-tank{\ height:180px;\ }\ #tgl-ctrl-pnl{\ position:fixed;\ bottom:'+($("meebo")?30:10)+'px;\ right:10px;\ background-color:-moz-dialog;\ border:2px solid #000000;\ padding:3px;\ text-align:center;\ -moz-border-radius:3px;\ z-index:99999;\ padding:1px;\ }\ #tgl-ctrl-pnl input{\ font-size:10px;\ }'); var runonece=false; function page_init(){ var divs=true; var embed = document.evaluate('.//object[contains(@data,"SignatureView.swf")]', document, null, 6, null); if(embed.snapshotLength==0){ divs=false; embed = document.evaluate('.//embed[contains(@src,"SignatureView.swf")]', document, null, 6, null); } if(divs){ var gm_div=document.createElement('div'); gm_div.setAttribute('id','tgl-ctrl-pnl'); gm_div.innerHTML=' '; document.body.appendChild(gm_div); var btn=$('toggleBtn'); btn.addEventListener('click',function(){toggleTanks(embed,this);this.blur();},false); if(!runonece) toggleTanks(embed,btn); for(var i=0,stp=embed.snapshotLength;i-1) id=id.substr(0,id.indexOf('&')); if(!vs){ var vs=vars.substr(vars.indexOf('version=')+8,3); if(vs.indexOf('&')>-1) vs=Number(vs.substr(0,vs.indexOf('&'))); } var NewE = document.createElement('div'); NewE.setAttribute('style','text-align:center;'); NewE.innerHTML=''; embed.snapshotItem(i).parentNode.parentNode.insertBefore(NewE,embed.snapshotItem(i).parentNode.nextSibling); NewE.childNodes[0].addEventListener('click',function(){toggleTank(this.parentNode.parentNode.getElementsByTagName('object')[0]);this.blur();},false); NewE.childNodes[1].addEventListener('click',function(){getGlow(this.name,this.getAttribute('alt'),this,1)},false); if(ct=="on"){ var NewE = document.createElement('div'); embed.snapshotItem(i).parentNode.parentNode.insertBefore(NewE,embed.snapshotItem(i).parentNode.nextSibling); NewE.innerHTML='
'; getGlow(id,vs,NewE.childNodes[0],0); } } } else if(embed.snapshotLength>0){ var gm_div=document.createElement('div'); gm_div.setAttribute('id','tgl-ctrl-pnl'); gm_div.innerHTML=' '; document.body.appendChild(gm_div); var btn=$('toggleBtn'); btn.addEventListener('click',function(){toggleTanks(embed,this);this.blur();},false); if(!runonece) toggleTanks(embed,btn); for(var i=0,stp=embed.snapshotLength;iAnalyze This Tank'; embed.snapshotItem(i).parentNode.parentNode.parentNode.parentNode.appendChild(NewE); NewE.childNodes[0].addEventListener('click',function(){toggleTank(this.parentNode.parentNode.getElementsByTagName('object')[0]);this.blur();},false); NewE.childNodes[1].addEventListener('click',function(){getGlow(this.name,this.getAttribute('alt'),this,1)},false); if(ct=="on"){ var NewE = document.createElement('tr'); embed.snapshotItem(i).parentNode.parentNode.parentNode.parentNode.appendChild(NewE); NewE.innerHTML='