http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65014
Revision: 65014 Author: thomasv Date: 2010-04-14 09:40:30 +0000 (Wed, 14 Apr 2010) Log Message: ----------- load the image after everything, because it can slow things down Modified Paths: -------------- trunk/extensions/ProofreadPage/proofread.js Modified: trunk/extensions/ProofreadPage/proofread.js =================================================================== --- trunk/extensions/ProofreadPage/proofread.js 2010-04-14 09:03:28 UTC (rev 65013) +++ trunk/extensions/ProofreadPage/proofread.js 2010-04-14 09:40:30 UTC (rev 65014) @@ -656,10 +656,14 @@ +function pr_load_image() { + pr_container.innerHTML = "<img id=\"ProofReadImage\" src=\"" + + escapeQuotesHTML(proofreadPageViewURL) + + "\" width=\"" + img_width + "\" />"; +} - function pr_setup() { self.pr_horiz = (self.proofreadpage_default_layout=='horizontal'); @@ -703,14 +707,12 @@ } else { //prevent the container from being resized once the image is downloaded. img_width = pr_horiz?0:parseInt(pr_width/2-70)-20; - pr_container.innerHTML = "<img id=\"ProofReadImage\" src=\"" - + escapeQuotesHTML(proofreadPageViewURL) - + "\" width=\"" + img_width + "\" />"; pr_container.onmousedown = pr_grab; pr_container.onmousemove = pr_move; if (pr_container.addEventListener) pr_container.addEventListener('DOMMouseScroll', pr_zoom_wheel, false); pr_container.onmousewheel = pr_zoom_wheel;//IE,Opera. + hookEvent( 'load', pr_load_image ); } table.setAttribute("id", "textBoxTable"); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs