diff --git a/assets/scripts/lib/travis/location.coffee b/assets/scripts/lib/travis/location.coffee new file mode 100644 index 00000000..3dc3d132 --- /dev/null +++ b/assets/scripts/lib/travis/location.coffee @@ -0,0 +1,12 @@ +Travis.Location = Ember.HistoryLocation.extend + onUpdateURL: (callback) -> + guid = Ember.guidFor(this) + + Ember.$(window).bind 'popstate.ember-location-'+guid, (e) -> + callback(location.pathname + location.hash) + + getURL: -> + location = @get('location') + location.pathname + location.hash + +Ember.Location.implementations['travis'] = Travis.Location