MediaWiki:Common.js/IEFixes.js

Зьвесткі зь Вікіпэдыі — вольнай энцыкляпэдыі

Заўвага: каб пабачыць зьмены пасьля публікацыі, Вам можа спатрэбіцца ачысьціць кэш Вашага браўзэра.

  • Firefox / Safari: трымайце Shift і націсьніце Reload, ці націсьніце Ctrl-F5 ці Ctrl-R (⌘-R на Mac)
  • Google Chrome: націсьніце Ctrl-Shift-R (⌘-Shift-R на Mac)
  • Internet Explorer / Edge: трымайце Ctrl і націсьніце Refresh, ці націсьніце Ctrl-F5
  • Opera: націсьніце Ctrl-F5.
/**
 * Выпраўленьні для таго, што не працуе ў Internet Explorer
 * Крыніца: https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js/IEFixes.js&oldid=531659160
 */

/** CSS **/
var ieCSS;
 
/* In print IE (7?) does not like line-height */
ieCSS += '@media print { sup, sub, p { line-height: normal; } } ';
 
/* IE overflow bug */
ieCSS += 'div.overflowbugx { overflow-x: scroll !important; overflow-y: hidden !important; } ' +
         'div.overflowbugy { overflow-y: scroll !important; overflow-x: hidden !important; } ';
 
/* IE zoomfix. Use to fix right floating div/table inside tables. */
ieCSS += '.iezoomfix div, .iezoomfix table { zoom: 1; } ';
 
mw.util.addCSS( ieCSS );

/**
 * Helper script for .hlist class in Common.css
 * Last updated: January 6, 2013
 * @maintainer: [[User:Edokter]]
 * @revision: 3.0
 */
/* Fix wrapping issue in IE 8 and up for hlist in table; put a soft-hyphen in front of list items. */
if ( $.client.profile().versionBase > '7' ) {
    mw.util.addCSS( 'table.hlist li:before { content: "\\ad"; }' );
}
/* Add pseudo-selector class to last-child list items in IE 8 */
if ( $.client.profile().versionBase == '8' ) {
    $( '.hlist' ).find( 'dd:last-child, dt:last-child, li:last-child' )
        .addClass( 'hlist-last-child' );
}