diff.js 764 B

123456789101112131415161718192021
  1. /*
  2. Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling
  3. <div>s in <td> cells collapse their height to a single line.
  4. Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried
  5. with overflow-x disable the scrolling all the way until Mozilla 1.8 / FF 1.5
  6. and break Opera as well.
  7. So... we check for reaaaally old Gecko and hack in an alternate rule to let
  8. the wide cells spill instead of scrolling them. Not ideal as it won't work
  9. if JS is disabled, of course.
  10. */
  11. if (navigator && navigator.product == "Gecko" && navigator.productSub < "20021130") {
  12. var sheets = document.styleSheets;
  13. var lastSheet = sheets[sheets.length-1];
  14. lastSheet.insertRule(
  15. "table.diff td div { overflow: visible; }",
  16. lastSheet.cssRules.length);
  17. }