titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(),
prop: 'imageinfo',
iiprop: 'uploadwarning',
- indexpageids: ''
+ indexpageids: true
} ).done( function ( result ) {
var resultOut = '';
if ( result.query ) {
},
setWarning: function ( warning ) {
- $( '#wpDestFile-warning' ).html( warning );
+ var $warning = $( $.parseHTML( warning ) );
+ mw.hook( 'wikipage.content' ).fire( $warning );
+ $( '#wpDestFile-warning' ).empty().append( $warning );
// Set a value in the form indicating that the warning is acknowledged and
// doesn't need to be redisplayed post-upload
text: '{{' + license + '}}',
title: $( '#wpDestFile' ).val() || 'File:Sample.jpg',
prop: 'text',
- pst: ''
+ pst: true
} ).done( function ( result ) {
$spinnerLicense.remove();
uploadLicense.processResult( result, license );
*
* TODO: Is there a way we can ask the browser what's supported in `<img>`s?
*
- * TODO: Put SVG back after working around Firefox 7 bug <https://bugzilla.wikimedia.org/show_bug.cgi?id=31643>
+ * TODO: Put SVG back after working around Firefox 7 bug <https://phabricator.wikimedia.org/T33643>
*
* @param {File} file
* @return {boolean}
var reader = new FileReader();
if ( callbackBinary && 'readAsBinaryString' in reader ) {
// To fetch JPEG metadata we need a binary string; start there.
- // todo:
+ // TODO
reader.onload = function () {
callbackBinary( reader.result );