MediaWiki:Common.js — различия между версиями

Материал из ЭНЭ
Перейти к: навигация, поиск
Строка 5: Строка 5:
 
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1));
 
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1));
  
/** JSconfig (old version, to be replaced soon) ************
+
importMW = function (name) { importScript('MediaWiki:'+name+'.js') }
* Global configuration options to enable and disable specific
+
* script features from [[MediaWiki:Common.js]]
+
* Override these default settings in your [[Special:Mypage/monobook.js]]
+
* for Example: JSconfig.loadAutoInformationTemplate = false;
+
*
+
*  Maintainer: [[User:Dschwen]]
+
*/
+
  
var JSconfig_old =
+
importScript_ = importScript
{
+
importScript = function (page, proj){
  loadAutoInformationTemplate : true,
+
  if (!proj) importScript_(page)
  specialSearchEnhanced : true,
+
  else {
subPagesLink : true,
+
  if (proj.indexOf('.')==-1) proj += '.wikipedia.org'
attributeSelf : true,
+
  importScriptURI('//'+proj+'/index.php?action=raw&ctype=text/javascript&title='+mw.util.wikiUrlencode(page))
  userUploadsLink : true
+
  }
 
}
 
}
  
  
/** JSconfig ************
+
mw.config.set( 'tableSorterCollation', {'ё':'е'} )
* Global configuration options to enable/disable and configure
+
* specific script features from [[MediaWiki:Common.js]] and
+
* [[MediaWiki:Monobook.js]]
+
* This framework adds config options (saved as cookies) to [[Special:Preferences]]
+
* For a more permanent change you can override the default settings in your
+
* [[Special:Mypage/monobook.js]]
+
* for Example: JSconfig.keys[loadAutoInformationTemplate] = false;
+
*
+
*  Maintainer: [[User:Dschwen]]
+
*/
+
  
var JSconfig =
 
