su_client_chromebar - var

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
var SU_ClientChromebar=function(){this.device="chromebar"; this.source="litebar"; this.tokenRecheckInt=600; this.viewPanes={}; this.stumblePending=false; this.stumbleTimeout=null; this.clientVersion=""; this.scriptVersion=""; this.currentReferralCount=0; this.uiStateCookie=new SUJS.Model.Cookie("uiState"); this.messageTipOverlay=null; this.messagePanelOverlay=null; this.hoverTipOverlay=null; this.tipTimer=null; this.currentNodeId=null; this.currentLabel=""; return true }; var SU_ClientChromebar_prototype={init:function(){var b=this; b.api.setResponseFilter(function(d,c){return b.responseFilter(d,c) }); var a=function(){suExtensionApi.getDomain(function(c){b.server="http://"+c; b.serverDomain=c; b.setupLitebar() }); b.checkInjectorVersion() }; if((typeof(suExtensionApi)=="undefined")||!suExtensionApi.isReady()) {window.addEventListener("suScriptReadyExtensionApi",function(){a() },false) }else{a() }},initUI:function(){$("#sponsored").hide() },checkInjectorVersion:function(){var a=this; this.getData("injectorVersion",function(b){if(!b||(b!=injectorScriptVersion)) {a.setData("injectorVersion",injectorScriptVersion); a.setData("@@CREATIONSCRIPT",null) }}) },resetLocalPrefs:function(){},subscribeGlobalEvents:function() {},bindListeners:function(){var a=this; this.userInterfaceEvents.favoritesLoggedOut.handler=function(e) {a.gotoUrl("/signup/?pre=chromebar_tip","signup"); return false }; this.userInterfaceEvents.shareStumble={target:"#numReferrals",action:"click",handle r:function(e){e.data.instance.performShareStumble(); return false }}; var c=["login","favoritesLoggedOut","homeButton","closeButton"]; for(i=0; i<c.length; i++){this.userInterfaceEvents[c[i]].visitorOK=true }var d; for(var b in this.userInterfaceEvents){d=this.userInterfaceEvents[b]; $(d.target).bind(d.action,{instance:this},d.handler) }},reloadCachedClientScript:function(){document.location.reload() },syncServerLoginState:function(b){var a=this; {suExtensionApi.message.broadcastMessage("reinitUser",{user:c.info});
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
a.checkForShares(function(){a.setupLitebar() }); if(b){b() }}else{a.performLogout(false,function(){a.setupLitebar() }); if(b){b() }}}) }else{a.performLogout(false,function(){a.setupLitebar() }); if(b){b() }}},true) },setupLitebar:function(){var a=this; var c=new SUJS.Model.Cookie("chromebar_stumble","1"); c.setExpirationSeconds(3600); c.save(); var b=new SUJS.Model.Cookie("litebar_recheck_auth"); b.domain=a.serverDomain.replace("www",""); b.read(); if(b.value=="1"){b.kill(); this.syncServerLoginState(); return false }this.getData("performClientUpdate",function(d){if(d==1) {a.setData("performClientUpdate",0); a.reloadCachedClientScript() }}); this.userInterfaceEvents.closeButton.handler=function(){if(a.viewPanes) umble.orig_url){a.gotoUrl(a.currentStumble.orig_url,"closetoolbar");
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/21/2011 for the course COMM 101 taught by Professor Sterling during the Spring '11 term at San Jose State University .

Page1 / 14

su_client_chromebar - var

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online