only run notitifications in the browser

This commit is contained in:
Tyler Renelle 2012-09-24 09:45:15 -04:00
parent d81ee34d2f
commit 63a9eac2d0
2 changed files with 5 additions and 0 deletions

View file

@ -19,6 +19,9 @@ setModel = function(m) {
setupNotifications = function() {
var statsNotification;
if (typeof jQuery === "undefined" || jQuery === null) {
return;
}
statsNotification = function(html, type) {
if (user.get('stats.lvl') === 0) {
return;

View file

@ -11,6 +11,8 @@ setModel = (m) ->
setupNotifications()
setupNotifications = ->
return unless jQuery? # Only run this in the browser
statsNotification = (html, type) ->
#don't show notifications if user dead
return if user.get('stats.lvl') == 0