{
 
prefix : 'jsconfig_',
 
keys : {},
 
meta : {},
 
  
//
+
//Messages
// Register a new configuration item
+
var listFA = {
  //  * name          : String, internal name
+
  fa:'Эта статья является избранной',
  //  * default_value : String or Boolean (type determines configuration widget)
+
  fl:'Этот список или портал является избранным',
//  * description  : String, text appearing next to the widget in the preferences
+
  ga:'Эта статья является хорошей'}
  //  * prefpage      : Integer (optional), section in the preferences to insert the widget:
+
var textFA = ' в другом языковом разделе'
//                    0 : User profile
+
//                    1 : Skin
+
//                    2 : Math
+
//                    3 : Files
+
//                    4 : Date and time
+
//                    5 : Editing
+
//                    6 : Recent changes
+
//                    7 : Watchlist
+
//                    8 : Search
+
//                    9 : Misc
+
//
+
// Access keys through JSconfig.keys[name]
+
//
+
registerKey : function( name, default_value, description, prefpage )
+
{
+
  if( typeof(JSconfig.keys[name]) == 'undefined' )
+
  JSconfig.keys[name] = default_value;
+
  else {
+
  
  // all cookies are read as strings,
+
var zeroSectionTip = 'Править введение'
  // convert to the type of the default value
+
  switch( typeof(default_value) )
+
  {
+
    case 'boolean' : JSconfig.keys[name] = ( JSconfig.keys[name] == 'true' ); break;
+
    case 'number'  : JSconfig.keys[name] = JSconfig.keys[name]/1; break;
+
  }
+
  
  }
+
var NavigationBarHide = '[скрыть]'
 +
var NavigationBarShow = '[показать]'
 +
var NavigationBarShowDefault = 2
  
  JSconfig.meta[name] = { 'description' : description, 'page' : prefpage || 0, 'default_value' : default_value };
+
if( /^en$/.test(wgUserLanguage) ) importMW('Common-' + wgUserLanguage)
},
+
  
readCookies : function()
 
{
 
  var cookies = document.cookie.split("; ");
 
  var p =JSconfig.prefix.length;
 
  var i;
 
  
  for( var key in cookies )
 
  {
 
  if( cookies[key].substring(0,p) == JSconfig.prefix )
 
  {
 
    i = cookies[key].indexOf('=');
 
    //alert( cookies[key] + ',' + key + ',' + cookies[key].substring(p,i) );
 
    JSconfig.keys[cookies[key].substring(p,i)] = cookies[key].substring(i+1);
 
  }
 
  }
 
},
 
  
writeCookies : function()
+
function LinkFA(){
  {
+
  var ll, s
  for( var key in JSconfig.keys )
+
$('#p-lang li').each( function(i, iw){
   document.cookie = JSconfig.prefix + key + '=' + JSconfig.keys[key] + '; path=/; expires=Thu, 2 Aug 2009 10:10:10 UTC';
+
   ll = iw.className.split(' ')[0] + '-'
  },
+
  for( var s in listFA )
 +
    if( document.getElementById(ll + s) )
 +
      $( iw )
 +
        .addClass( s.toUpperCase() )
 +
        .attr( 'title',  listFA[s] + textFA )
 +
  })
 +
}
  
evaluateForm : function()
 
{
 
  var w_ctrl,wt;
 
  //alert('about to save JSconfig');
 
  for( var key in JSconfig.meta ) {
 
  w_ctrl = document.getElementById( JSconfig.prefix + key )
 
  if( w_ctrl )
 
  {
 
    wt = typeof( JSconfig.meta[key].default_value );
 
    switch( wt ) {
 
    case 'boolean' : JSconfig.keys[key] = w_ctrl.checked; break;
 
    case 'string' : JSconfig.keys[key] = w_ctrl.value; break;
 
    }
 
  }
 
  }
 
  
  JSconfig.writeCookies();
+
function editZeroSection(){
  return true;
+
if( !wgArticleId ) return
  },
+
  mw.util.$content.find('h2')
 +
.children('.mw-editsection:first')
 +
.clone().prependTo('#bodyContent')
 +
.css('float','right')
 +
.find('a')
 +
.attr('title', zeroSectionTip)
 +
.attr('href', wgScript + '?title='+mw.util.wikiUrlencode(wgPageName) + '&action=edit&section=0' )
 +
}
  
setUpForm : function()
 
{
 
  var prefChild = document.getElementById('preferences');
 
  if( !prefChild ) return;
 
  prefChild = prefChild.childNodes;
 
  
  //
+
//Collapsiblе: [[ВП:СБ]]
  // make a list of all preferences sections
+
 
  //
+
var hasClass = (function (){
  var tabs = new Array;
+
var reCache = {}
  var len = prefChild.length;
+
return function (element, className){
  for( var key = 0; key < len; key++ ) {
+
   return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className)
   if( prefChild[key].tagName &&
+
      prefChild[key].tagName.toLowerCase() == 'fieldset' )  
+
    tabs.push(prefChild[key]);
+
 
   }
 
   }
 +
})()
  
  //
+
function collapsibleTables(){
  // Create Widgets for all registered config keys
+
var Table, HRow, HCell, btn, a, tblIdx = 0, colTables = []
  //
+
var allTables = document.getElementsByTagName('table')
  var w_div, w_label, w_ctrl, wt;
+
for (var i=0; Table = allTables[i]; i++){
  for( var key in JSconfig.meta ) {
+
   if (!hasClass(Table, 'collapsible')) continue
   w_div = document.createElement( 'DIV' );
+
  if (!(HRow=Table.rows[0])) continue
 +
  if (!(HCell=HRow.getElementsByTagName('th')[0])) continue
 +
  Table.id = 'collapsibleTable' + tblIdx
 +
  btn = document.createElement('span')
 +
  btn.style.cssText = 'float:right; font-weight:normal; font-size:smaller'
 +
  a = document.createElement('a')
 +
  a.id = 'collapseButton' + tblIdx
 +
  a.href = 'javascript:collapseTable(' + tblIdx + ');'
 +
  a.style.color = HCell.style.color
 +
  a.appendChild(document.createTextNode(NavigationBarHide))
 +
  btn.appendChild(a)
 +
  HCell.insertBefore(btn, HCell.childNodes[0])
 +
  colTables[tblIdx++] = Table
 +
}
 +
for (var i=0; i < tblIdx; i++)
 +
  if ((tblIdx > NavigationBarShowDefault && hasClass(colTables[i], 'autocollapse')) || hasClass(colTables[i], 'collapsed'))
 +
    collapseTable(i)
 +
}
  
  w_label = document.createElement( 'LABEL' );
+
function collapseTable (idx){
  w_label.appendChild( document.createTextNode( JSconfig.meta[key].description ) )
+
var Table = document.getElementById('collapsibleTable' + idx)
  w_label.htmlFor = JSconfig.prefix + key;
+
var btn = document.getElementById('collapseButton' + idx)
 +
if (!Table || !btn) return false
 +
var Rows = Table.rows
 +
var isShown = (btn.firstChild.data == NavigationBarHide)
 +
btn.firstChild.data = isShown ?  NavigationBarShow : NavigationBarHide
 +
var disp = isShown ? 'none' : Rows[0].style.display
 +
for (var i=1; i < Rows.length; i++)
 +
    Rows[i].style.display = disp
 +
}
  
   wt = typeof( JSconfig.meta[key].default_value );
+
function collapsibleDivs(){
 +
var navIdx = 0, colNavs = [], i, NavFrame
 +
var divs = document.getElementById('content').getElementsByTagName('div')
 +
for (i=0; NavFrame = divs[i]; i++) {
 +
   if (!hasClass(NavFrame, 'NavFrame')) continue
 +
  NavFrame.id = 'NavFrame' + navIdx
 +
  var a = document.createElement('a')
 +
  a.className = 'NavToggle'
 +
  a.id = 'NavToggle' + navIdx
 +
  a.href = 'javascript:collapseDiv(' + navIdx + ');'
 +
  a.appendChild(document.createTextNode(NavigationBarHide))
 +
  for (var j=0; j < NavFrame.childNodes.length; j++)
 +
    if (hasClass(NavFrame.childNodes[j], 'NavHead'))
 +
      NavFrame.childNodes[j].appendChild(a)
 +
  colNavs[navIdx++] = NavFrame
 +
}
 +
for (i=0; i < navIdx; i++)
 +
  if ((navIdx > NavigationBarShowDefault && !hasClass(colNavs[i], 'expanded')) || hasClass(colNavs[i], 'collapsed'))
 +
    collapseDiv(i)
 +
}
  
  w_ctrl = document.createElement( 'INPUT' );
+
function collapseDiv(idx) {
  w_ctrl.id = JSconfig.prefix + key;
+
var div = document.getElementById('NavFrame' + idx)
 +
var btn = document.getElementById('NavToggle' + idx)
 +
if (!div || !btn) return false
 +
var isShown = (btn.firstChild.data == NavigationBarHide)
 +
btn.firstChild.data = isShown ? NavigationBarShow : NavigationBarHide
 +
var disp = isShown ? 'none' : 'block'
 +
for (var child = div.firstChild; child != null;  child = child.nextSibling)
 +
  if (hasClass(child, 'NavPic') || hasClass(child, 'NavContent'))
 +
      child.style.display = disp
 +
}
  
  // before insertion into the DOM tree
 
  switch( wt ) {
 
    case 'boolean' : w_ctrl.type = 'checkbox'; break;
 
    case 'string'  : w_ctrl.type = 'text'; break;
 
  }
 
  
  w_div.appendChild( w_label );
+
//Execution
  w_div.appendChild( w_ctrl );
+
mw.loader.using( 'mediawiki.util', function() {
  tabs[JSconfig.meta[key].page].appendChild( w_div );
+
 
+
  // after insertion into the DOM tree
+
  switch( wt ) {
+
    case 'boolean' : w_ctrl.defaultChecked = w_ctrl.checked = JSconfig.keys[key]; break;
+
    case 'string' : w_ctrl.defaultValue = w_ctrl.value = JSconfig.keys[key]; break;
+
  }
+
  
  }
 
  addEvent(document.getElementById('preferences').parentNode, 'submit', JSconfig.evaluateForm );
 
}
 
}
 
  
JSconfig.readCookies();
+
if (wgCanonicalNamespace == 'Special'){
addOnloadHook(JSconfig.setUpForm);
+
  
if (isMainPage && !isDiff)  
+
if (/^(Uplo|Sear|Stat|Spec|Abus|Prefe|Move|Watch|Newp|Log|Block$)/i.test(wgCanonicalSpecialPageName))
{
+
  importMW(wgCanonicalSpecialPageName)
document.write('<style type="text/css">/*<![CDATA[*/ #siteSub, #contentSub, h1.firstHeading { display: none !important; } /*]]>*/</style>');
+
}
+
  
/* подгрузка файла со скриптами для редактирования  *****************************************
+
}else switch (wgAction){
*/
+
if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0)
+
{
+
        if (wgCanonicalNamespace != "Special")
+
        {
+
                document.write('<script type="text/javascript" src="/index.php?title=MediaWiki:Onlyifediting.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
+
  
/* importScript('MediaWiki:Onlyifediting.js'); */
+
case 'history': importMW('History'); break
        }
+
}
+
  
 +
case 'delete': importMW('Deletepage'); break
 +
 +
case 'edit': case 'submit': importMW('Editpage') //and continue with the default: view, purge
 +
 +
default:
 +
 +
  $(editZeroSection)
 +
  addOnloadHook(collapsibleDivs)
 +
  addOnloadHook(collapsibleTables)
 +
  mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400')
 +
  if( document.location && document.location.protocol == 'https:' )
 +
    importMW('Secure')
 +
  if (navigator.platform.indexOf('Win') != -1)
 +
    mw.util.addCSS('.IPA, .Unicode { font-family: "Arial Unicode MS", "Lucida Sans Unicode"; }')
 +
 +
 +
 
 +
  switch( wgNamespaceNumber ){
 +
    case 0: case 100:
 +
      $(LinkFA)
 +
      importMW('Osm')
 +
      if( wgArticleId==4401 ) importMW('Mainpage')
 +
      break
 +
    case 6:
 +
      importMW('Filepage')
 +
      break
 +
  }   
  
function addLoadEvent(func)
 
{
 
if (window.addEventListener)
 
  window.addEventListener("load", func, false);
 
else if (window.attachEvent)
 
  window.attachEvent("onload", func);
 
 
}
 
}
  
//Execution
+
 
if (wgCanonicalNamespace == 'Special'){
+
if( !wgUserName )  mw.util.addCSS('#mw-fr-revisiontag {display:none}')  //hide FlaggedRevs
   switch (wgCanonicalSpecialPageName){
+
 
  case 'Upload': importScript('MediaWiki:Upload.js'); break
+
 
  case 'Search': importScript('MediaWiki:Search.js'); break
+
 
 +
/* Helper script for .hlist class in common.css
 +
* Author: [[:en:User:Edokter]]
 +
*/
 +
 +
if ( $.client.profile().name == 'msie' ) {
 +
   /* 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' );
 +
  }
 +
  /* Generate interpuncts and parens for IE < 8 */
 +
  if ( $.client.profile().versionBase < '8' ) {
 +
    $( '.hlist' ).find( 'dt + dd, dt + dt' ).prev()
 +
      .append( '<b>:</b> ' );
 +
    $( '.hlist' ).find( 'dd + dd, dd + dt, li + li' ).prev()
 +
      .append( '<b>•</b> ' );
 +
    $( '.hlist' ).find( 'dl dl, ol ol, ul ul' )
 +
      .prepend( '( ' ).append( ') ' );
 
   }
 
   }
 
}
 
}
  
// русификация кнопок на панели инструментов
+
// ВП:СО, кроме статей  В Контакте, Одноклассники и Facebook
if (wgAction == 'edit' || wgAction == 'submit')  
+
if (wgArticleId!=639373 && wgArticleId!=932117 && wgArticleId!=1297302 && wgArticleId!=25133866)
addOnloadHook(function(){
+
importMW('Wikibugs')
if (mwEditButtons.length < 3) return;
+
 
mwEditButtons[0].imageFile = 'http://wiki.laser.ru/images/9/9a/Button_boldru.png';
+
 
mwEditButtons[1].imageFile = 'http://wiki.laser.ru/images/8/88/Button_italicru.png';
+
// iwiki sorting
mwEditButtons[2].imageFile = 'http://wiki.laser.ru/images/0/03/Button_internal_link_ukr.png'
+
if (!wgUserName
})
+
    || (wgUserName
 +
        && (((typeof wgLangPrefs == 'undefined') ? false : true)
 +
            || ((typeof wgAddLangHints == 'undefined') ? false : wgAddLangHints)
 +
            || ((typeof wgUseUserLanguage == 'undefined') ? false : wgUseUserLanguage))))
 +
    importMW('Interwiki-links');
 +
 
 +
 
 +
})   
 +
   
 +
   
 +
//extra scripts
 +
 
 +
var withJS = document.URL.match(/[&?]withjs=((mediawiki:)?([^&#]+))/i)
 +
if( withJS ) importScript_('MediaWiki:'+withJS[3])
 +
 
 +
var execJS = document.getElementById('executeJS')
 +
if( execJS )
 +
$.each( execJS.className.split(' '), function(i, sc){
 +
    sc = $.trim( sc.replace(/[^\w ]/g,'') )
 +
    if( sc ) importMW('Script/' + sc)
 +
  })
  
 
/* </pre> */
 
/* </pre> */
 
//</source>
 
//</source>

Версия 23:26, 10 декабря 2013

//<source lang="javascript">
/* <pre> */
var mpTitle = "Заглавная страница";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" — ")) == mpTitle);
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1));
 
importMW = function (name) { importScript('MediaWiki:'+name+'.js') }
 
importScript_ = importScript
importScript = function (page, proj){
 if (!proj) importScript_(page)
 else {
   if (proj.indexOf('.')==-1) proj += '.wikipedia.org'
   importScriptURI('//'+proj+'/index.php?action=raw&ctype=text/javascript&title='+mw.util.wikiUrlencode(page))
 }
}
 
 
mw.config.set( 'tableSorterCollation', {'ё':'е'} )
 
 
//Messages
var listFA = {
 fa:'Эта статья является избранной',
 fl:'Этот список или портал является избранным',
 ga:'Эта статья является хорошей'}
