From 589f0512bf62ff4574a420b6c80dcfa92a3fa89a Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Sun, 27 Nov 2011 01:16:10 +0400 Subject: [PATCH] Break detectPage loop --- app/assets/javascripts/ajax.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/ajax.coffee b/app/assets/javascripts/ajax.coffee index ead40ba..f82e5a4 100644 --- a/app/assets/javascripts/ajax.coffee +++ b/app/assets/javascripts/ajax.coffee @@ -1,6 +1,7 @@ class window.Ajax referer: false + previous_page: null load404Page: -> $.get '/404.html', (data) -> @@ -40,6 +41,9 @@ class window.Ajax false detectPage: () -> + return false if @previous_page == _ajax.getAnchor() + @previous_page = _ajax.getAnchor() + if m = _ajax.getAnchor().match /\/artist\/(.+)\// _search.loadArtistData m[1] else if _ajax.getAnchor().match /\/settings\//