tuner2.js File Reference

Go to the source code of this file.

Functions

 if (typeof(Cc)=="undefined") var Cc
 
resultsEl empty ()
 
 dataCallback (function(results){if(results==null||results.length==0) return;results.forEach(function(val, i, arr){if((!limit &&(i >=LIMIT_NAV_RESULTS))||(limit &&(i >=limit))) return;var rowClass="row-even";if(i%2) rowClass="row-odd";var playStr=LastfmTuner._strings.GetStringFromName("lastfm.radio.play");var stationEl=$("<div class='nav-station "+rowClass+"'>"+"<div class='station-play-button'><a href='"+val.stationUrl+"'><img src='"+RADIO_ICON_SMALL+"'/>"+playStr+"</a></div>"+"<img src ='chrome://sb-lastfm/skin/"+val.type+".png' class='icon-type' />"+val.name+"</div>");$(".station-play-button", stationEl).click(function(e){e.stopPropagation();e.preventDefault();dump("Saving recent station\n");LastfmTuner.saveRecentStation(val);LastfmTuner.svc.radioPlay(val.stationUrl);});stationEl.click(function(e){dump("type: "+val.type+"\n");switch(val.type){case"artist":LastfmTuner.drawSingleArtist(val);break;case"tag":LastfmTuner.drawSingleTag(val);break;case"user":LastfmTuner.drawSingleUser(val);break;default:gBrowser.loadOneTab(val.url);}});stationEl.hover(function(e){this.oldClass=this.className;this.className+=" row-open";}, function(e){this.className=this.oldClass;});resultsEl.append(stationEl);});})
 
window resize (function(e){var bodyHeight=$('body')[0].scrollHeight;var height=bodyHeight-$('#header')[0].scrollHeight;var height2=$('#left-content')[0].scrollHeight;if(height2 > height) height=height2;$('#right-nav').css({"min-height":height});height=$('#content')[0].scrollHeight+$('#header')[0].scrollHeight;$(".wrapper-box").css({"height":bodyHeight,"max-height":bodyHeight});$("#login-page").css({"min-height":height});$("#subscriber-page").css({"min-height":height});})
 

Variables

var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird LastfmTuner
 
var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird dataSBMostPlayedArtists
 
var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird
SBProperties 
playCount
 
var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird
SBProperties 
artist
 
var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird
SBProperties 
populateCallback
 
dataSBHighestRatedArtists __pad41__
 
dataSBHighestRatedArtists
SBProperties 
rating
 
dataSBGenres __pad42__
 
dataSBGenres SBProperties tag
 
populateBox __pad43__
 
populateBox dataCallback
 
populateBox limit
 

Function Documentation

dataCallback ( function(results){if(results==null||results.length==0) return;results.forEach(function(val, i, arr){if((!limit &&(i >=LIMIT_NAV_RESULTS))||(limit &&(i >=limit))) return;var rowClass="row-even";if(i%2) rowClass="row-odd";var playStr=LastfmTuner._strings.GetStringFromName("lastfm.radio.play");var stationEl=$("<div class='nav-station "+rowClass+"'>"+"<div class='station-play-button'><a href='"+val.stationUrl+"'><img src='"+RADIO_ICON_SMALL+"'/>"+playStr+"</a></div>"+"<img src ='chrome://sb-lastfm/skin/"+val.type+".png' class='icon-type' />"+val.name+"</div>");$(".station-play-button", stationEl).click(function(e){e.stopPropagation();e.preventDefault();dump("Saving recent station\n");LastfmTuner.saveRecentStation(val);LastfmTuner.svc.radioPlay(val.stationUrl);});stationEl.click(function(e){dump("type: "+val.type+"\n");switch(val.type){case"artist":LastfmTuner.drawSingleArtist(val);break;case"tag":LastfmTuner.drawSingleTag(val);break;case"user":LastfmTuner.drawSingleUser(val);break;default:gBrowser.loadOneTab(val.url);}});stationEl.hover(function(e){this.oldClass=this.className;this.className+=" row-open";}, function(e){this.className=this.oldClass;});resultsEl.append(stationEl);});}  )
resultsEl empty ( )

Definition at line 428 of file jquery-ui-personalized-1.6rc2.min.js.

if ( typeof(Cc = ="undefined")

Debug Wrapper. Subclasses and replaces DateRemote to keep track of how many dataremotes are alive, and for which keys.

Enable DEBUG_DATAREMOTES to track down leaks.

Definition at line 524 of file sbDataRemote.js.

window resize ( function(e){var bodyHeight=$('body')[0].scrollHeight;var height=bodyHeight-$('#header')[0].scrollHeight;var height2=$('#left-content')[0].scrollHeight;if(height2 > height) height=height2;$('#right-nav').css({"min-height":height});height=$('#content')[0].scrollHeight+$('#header')[0].scrollHeight;$(".wrapper-box").css({"height":bodyHeight,"max-height":bodyHeight});$("#login-page").css({"min-height":height});$("#subscriber-page").css({"min-height":height});}  )

Variable Documentation

dataSBHighestRatedArtists __pad41__

Definition at line 867 of file tuner2.js.

dataSBGenres __pad42__

Definition at line 871 of file tuner2.js.

populateBox __pad43__

Definition at line 875 of file tuner2.js.

dataSBHighestRatedArtists SBProperties artist

Definition at line 40 of file tuner2.js.

populateBox dataCallback

Definition at line 875 of file tuner2.js.

Definition at line 40 of file tuner2.js.

Definition at line 40 of file tuner2.js.

populateBox limit
Initial value:
{
var resultsEl = $('#' + elementId + "-results")

Definition at line 877 of file tuner2.js.

dataSBGenres SBProperties playCount

Definition at line 40 of file tuner2.js.

dataSBGenres SBProperties populateCallback

Definition at line 40 of file tuner2.js.

dataSBHighestRatedArtists SBProperties rating

Definition at line 867 of file tuner2.js.

dataSBGenres SBProperties tag

Definition at line 871 of file tuner2.js.