From: Timo Tijhof Date: Sat, 21 Apr 2018 01:54:33 +0000 (+0100) Subject: wikibits: Remove redundant stubs for document.write X-Git-Tag: 1.34.0-rc.0~5594^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=7f2c6c401644c06b0bd30e311c6247bcaebec1bc;p=lhc%2Fweb%2Fwiklou.git wikibits: Remove redundant stubs for document.write The browser already warns for these, and our stubs were actually making it somewhat worse by appending to a weird place in the page instead of what the browser does (which is to either allow it properly, or ignore). Bug: T192623 Change-Id: I1924b252a8b986c4f1ad65f96149b8c06c1fad9b --- diff --git a/resources/src/mediawiki.legacy/wikibits.js b/resources/src/mediawiki.legacy/wikibits.js index 27d049eb3a..f58f0390c9 100644 --- a/resources/src/mediawiki.legacy/wikibits.js +++ b/resources/src/mediawiki.legacy/wikibits.js @@ -90,16 +90,4 @@ window.importScript = importScript; window.importStylesheet = importStylesheet; - /** - * Replace document.write/writeln with basic html parsing that appends - * to the to avoid blanking pages. Added JavaScript will not run. - * - * @deprecated since 1.26 - */ - [ 'write', 'writeln' ].forEach( function ( method ) { - mw.log.deprecate( document, method, function () { - $( 'body' ).append( $.parseHTML( Array.prototype.join.call( arguments, '' ) ) ); - }, 'Use jQuery or mw.loader.load instead.', 'document.' + method ); - } ); - }( mediaWiki, jQuery ) );