Utente:Titore/Gadget-MultiDiffConsecutive.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
importo da MediaWiki:Gadget-MultiDiffConsecutive.js |
uso direttamente le api |
||
Riga 1:
/**
* View the next/ previous edit of a revision in MediaWiki multi diffs.
* Uses the localization provided by MediaWiki, requires mediawiki.util and mediawiki.api to work.
*
* This program is free software; you can redistribute it and/or modify
Riga 25:
'use strict';
var oldRevision, newRevision, nextRevisionText, prevRevisionText;
},▼
} );▼
if ( mw.config.get( 'wgAction' ) !== 'view' ) {
Riga 71 ⟶ 51:
getPrevRevisionText();
} else {
// Loading the interface message into the client, so it can be accessed by mw.msg
mw.
return new mw.Api().loadMessagesIfMissing( ['nextdiff'] );
nextRevisionText = text;▼
} )
.
.then( getPrevRevisionText );
}
Riga 87 ⟶ 70:
doLink();
} else {
// Loading the interface message into the client, so it can be accessed by mw.msg
getMessage( 'previousdiff' )▼
return new mw.Api().loadMessagesIfMissing( ['previousdiff'] );
.then( doLink );
}
}
|