/* * (c) 2000-2021 deviantART, Inc. All rights reserved. */ DWait.ready(["jms/lib/gmi.js","jms/lib/difi.js"],function(){window.Gruser=GMIBase.extend({}),window.GMFrame_BluesBar||(window.GMFrame_BluesBar=GMIBase.extend({})),window.DWait&&DWait.run("jms/pages/gruzecontrol/gruser.js")}); DWait.ready(["jms/lib/browser.js","jms/lib/station.js","jms/lib/difi.js","jms/lib/glbl.js","jms/lib/popup2.js","jms/lib/jquery/jquery.current.js","jms/lib/gmi.js"],function(){window.GPage||(window.GPage=GMIBase.extend({gmiConstructor:function(){}})),window.BluesBar={hiddenMenu:function(e,t,i,s){if($(".popup2-gruser").length)return Popup2.hideAll(),!1;var n,a,r,o,u,l;if(window.event&&(event.cancelBubble=!0),this.menu_on||!t&&this.treshold&&this.treshold>(new Date).valueOf())return!1;if(this.ieFix(e),this.gmi_called||(this.gmi_called=!0,DWait.ready(["jms/lib/gmi.js","jms/pages/gruzecontrol/gmframe_bluesbar.js"],this.frameReady.bind(this))),a=e.getAttribute("href").split("#").pop(),l=a.split("-").pop(),"give"!=l&&(e.className+=" active"),this.menu_on=e,n=new Popup2("BluesBar","body",{classes:"gruser-"+l+" popup2-gruser popup2-bluesbar",content:$("#"+a).clone(!0).show(),destroy:!0,created:function(){(e.offsetWidth>257||i)&&this.$node.css("width",$(e).width()+13+"px")},hidden:this.hiddenMenuDone.bind(this)}),l in{stats:1,stats2:1,activity:1}&&(n.render(),this.verify(l,n.$node.first().get(0),e)),r=n.position($(e)),u=n.position($(e).parent().parent()),o=u.bottom-r.bottom-2,o>10||l in{give:1,stats2:1}||Glbl("Site.is_mobile")||this.zNodes(e,120),l in{stats:1,stats2:1}&&!GMI.query("GMFrame_BluesBar")[0]&&(r.left=190,r.right=191),"buttons"==l&&(r.left-=192,r.right-=192),n.show(r),s)try{s(n)}catch(d){}return this.callFrame(n),!1},verify:function(e,t,i){var s,n,a;if(s=(t.getElementsByTagName("difi")||[])[0]){if(!this[e+"_node"]){switch(e in{stats:1,stats2:1}?(n=document.createElement("span"),n.className="bars"):(n=document.createElement("div"),n.className="ploading",n.style.paddingTop="16px",n.innerHTML="Loading..."),this[e+"_node"]=n,a=(n=GMI.query("GMFrame_BluesBar")[0])?n.gmi_args.id:GMI.up(i,"GMFrame_Gruser").gmi_args.id,e){case"activity":DiFi.pushPrivateGet("GrusersUserpageinfoModule","getActivityDetails",[GMI.query("Gruser")[0].gmi_args.id,a],this.difiReady.bind(this,e));break;case"stats":case"stats2":DiFi.pushPrivateGet("GrusersModules","displayModule",[GMI.query("Gruser")[0].gmi_args.id,a,"stats_pageviews",{}],this.difiReady.bind(this,e));break;default:throw Error("?? "+e)}DiFi.timer(1)}s.parentNode.replaceChild(this[e+"_node"],s)}},difiReady:function(e,t,i){"activity"==e&&(this[e+"_node"].className=""),this[e+"_node"].innerHTML=t?i.response.content.html:"[error: "+i.response.content+"]",e in{stats:1,stats2:1}&&this.animateGraph(this[e+"_node"])},animateGraph:function(e){var t;for(t=e.getElementsByTagName("span"),i=0;i!=t.length;i++)"bar"==t[i].className&&(23>i?Station.push(t[i],"top",{from:44,to:44,time:25*(t.length-i)},{from:44,to:0,time:150,f:Interpolators.pulse}):t[i].setAttribute("style","display:hidden"))},hiddenMenuMouse:function(e){if(Glbl("Site.is_mobile"))return!1;var t;BluesBar.mouseover_timer&&(clearTimeout(BluesBar.mouseover_timer),BluesBar.mouseover_timer=null),t=(e.getElementsByTagName("span")||[])[0],this.ieFix(e),!this.menu_on&&t&&"bluestip"==t.className&&t!=BluesBar.last_mouseover&&(BluesBar.last_mouseover=t,Station.run(t,"opacity",{from:0,to:1,time:155,f:Interpolators.sineCurve}),e.onmouseout=this.hiddenMenuOut),this.menu_on&&this.menu_on!=e&&(Popup2.hideAll(),this.hiddenMenu(e,!0))},hiddenMenuClick:function(){return window.event&&(event.stopPropagation&&event.stopPropagation(),event.preventDefault(),event.cancelBubble=!0),!1},ieFix:function(e){var t;Browser.isIE&&(t=(e.getElementsByTagName("span")||[])[0],t&&!t.style.width&&(t.style.width=t.parentNode.offsetWidth+"px"))},hiddenMenuOut:function(){BluesBar.mouseover_timer=setTimeout("BluesBar.last_mouseover = null",10)},hiddenMenuDone:function(){this.menu_on.className=this.menu_on.className.replace(/\s*active\b/g,""),this.zNodes(this.menu_on,20),this.treshold=(new Date).valueOf()+200,this.menu_on=!1,this.callFrame(null)},zNodes:function(e,t){var s,n,a;if(!Browser.isIE){if(GMI.up(e,"GPage"))s=[e.parentNode.parentNode];else{n=GMI.up(e,"Gruser").gmi_node,s=[n.getElementsByTagName("div")[1]];var r=document.getElementById("top")||document.getElementById("overhead")||document.getElementById("head");r&&s.push(r.lastChild),a=GMI.query(n,"GPage")[0],a.findBluesBar&&s.push(a.findBluesBar("gmbutton2admin"))}for(i=0;i!=s.length;i++)s[i]&&1==s[i].nodeType&&(s[i].style.zIndex=t+i)}},frameReady:function(){this.linked_frame||(this.linked_frame=GMI.query("GMFrame_BluesBar")[0])},callFrame:function(e){this.linked_frame&&this.linked_frame.currentPopupIs&&this.linked_frame.currentPopupIs(e)},graphHover:function(e,t){var i,s,n;if(i=t.target||t.srcElement,i&&1==i.nodeType){for(s=e.getElementsByTagName("span")[0],s.innerHTML=(i.getAttribute("title")||"").split(":").join(":")+"",n=-15;i=i.nextSibling;n++);s.style.left=Math.min(80,Math.max(-20,7*n))+"px"}},graphOut:function(e){e.getElementsByTagName("span")[0].innerHTML=""}},window.DWait&&DWait.run("jms/pages/gruzecontrol/bluesbar.js")}); DWait.ready(["jms/lib/gmi.js"],function(){window.GUserPoll=GMIBase.extend({}),window.DWait&&DWait.run("jms/pages/gruzecontrol/guserpoll.js")}); DWait.ready(["jms/lib/gmi.js"],function(){window.GBadge=GMIBase.extend({}),window.DWait&&DWait.run("jms/pages/gruzecontrol/gbadge.js")}); DWait.ready(["jms/lib/jquery/plugins/jquery.noleakyscroll.js","jms/legacy/modals.js","jms/lib/php.js","jms/lib/jquery/jquery.current.js"],function(){DWait.init("Grusers.modal",function(a){var s=$(a),e=PHP.userlink(s.data("username"),s.data("symbol"))+"'s "+s.data("title");return s.on("click","a",function(a){if(a.preventDefault(),s.data("bi_fields")){var r=jQuery.extend({},s.data("bi_fields"));PubSub.publish("BILogger.logEvent",r)}var t={width:s.data("width"),height:s.data("height")||375},l=$("
").addClass("gruser_modal");$('

').html(e).appendTo(l),$('