Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/323094
Change subject: Use mw.Map#get instead of mw.Map#values ...................................................................... Use mw.Map#get instead of mw.Map#values Change-Id: Ifbc7f3e40190f678d6d9dad41fc161334b9b12c2 --- M modules/ext.RevisionSlider.SliderView.js M modules/ext.RevisionSlider.init.js 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider refs/changes/94/323094/1 diff --git a/modules/ext.RevisionSlider.SliderView.js b/modules/ext.RevisionSlider.SliderView.js index 56b9e03..38de177 100644 --- a/modules/ext.RevisionSlider.SliderView.js +++ b/modules/ext.RevisionSlider.SliderView.js @@ -263,7 +263,7 @@ $container.html( $slider ); this.slide( Math.floor( ( this.pointerNewer.getPosition() - 1 ) / this.slider.getRevisionsPerWindow() ), 0 ); - this.diffPage.replaceState( mw.config.values.extRevisionSliderOldRev, mw.config.values.extRevisionSliderNewRev, this ); + this.diffPage.replaceState( mw.config.get( 'extRevisionSliderOldRev' ), mw.config.get( 'extRevisionSliderNewRev' ), this ); this.diffPage.initOnPopState( this ); }, @@ -388,7 +388,7 @@ * @return {jQuery} */ getOldRevElement: function ( $revs ) { - return $revs.find( 'div.mw-revslider-revision[data-revid="' + mw.config.values.extRevisionSliderOldRev + '"]' ); + return $revs.find( 'div.mw-revslider-revision[data-revid="' + mw.config.get( 'extRevisionSliderOldRev' ) + '"]' ); }, /** @@ -398,7 +398,7 @@ * @return {jQuery} */ getNewRevElement: function ( $revs ) { - return $revs.find( 'div.mw-revslider-revision[data-revid="' + mw.config.values.extRevisionSliderNewRev + '"]' ); + return $revs.find( 'div.mw-revslider-revision[data-revid="' + mw.config.get( 'extRevisionSliderNewRev' ) + '"]' ); }, /** diff --git a/modules/ext.RevisionSlider.init.js b/modules/ext.RevisionSlider.init.js index 18f0fab..da61cc1 100644 --- a/modules/ext.RevisionSlider.init.js +++ b/modules/ext.RevisionSlider.init.js @@ -10,12 +10,12 @@ api = new mw.libs.revisionSlider.Api( mw.util.wikiScript( 'api' ) ); mw.track( 'counter.MediaWiki.RevisionSlider.event.init' ); - mw.libs.revisionSlider.userOffset = mw.user.options.values.timecorrection ? mw.user.options.values.timecorrection.split( '|' )[ 1 ] : mw.config.values.extRevisionSliderTimeOffset; + mw.libs.revisionSlider.userOffset = mw.user.options.get( 'timecorrection' ) ? mw.user.options.get( 'timecorrection' ).split( '|' )[ 1 ] : mw.config.get( 'extRevisionSliderTimeOffset' ); mw.libs.revisionSlider.HelpDialog.init(); api.fetchRevisionData( mw.config.get( 'wgPageName' ), { - startId: mw.config.values.extRevisionSliderNewRev, + startId: mw.config.get( 'extRevisionSliderNewRev' ), limit: mw.libs.revisionSlider.calculateRevisionsPerWindow( 160, 16 ) } ).then( function ( data ) { var revs, -- To view, visit https://gerrit.wikimedia.org/r/323094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbc7f3e40190f678d6d9dad41fc161334b9b12c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits