mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-04 11:48:26 +00:00
Merge "Dont push state to history in cases where not possible"
This commit is contained in:
commit
19c50267e7
|
@ -41,6 +41,8 @@
|
|||
},
|
||||
|
||||
pushState: function ( revId1, revId2, sliderView ) {
|
||||
// IE8 and IE9 do not have history.pushState()
|
||||
if ( typeof history.pushState === 'function' ) {
|
||||
history.pushState(
|
||||
{
|
||||
revid1: revId1,
|
||||
|
@ -52,6 +54,7 @@
|
|||
$( document ).find( 'title' ).text(),
|
||||
mw.util.wikiScript( 'index' ) + '?diff=' + Math.max( revId1, revId2 ) + '&oldid=' + Math.min( revId1, revId2 )
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
initOnPopState: function ( sliderView ) {
|
||||
|
|
Loading…
Reference in a new issue