MediaViki müzakirəsi:Common.js: Redaktələr arasındakı fərq
k Fixing the code |
→Prepare for T314318: yeni bölmə |
||
Sətir 55: | Sətir 55: | ||
</div> |
</div> |
||
<!-- EdwardsBot 0661 --> |
<!-- EdwardsBot 0661 --> |
||
== Prepare for T314318 == |
|||
Please make changes like the following, |
|||
https://ca.wikipedia.org/wiki/Especial:ComparePages?page1=MediaWiki%3ACommon.js&rev1=24309161&page2=Usuari%3AArlolra%2Fsandbox%2FMediaWiki%3ACommon.js&rev2=31054319&action=&unhide= |
|||
https://ca.wikipedia.org/wiki/Especial:ComparePages?page1=MediaWiki%3ACommon.js&rev1=31055727&page2=Usuari%3AArlolra%2Fsandbox%2FMediaWiki%3ACommon.js&rev2=31058458&action=&unhide= |
|||
For more information, see [[mw:Parsoid/Parser_Unification/Media_structure/FAQ]] |
|||
Thanks, [[İstifadəçi:Arlolra|Arlolra]] ([[İstifadəçi müzakirəsi:Arlolra|müzakirə]]) 18:18, 31 yanvar 2023 (UTC) |
18:18, 31 yanvar 2023 tarixinə olan versiya
Vüqar, mümkünsə bu mətni məqaləyə yerləşdirərdiniz.
** * Add arrows on sidebar to compare current page to interlanguage link'd page * by [[user:Pathoschild]], based on older script by unknown */ function BilingualLink() { if ( document.getElementById('p-lang') ) { // get list of links var biboxes = document.getElementById('p-lang').getElementsByTagName('li'); // iterate over links for(var i=0; i<biboxes.length; i++) { // get link var bilink = biboxes[i].getElementsByTagName('a')[0]; // create new URL var bilang = bilink.getAttribute('href').match(/\/\/([^\.]+)\.wikisource/)[1]; var bilanglink = mw.util.wikiGetlink( wgPageName ) + '?match=' + bilang; // create link var bianchor = document.createElement('a'); bianchor.setAttribute('href',bilanglink); bianchor.setAttribute('title','Bu səhifənin '+bilang+' versiyası ilə tutuşdurulması.'); bianchor.appendChild(document.createTextNode(' ⇔')); // add link biboxes[i].appendChild(bianchor); } } } addOnloadHook(BilingualLink);
Belə düz oldu? --N KOziMüzakirə 12:33, 7 mart 2012 (UTC)
<pre> və </pre> teqlərini götürün. Vago (talk) 12:50, 7 mart 2012 (UTC)
Give search results even when page doesn't exist
Hello, I propose to enable the tool created by Magnus Manske (creator of MediaWiki) to provide results from other languages and Commons (via Wikidata) when a page doesn't exist here: links are added to Special:Search and noarticletext. This helps to encourage translation and to make readers use your wiki more, because they can be sure to find something even if it's not local (rather than searching directly on the biggest wiki). The Italian and Polish Wikipedias, among others already enabled it by default.
Examples: [1] [2] [3]. More information: Magnus blog.
How to: just add the following line at the end of Common.js.
// Results from Wikidata // [[File:Wdsearch_script_screenshot.png]] if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' || ( mw.config.get( 'wgArticleId' ) === 0 && mw.config.get( 'wgCanonicalSpecialPageName' ) === false ) ) { importScriptURI("//en.wikipedia.org/w/index.php?title=MediaWiki:Wdsearch.js&action=raw&ctype=text/javascript"); }
--Nemo 11:03, 12 dekabr 2013 (UTC) (comments, translations and last instructions)
Prepare for T314318
Please make changes like the following,
For more information, see mw:Parsoid/Parser_Unification/Media_structure/FAQ
Thanks, Arlolra (müzakirə) 18:18, 31 yanvar 2023 (UTC)