From: Roan Kattouw Date: Sat, 14 May 2011 23:49:29 +0000 (+0000) Subject: Kill diff.js with fire. It only applies to versions of Gecko that were released befor... X-Git-Tag: 1.31.0-rc.0~30176 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=0ee7b5c2ead1abe722b5cdfc6e93578c021be463;p=lhc%2Fweb%2Fwiklou.git Kill diff.js with fire. It only applies to versions of Gecko that were released before Nov 2002, which is waaaay beyond what we support, or what anyone could conceivably be using in this day and age. --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 1dda3da226..2cecef6a6d 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -645,7 +645,6 @@ CONTROL; function showDiffStyle() { global $wgOut; $wgOut->addModuleStyles( 'mediawiki.legacy.diff' ); - $wgOut->addModuleScripts( 'mediawiki.legacy.diff' ); } /** diff --git a/resources/Resources.php b/resources/Resources.php index a3c07c90b1..efc38f5161 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -594,13 +594,10 @@ return array( 'dependencies' => 'mediawiki.legacy.wikibits', ), 'mediawiki.legacy.diff' => array( - 'scripts' => 'common/diff.js', 'styles' => 'common/diff.css', 'group' => 'mediawiki.action.history', 'remoteBasePath' => $GLOBALS['wgStylePath'], 'localBasePath' => "{$GLOBALS['IP']}/skins", - 'dependencies' => 'mediawiki.legacy.wikibits', - 'position' => 'top', ), 'mediawiki.legacy.edit' => array( 'scripts' => 'common/edit.js', diff --git a/skins/common/diff.js b/skins/common/diff.js deleted file mode 100644 index 5fd151fc21..0000000000 --- a/skins/common/diff.js +++ /dev/null @@ -1,20 +0,0 @@ -/* -Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling -
s in cells collapse their height to a single line. - -Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried -with overflow-x disable the scrolling all the way until Mozilla 1.8 / FF 1.5 -and break Opera as well. - -So... we check for reaaaally old Gecko and hack in an alternate rule to let -the wide cells spill instead of scrolling them. Not ideal as it won't work -if JS is disabled, of course. -*/ - -if (navigator && navigator.product == "Gecko" && navigator.productSub < "20021130") { - var sheets = document.styleSheets; - var lastSheet = sheets[sheets.length-1]; - lastSheet.insertRule( - "table.diff td div { overflow: visible; }", - lastSheet.cssRules.length); -}