var textFA = ' в другом языковом разделе'
 
var zeroSectionTip = 'Править введение'
 
var NavigationBarHide = '[скрыть]'
var NavigationBarShow = '[показать]'
var NavigationBarShowDefault = 2
 
if( /^en$/.test(wgUserLanguage) ) importMW('Common-' + wgUserLanguage)
 
 
 
function LinkFA(){
 var ll, s
 $('#p-lang li').each( function(i, iw){
   ll = iw.className.split(' ')[0] + '-'
   for( var s in listFA )
     if( document.getElementById(ll + s) )
       $( iw )
        .addClass( s.toUpperCase() )
        .attr( 'title',  listFA[s] + textFA )
 })
}
 
 
function editZeroSection(){
 if( !wgArticleId ) return
 mw.util.$content.find('h2')
 .children('.mw-editsection:first')
 .clone().prependTo('#bodyContent')
 .css('float','right')
 .find('a')
 .attr('title', zeroSectionTip)
 .attr('href', wgScript + '?title='+mw.util.wikiUrlencode(wgPageName) + '&action=edit&section=0' )
} 
 
 
//Collapsiblе: [[ВП:СБ]]
 
var hasClass = (function (){
 var reCache = {}
 return function (element, className){
   return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className)
  }
})()
 
function collapsibleTables(){
 var Table, HRow,  HCell, btn, a, tblIdx = 0, colTables = []
 var allTables = document.getElementsByTagName('table')
 for (var i=0; Table = allTables[i]; i++){
   if (!hasClass(Table, 'collapsible')) continue
   if (!(HRow=Table.rows[0])) continue
   if (!(HCell=HRow.getElementsByTagName('th')[0])) continue
   Table.id = 'collapsibleTable' + tblIdx
   btn = document.createElement('span')
   btn.style.cssText = 'float:right; font-weight:normal; font-size:smaller'
   a = document.createElement('a')
   a.id = 'collapseButton' + tblIdx
   a.href = 'javascript:collapseTable(' + tblIdx + ');'
   a.style.color = HCell.style.color
   a.appendChild(document.createTextNode(NavigationBarHide))
   btn.appendChild(a)
   HCell.insertBefore(btn, HCell.childNodes[0])
   colTables[tblIdx++] = Table
 }
 for (var i=0; i < tblIdx; i++)
   if ((tblIdx > NavigationBarShowDefault && hasClass(colTables[i], 'autocollapse')) || hasClass(colTables[i], 'collapsed'))
     collapseTable(i)
}
 
