From 7f2c6c401644c06b0bd30e311c6247bcaebec1bc Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 21 Apr 2018 02:54:33 +0100 Subject: [PATCH] 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 --- resources/src/mediawiki.legacy/wikibits.js | 12 ------------ 1 file changed, 12 deletions(-) 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 ) ); -- 2.20.1