Simplify by using mw.util.getUrl

Change-Id: I97a0716e3ff69894c86fae04234d43fcab335b4a
This commit is contained in:
Fomafix 2019-07-03 08:42:49 +02:00
parent 6ea767f171
commit d73105191d

View file

@ -281,9 +281,10 @@
function editMessage( action ) {
var message = getCurrentMessage( action ),
defaultMsg = action === 'warn' ? 'warning' : 'disallowed',
url = mw.config.get( 'wgScript' ) +
'?title=MediaWiki:' + mw.util.wikiUrlencode( message ) +
'&action=edit&preload=MediaWiki:abusefilter-' + defaultMsg;
url = mw.util.getUrl( 'MediaWiki:' + message, {
action: 'edit',
preload: 'MediaWiki:abusefilter-' + defaultMsg
} );
window.open( url, '_blank' );
}