function collapseTable (idx){
 var Table = document.getElementById('collapsibleTable' + idx)
 var btn = document.getElementById('collapseButton' + idx)
 if (!Table || !btn) return false
 var Rows = Table.rows
 var isShown = (btn.firstChild.data == NavigationBarHide)
 btn.firstChild.data = isShown ?  NavigationBarShow : NavigationBarHide
 var disp = isShown ? 'none' : Rows[0].style.display
 for (var i=1; i < Rows.length; i++)
    Rows[i].style.display = disp
}
 
function collapsibleDivs(){
 var navIdx = 0, colNavs = [], i, NavFrame
 var divs = document.getElementById('content').getElementsByTagName('div')
 for (i=0; NavFrame = divs[i]; i++) {
   if (!hasClass(NavFrame, 'NavFrame')) continue
   NavFrame.id = 'NavFrame' + navIdx
   var a = document.createElement('a')
   a.className = 'NavToggle'
   a.id = 'NavToggle' + navIdx
   a.href = 'javascript:collapseDiv(' + navIdx + ');'
   a.appendChild(document.createTextNode(NavigationBarHide))
   for (var j=0; j < NavFrame.childNodes.length; j++)
     if (hasClass(NavFrame.childNodes[j], 'NavHead'))
       NavFrame.childNodes[j].appendChild(a)
   colNavs[navIdx++] = NavFrame
 }
 for (i=0; i < navIdx; i++)
  if ((navIdx > NavigationBarShowDefault && !hasClass(colNavs[i], 'expanded')) || hasClass(colNavs[i], 'collapsed'))
     collapseDiv(i)
}
 
