User:AlefZet/monobook.js

From translatewiki.net
Jump to: navigation, search

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: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/*<pre>*/

/*
 *  Workaround for language variants
 */
var htmlE=document.documentElement;
if (wgUserLanguage == "kk"){ variant = "kk"; }
if (wgUserLanguage == "kk-kz"){ variant = "kk-Cyrl"; }
if (wgUserLanguage == "kk-tr"){ variant = "kk-Latn"; }
if (wgUserLanguage == "kk-cn"){
    // workaround for RTL ([[bugzilla:6756]])  and for [[bugzilla:02020]] & [[bugzilla:04295]]
    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/common/common_rtl.css">');
    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/common/quickbar-right.css">');
    document.write('<style type="text/css">html {direction:rtl;} body {direction:rtl; unicode-bidi:embed; font-size: 75%; letter-spacing: 0.001em;} h1.firstHeading {background-position: bottom right; background-repeat: no-repeat;} h3 {font-size:110%;} h4 {font-size:100%;} h5 {font-size:90%;} .editsection {float: left !important;}</style>');

    if (skin == "monobook"){
        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/monobook/rtl.css">');
        document.write('<style type="text/css">html > body div#content ol {clear: left;} ol {margin-left:2.4em; margin-right:2.4em;} ul {margin-left:1.5em; margin-right:1.5em;} .editsection {margin-right: 5px;margin-left: 0;} #content {float:left !important; margin-left: 0;} #column-one {padding-top:0; margin-top:0;} #p-navigation {padding-top:0; margin-top:160px;} #catlinks {width:100%;} #userloginForm {float: right !important;}</style>');
    }
/*
    if (skin == "standard"){
        document.write('<style type="text/css"> #article {float:left; margin: 0 -12.2em 0 0;} #topbar {float:right;}</style>');
    }
*/    
    document.direction="rtl";
    variant = "kk-Arab";
    htmlE.setAttribute("dir","rtl"); 
}

/*</pre>*/