diff --git a/public/js/icinga/history.js b/public/js/icinga/history.js index 0e17c46a3..30dd7d835 100644 --- a/public/js/icinga/history.js +++ b/public/js/icinga/history.js @@ -114,6 +114,26 @@ } }, + /** + * Replace the current history entry with the current state + */ + replaceCurrentState: function () { + if (! this.enabled) { + return; + } + + var state = this.getCurrentState(); + + if (state.url) { + this.icinga.logger.debug('Replacing current history state'); + window.history.replaceState( + this.getBehaviorState(), + null, + state.url + ); + } + }, + /** * Push the given url as the new history state, unless the history is disabled *