parent
c379b76cea
commit
d00e854f4b
|
@ -30,11 +30,6 @@
|
||||||
* Whether the History API is enabled
|
* Whether the History API is enabled
|
||||||
*/
|
*/
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* Workaround for Chrome onload popstate event
|
|
||||||
*/
|
|
||||||
this.pushedSomething = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Icinga.History.prototype = {
|
Icinga.History.prototype = {
|
||||||
|
@ -150,17 +145,10 @@
|
||||||
onHistoryChange: function (event) {
|
onHistoryChange: function (event) {
|
||||||
|
|
||||||
var self = event.data.self,
|
var self = event.data.self,
|
||||||
icinga = self.icinga,
|
icinga = self.icinga;
|
||||||
onload;
|
|
||||||
|
|
||||||
icinga.logger.debug('Got a history change');
|
icinga.logger.debug('Got a history change');
|
||||||
|
|
||||||
// Chrome workaround:
|
|
||||||
onload = !self.pushedSomething && location.href === self.initialUrl;
|
|
||||||
self.pushedSomething = true;
|
|
||||||
// if (onload) { return; } // Temporarily disabled
|
|
||||||
// End of Chrome workaround
|
|
||||||
|
|
||||||
// We might find browsers showing strange behaviour, this log could help
|
// We might find browsers showing strange behaviour, this log could help
|
||||||
if (event.originalEvent.state === null) {
|
if (event.originalEvent.state === null) {
|
||||||
icinga.logger.debug('No more history steps available');
|
icinga.logger.debug('No more history steps available');
|
||||||
|
|
Loading…
Reference in New Issue