mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Reduce debugging overhead a bit, and provide default internal image size
Change-Id: I345af8c5905a5fa747f9ed342ba2ba8c1026d044
This commit is contained in:
parent
6e21f6bb27
commit
6139398494
|
@ -184,9 +184,8 @@ WikiLinkHandler.prototype.renderFile = function ( token, frame, cb, title ) {
|
|||
a.dataAttribs = token.dataAttribs;
|
||||
|
||||
var width, height;
|
||||
if ( ! height in oHash && ! width in oHash ) {
|
||||
width = '120px';
|
||||
height = '120px';
|
||||
if ( ! oHash.height && ! oHash.width ) {
|
||||
width = '200px';
|
||||
} else {
|
||||
width = oHash.width;
|
||||
height = oHash.height;
|
||||
|
@ -349,6 +348,7 @@ ExternalLinkHandler.prototype.onUrlLink = function ( token, frame, cb ) {
|
|||
[
|
||||
new KV( 'src', href ),
|
||||
new KV( 'alt', href.split('/').last() )
|
||||
|
||||
]
|
||||
)
|
||||
} );
|
||||
|
|
|
@ -269,8 +269,7 @@ MWParserEnvironment.prototype.tokensToString = function ( tokens, strict ) {
|
|||
if ( token === undefined ) {
|
||||
if ( this.debug ) { console.trace(); }
|
||||
this.tp( 'MWParserEnvironment.tokensToString, invalid token: ' +
|
||||
JSON.stringify( token ) +
|
||||
' tokens:' + JSON.stringify( tokens, null, 2 ));
|
||||
token, ' tokens:', tokens);
|
||||
continue;
|
||||
}
|
||||
if ( token.constructor === String ) {
|
||||
|
@ -282,8 +281,8 @@ MWParserEnvironment.prototype.tokensToString = function ( tokens, strict ) {
|
|||
return [out.join(''), tokens.slice( i )];
|
||||
}
|
||||
var tstring = JSON.stringify( token );
|
||||
this.dp ( 'MWParserEnvironment.tokensToString, non-text token: ' +
|
||||
tstring + JSON.stringify( tokens, null, 2 ) );
|
||||
this.dp ( 'MWParserEnvironment.tokensToString, non-text token: ',
|
||||
tstring, tokens);
|
||||
if ( this.debug ) { console.trace(); }
|
||||
//out.push( tstring );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue