2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2014-05-14 05:52:31 +04:00
|
|
|
/*global Ember */
|
|
|
|
|
2014-10-25 01:09:50 +04:00
|
|
|
var trailingHistory,
|
|
|
|
registerTrailingLocationHistory;
|
|
|
|
|
|
|
|
trailingHistory = Ember.HistoryLocation.extend({
|
2014-06-16 00:54:58 +04:00
|
|
|
formatURL: function () {
|
2014-10-25 01:09:50 +04:00
|
|
|
// jscs: disable
|
2014-06-16 00:54:58 +04:00
|
|
|
return this._super.apply(this, arguments).replace(/\/?$/, '/');
|
2014-10-25 01:09:50 +04:00
|
|
|
// jscs: enable
|
2014-05-14 05:52:31 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-10-25 01:09:50 +04:00
|
|
|
registerTrailingLocationHistory = {
|
2014-05-14 05:52:31 +04:00
|
|
|
name: 'registerTrailingLocationHistory',
|
|
|
|
|
|
|
|
initialize: function (container, application) {
|
|
|
|
application.register('location:trailing-history', trailingHistory);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-10-25 01:09:50 +04:00
|
|
|
export default registerTrailingLocationHistory;
|