MediaWiki:Common.js: Redaktələr arasındakı fərq

Redaktənin izahı yoxdur
Teq: Geri qaytarıldı
Redaktənin izahı yoxdur
 
(2 redaktor tərəfindən edilmiş 10 dəyişiklik göstərilmir)
Sətir 8: Sətir 8:
} else {
} else {
if ( proj.indexOf( '.' ) === -1 ) {
if ( proj.indexOf( '.' ) === -1 ) {
proj += '.wikipedia.org';
proj += '.aze.wiki';
}
}
mw.loader.using( 'mediawiki.util' ).then( function () {
mw.loader.using( 'mediawiki.util' ).done( function () {
mw.loader.load( '//' + proj + '/w/index.php?title=' + mw.util.wikiUrlencode( page ) +
mw.loader.load( '//' + proj + '/w/index.php?title=' + mw.util.wikiUrlencode( page ) +
'&action=raw&ctype=text/javascript' );
'&action=raw&ctype=text/javascript' );
Sətir 29: Sətir 29:
}
}


// Switch language variants of messages (from zh)
function wgULS(latn,arab){
        //
        az=latn||arab;
        az=az;
        latn=latn;
        arab=arab;
        switch(mw.config.get('wgUserLanguage')){
                case "az": return ku;
                case "az-arab": return arab;
                case "az-latn": return latn;
                default: return "";
        }
}


/** Skript für Vorlage:Galerie */
/** Skript für Vorlage:Galerie */
Sətir 152: Sətir 166:
  });
  });
}
}
function editZeroSection(){
if( !mw.config.get('wgArticleId') ) return;
mw.util.$content.find('h2')
.children('.mw-editsection:first')
.clone().prependTo('#bodyContent')
.css('float','right')
.find('a')
.each(function(index) {
$( this ).attr('title', zeroSectionTip);
if ($( this ).attr('class') === "mw-editsection-visualeditor" ) {
$( this ).attr('href', mw.config.get('wgScript') + '?title='+mw.util.wikiUrlencode(mw.config.get('wgPageName')) + '&veaction=edit&vesection=0');
} else {
$( this ).attr('href', mw.config.get('wgScript') + '?title='+mw.util.wikiUrlencode(mw.config.get('wgPageName')) + '&action=edit&section=0');
}
});
}


var NavigationBarShowDefault;
var NavigationBarShowDefault;
Sətir 217: Sətir 250:
  * Dynamic Navigation Bars (experimental)
  * Dynamic Navigation Bars (experimental)
  *
  *
  * Description: See [[Wikipedia:NavFrame]].
  * Description: See [[Şəki Ensiklopediyası:NavFrame]].
  * Maintainers: UNMAINTAINED
  * Maintainers: UNMAINTAINED
  */
  */
Sətir 389: Sətir 422:
                         realTitleBanner.style.display = "none";
                         realTitleBanner.style.display = "none";
                 }
                 }
                 document.title = realTitleText + " - Wikipedia, the free encyclopedia";
                 document.title = realTitleText + " - Şəki Ensiklopediyası";
             }
             }
         }
         }
Sətir 486: Sətir 519:
}
}


mw.loader.using('mediawiki.util').then( function () {
mw.loader.using('mediawiki.util', function () {
$( hiddencat );
$( hiddencat );
});
});
Sətir 538: Sətir 571:
mw.loader.load('//en.wikipedia.org/w/index.php?title=Mediawiki:Wikimediaplayer.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=Mediawiki:Wikimediaplayer.js&action=raw&ctype=text/javascript');


