mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-08 13:35:38 +00:00
only run notitifications in the browser
This commit is contained in:
parent
d81ee34d2f
commit
63a9eac2d0
2 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue