MediaWiki:Common.js: Razlika med redakcijama
moving from monobook.js, update
prenesen začetek w:MediaWiki:Common.js |
moving from monobook.js, update |
||
Vrstica 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Scripts specific to Internet Explorer */
/* Preizkus, ali ima element določen razred **************************************▼
if ($.client.profile().name == 'msie') {
*▼
▲
▲ *
* Description: Fixes IE horizontal scrollbar bug
*/▼
▲ */
var oldWidth;▼
var hasClass = (function () {▼
};▼
▲ * Vzdrževalci: [[:en:User:Tom-|Tom-]]?
if (!oldWidth || docEl.clientWidth > oldWidth) {▼
{▼
doFixIEScroll();▼
▲ var oldWidth;
} else {▼
setTimeout(doFixIEScroll, 1);▼
oldWidth = docEl.clientWidth;▼
▲ if (!oldWidth || docEl.clientWidth > oldWidth)
▲ doFixIEScroll();
▲ else
▲ setTimeout(doFixIEScroll, 1);
▲ oldWidth = docEl.clientWidth;
docEl.style.overflowX = (docEl.scrollWidth - docEl.clientWidth < 4) ? "hidden" : "";
};
document.attachEvent("onreadystatechange", fixIEScroll);
document.attachEvent("onresize", fixIEScroll);
// In print IE (7?) does not like line-height
mw.util.addCSS('@media print { sup, sub, p, .documentDescription { line-height: normal; } }');
// IE overflow bug
mw.util.addCSS('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
mw.util.addCSS('.iezoomfix div, .iezoomfix table { zoom: 1; }');
}
/** Skrčljive razpredelnice *********************************************************
Vrstica 85 ⟶ 83:
for ( var i = 0; i < Tables.length; i++ ) {
if (
/* only add button and increment count if there is a header row to work with */
Vrstica 121 ⟶ 119:
for ( var i = 0; i < tableIndex; i++ ) {
if (
collapseTable( i );
}
Vrstica 158 ⟶ 156:
NavChild = NavChild.nextSibling
) {
if (
NavChild.style.display = 'none';
}
if (
NavChild.style.display = 'none';
}
Vrstica 174 ⟶ 172:
NavChild = NavChild.nextSibling
) {
if (
NavChild.style.display = 'block';
}
if (
NavChild.style.display = 'block';
}
Vrstica 197 ⟶ 195:
) {
// if found a navigation bar
if (
indexNavigationBar++;
Vrstica 211 ⟶ 209:
NavChild = NavChild.nextSibling
) {
if (
if (NavChild.style.display == 'none') {
NavToggleText = document.createTextNode(NavigationBarShow);
Vrstica 226 ⟶ 224:
j++
) {
if (
NavFrame.childNodes[j].appendChild(NavToggle);
}
|