2 * Diff-view progressive enhancement (ported from skins/common/diff.js)
4 * Fixes an overflow bug in old versions of Firefox
11 $( document
).ready( function() {
13 * Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling <div>s in <td> cells collapse their
14 * height to a single line.
16 * Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried with overflow-x disable the scrolling
17 * all the way until Mozilla 1.8 / FF 1.5 and break Opera as well.
19 * So... we check for reaaaally old Gecko and hack in an alternate rule to let the wide cells spill instead of
20 * scrolling them. Not ideal as it won't work if JS is disabled, of course.
22 if ( window
.navigator
&& window
.navigator
.product
== 'Gecko' && window
.navigator
.productSub
< '20021130' ) {
23 document
.styleSheets
[document
.styleSheets
.length
- 1].insertRule(
24 'table.diff td div { overflow: visible; }',
25 document
.styleSheets
[document
.styleSheets
.length
- 1].cssRules
.length
30 } )( jQuery
, mediaWiki
);