MediaWiki:Common.js
From LIAS Glossary
Revision as of 10:46, 4 March 2016 by Andreas Plank (Talk | contribs) (zoomimage not used anymore instead extension:Multimediaviewer)
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
// <syntaxhighlight lang="javascript">
// This JavaScript will be loaded for all users on every page load.
// Except for additions at the end, imported from en.wikipedia.org and modified (parts removed).
// for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history
// NEW: targetHighlighting (Hagedorn) and collapsibleTables (wikipedia) moved to jKey.js!
/* Scripts specific to Internet Explorer */
if (navigator.appName == "Microsoft Internet Explorer") {
/** Internet Explorer bug fix **************************************************
* Description: Fixes IE horizontal scrollbar bug
* Maintainers: [[User:Tom-]]?
*/
var oldWidth;
var docEl = document.documentElement;
function fixIEScroll() {
if (!oldWidth || docEl.clientWidth > oldWidth)
doFixIEScroll();
else
setTimeout(doFixIEScroll, 1);
oldWidth = docEl.clientWidth;
}
function doFixIEScroll() {
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
appendCSS( '@media print { sup, sub, p, .documentDescription { line-height: normal; }}');
} // END "Microsoft Internet Explorer"
/* Load when documetn is ready */
// $(document).ready(function() {
// });
// </syntaxhighlight>