Break detectPage loop
This commit is contained in:
parent
78be17fd58
commit
589f0512bf
|
@ -1,6 +1,7 @@
|
||||||
class window.Ajax
|
class window.Ajax
|
||||||
|
|
||||||
referer: false
|
referer: false
|
||||||
|
previous_page: null
|
||||||
|
|
||||||
load404Page: ->
|
load404Page: ->
|
||||||
$.get '/404.html', (data) ->
|
$.get '/404.html', (data) ->
|
||||||
|
@ -40,6 +41,9 @@ class window.Ajax
|
||||||
false
|
false
|
||||||
|
|
||||||
detectPage: () ->
|
detectPage: () ->
|
||||||
|
return false if @previous_page == _ajax.getAnchor()
|
||||||
|
@previous_page = _ajax.getAnchor()
|
||||||
|
|
||||||
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
||||||
_search.loadArtistData m[1]
|
_search.loadArtistData m[1]
|
||||||
else if _ajax.getAnchor().match /\/settings\//
|
else if _ajax.getAnchor().match /\/settings\//
|
||||||
|
|
Loading…
Reference in New Issue