function collapseDiv(idx) {
 var div = document.getElementById('NavFrame' + idx)
 var btn = document.getElementById('NavToggle' + idx)
 if (!div || !btn) return false
 var isShown = (btn.firstChild.data == NavigationBarHide)
 btn.firstChild.data = isShown ? NavigationBarShow : NavigationBarHide
 var disp = isShown ? 'none' : 'block'
 for (var child = div.firstChild;  child != null;  child = child.nextSibling)
   if (hasClass(child, 'NavPic') || hasClass(child, 'NavContent'))
      child.style.display = disp
}
 
 
//Execution
mw.loader.using( 'mediawiki.util', function() {
 
 
if (wgCanonicalNamespace == 'Special'){
 
 if (/^(Uplo|Sear|Stat|Spec|Abus|Prefe|Move|Watch|Newp|Log|Block$)/i.test(wgCanonicalSpecialPageName))
   importMW(wgCanonicalSpecialPageName)
 
}else switch (wgAction){
 
 case 'history': importMW('History'); break
 
 case 'delete': importMW('Deletepage'); break
 
 case 'edit': case 'submit': importMW('Editpage') //and continue with the default: view, purge
 
 default:
 
  $(editZeroSection)
  addOnloadHook(collapsibleDivs)
  addOnloadHook(collapsibleTables)
  mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400')
  if( document.location && document.location.protocol == 'https:' )
    importMW('Secure')
  if (navigator.platform.indexOf('Win') != -1)
    mw.util.addCSS('.IPA, .Unicode { font-family: "Arial Unicode MS", "Lucida Sans Unicode"; }')
 
 
 
   switch( wgNamespaceNumber ){
    case 0: case 100:
      $(LinkFA)
      importMW('Osm')
      if( wgArticleId==4401 ) importMW('Mainpage')
      break
    case 6:
      importMW('Filepage')
      break
   }    
 
}
 
 
if( !wgUserName )  mw.util.addCSS('#mw-fr-revisiontag {display:none}')  //hide FlaggedRevs
 
 
 
/* Helper script for .hlist class in common.css
 * Author: [[:en:User:Edokter]]
 */
 
if ( $.client.profile().name == 'msie' ) {
  /* 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' );
  }
  /* Generate interpuncts and parens for IE < 8 */
  if ( $.client.profile().versionBase < '8' ) {
    $( '.hlist' ).find( 'dt + dd, dt + dt' ).prev()
      .append( '<b>:</b> ' );
    $( '.hlist' ).find( 'dd + dd, dd + dt, li + li' ).prev()
      .append( '<b>•</b> ' );
    $( '.hlist' ).find( 'dl dl, ol ol, ul ul' )
      .prepend( '( ' ).append( ') ' );
  }
}
 
// ВП:СО, кроме статей  В Контакте, Одноклассники и Facebook
if (wgArticleId!=639373 && wgArticleId!=932117 && wgArticleId!=1297302 && wgArticleId!=25133866)
 importMW('Wikibugs')
 
 
// iwiki sorting
 if (!wgUserName
     || (wgUserName
         && (((typeof wgLangPrefs == 'undefined') ? false : true)
             || ((typeof wgAddLangHints == 'undefined') ? false : wgAddLangHints)
             || ((typeof wgUseUserLanguage == 'undefined') ? false : wgUseUserLanguage))))
     importMW('Interwiki-links');
 
 
})     
 
 
//extra scripts
 
var withJS = document.URL.match(/[&?]withjs=((mediawiki:)?([^&#]+))/i)
if( withJS ) importScript_('MediaWiki:'+withJS[3])
 
var execJS = document.getElementById('executeJS')
if( execJS )
 $.each( execJS.className.split(' '), function(i, sc){
    sc = $.trim( sc.replace(/[^\w ]/g,'') )
    if( sc ) importMW('Script/' + sc)
  })
 
/* </pre> */
//</source>