// Choice of multiple search engines
// Autor: Jakob Voss, Guillaume (tret de de:MediaWiki:SpezialSuche.js)
// Version: 0.3.8
// Published as Public Domain
// Map of search engines and some OpenSearch-based fields
var searchEngines = {
  mediawiki: {
    ShortName: "Şəki Ensiklopediyası",
    Template: "/wiki/index.php?search={searchTerms}"
  },
  globalwpsearch: {
    ShortName: "Vikipediya",
    Template: "https://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=120&search={searchTerms}"
  },
  google: {
    ShortName: "Google",
    Template: "https://www.google.cat/search?as_sitesearch=az.wikipedia.org&hl={language}&q={searchTerms}"
  },
  wikiwix: {
    ShortName: "Wikiwix",
    Template: "https://www.wikiwix.com/index.php?action={searchTerms}&lang=az"
  },
  yahoo: {
    ShortName: "Yahoo!",
    Template: "https://search.yahoo.com/search?p={searchTerms}&vs=www.aze.wiki"
  },
  wlive: {
    ShortName: "Windows Live",
    Template: "https://search.live.com/results.aspx?q={searchTerms}&q1=site:https://www.aze.wiki"
  }
};
function externalSearchEngines() {
  if (typeof SpecialSearchEnhanced2Disabled != 'undefined') return;
  var mainNode = document.getElementById("powersearch");
  if (!mainNode) mainNode = document.getElementById("search");
  if (!mainNode) return;
  var beforeNode = document.getElementById("mw-search-top-table");
  if (!beforeNode) return;
  beforeNode = beforeNode.nextSibling;
  if (!beforeNode) return;
  var firstEngine = "mediawiki";
  var choices = document.createElement("div");
  choices.setAttribute("id","searchengineChoices");
  choices.style.textAlign = "center";
  var lsearchbox = document.getElementById("searchText");
  var initValue = lsearchbox.value;
  var space = "";
  for (var id in searchEngines) {
    var engine = searchEngines[id];
if(engine.ShortName)
  {
    if (space) choices.appendChild(space);
    space = document.createTextNode(" ");
    var attr = {
      type: "radio",
      name: "searchengineselect",
      value: id,
      onFocus: "changeSearchEngine(this.value)",
      id: "searchengineRadio-"+id
    };
    var html = "<input";
    for (var a in attr) html += " " + a + "='" + attr[a] + "'";
    html += " />";
    var span = document.createElement("span");
    span.innerHTML = html;
    choices.appendChild( span );
    var label
    if (engine.Template.indexOf('http') == 0) {
      label = document.createElement("a");
      label.href = engine.Template.replace("{searchTerms}", initValue).replace("{language}", "fr");
    } else {
      label = document.createElement("label");
    }
 
    label.appendChild( document.createTextNode( engine.ShortName ) );
    choices.appendChild( label );
  }
}
  mainNode.insertBefore(choices, beforeNode);
  var input = document.createElement("input");
  input.id = "searchengineextraparam";
  input.type = "hidden";
  mainNode.insertBefore(input, beforeNode);
  changeSearchEngine(firstEngine, initValue);
}
function changeSearchEngine(selectedId, searchTerms) {
  var currentId = document.getElementById("searchengineChoices").currentChoice;
  if (selectedId == currentId) return;
  document.getElementById("searchengineChoices").currentChoice = selectedId;
  var radio = document.getElementById('searchengineRadio-'  + selectedId);
  radio.checked = "checked";
  var engine = searchEngines[selectedId];
  var p = engine.Template.indexOf('?');
  var params = engine.Template.substr(p+1);
  var form;
  if (document.forms["search"]) {
    form = document.forms["search"];
  } else {
    form = document.getElementById("powersearch");
  }
  form.setAttribute("action", engine.Template.substr(0,p));
  var l = ("" + params).split("&");
  for (var idx = 0;idx < l.length;idx++) {
    var p = l[idx].split("=");
    var pValue = p[1];
    if (pValue == "{language}") {
    } else if (pValue == "{searchTerms}") {
      var input;
      input = document.getElementById("searchText");
      input.name = p[0];
    } else {
      var input = document.getElementById("searchengineextraparam");
      input.name = p[0];
      input.value = pValue;
    }
  }
}
if (mw.config.get('wgCanonicalSpecialPageName') == "Search") {
  $(externalSearchEngines);
}
if (mw.config.get('wgAction') == "edit" || mw.config.get('wgAction') == "submit") {
if (mw.config.get('wgAction') == "edit" || mw.config.get('wgAction') == "submit") {
   importScript('MediaWiki:Editpage.js');
   importScript('MediaWiki:Editpage.js');
Sətir 624: Sətir 804:
  * @mənbə: www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL
  * @mənbə: www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL
  */
  */
mw.loader.using('mediawiki.util').then(() => {
(function() {
var extraCSS = mw.util.getParamValue( 'withCSS' ),
    var extraJS = mw.util.getParamValue('withJS');
extraJS = mw.util.getParamValue( 'withJS' );
    if (extraJS) {
 
        if (extraJS.match(/^Media[VW]iki:[^&<>=%#]*\.js$/)) {
if ( extraCSS ) {
            importScript(extraJS);
if ( extraCSS.match( /^Media[VW]iki:[^&<>=%#]*\.css$/ ) ) {
        } else {
mw.loader.load( '/w/index.php?title=' + extraCSS + '&action=raw&ctype=text/css', 'text/css' );
            mw.notify( 'Yalnız MediaViki ad fəzasındakı səhifələrə icazə verilir.', { title: 'Yanlış "withJS" dəyəri' } );
} else {
        }
mw.notify( 'Yalnız MediaViki ad fəzasındakı səhifələrə icazə verilir.', { title: 'Yanlış "withCSS" dəyəri' } );
    }
}
}());
}
 
if ( extraJS ) {
if ( extraJS.match( /^Media[VW]iki:[^&<>=%#]*\.js$/ ) ) {
mw.loader.load( '/w/index.php?title=' + extraJS + '&action=raw&ctype=text/javascript' );
} else {
mw.notify( 'Yalnız MediaViki ad fəzasındakı səhifələrə icazə verilir.', { title: 'Yanlış "withJS" dəyəri' } );
}
}
});


/**
/**
Sətir 667: Sətir 837:
$( function () {
$( function () {
if ( document.getElementById( 'disambigbox' ) ) {
if ( document.getElementById( 'disambigbox' ) ) {
addEditIntro( 'Şablon:Disambig_editintro' );
addEditIntro( 'Template:Disambig_editintro' );
}
}
} );
} );
Sətir 677: Sətir 847:
}
}
if ( $.inArray( 'Yaşayan insanlar', cats ) !== -1 || $.inArray( 'Yaşayan uzunömürlülər', cats ) !== -1 ) {
if ( $.inArray( 'Yaşayan insanlar', cats ) !== -1 || $.inArray( 'Yaşayan uzunömürlülər', cats ) !== -1 ) {
addEditIntro( 'Şablon:BLP_editintro' );
addEditIntro( 'Template:BLP_editintro' );
}
}
} );
} );
Sətir 684: Sətir 854:
// Web2Cit
// Web2Cit
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Diegodlh/Web2Cit/script.js&action=raw&ctype=text/javascript' ); // Backlink: [[:en:User:Diegodlh/Web2Cit/script.js]]
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Diegodlh/Web2Cit/script.js&action=raw&ctype=text/javascript' ); // Backlink: [[:en:User:Diegodlh/Web2Cit/script.js]]
// Naviqasiya panelində "İnzibatçıların iş bölgüsü" başlığının yerləşdirilməsi
importScript("MediaWiki:SysopDuties.js");
$(document).ready(function() {
    mw.loader.load('//ilk10.az/counter/count3.php?color=maviilk&id=38120');
});