MediaWiki diskusija:Common.js: Rozdźěl mjez wersijomaj

Seiteninhalte werden in anderen Sprachen nicht unterstützt.
Z Wikipedije, swobodneje encyklopedije
Inhalt gelöscht Inhalt hinzugefügt
Arlolra (diskusija | přinoški)
Rjadka 64: Rjadka 64:
Thank you very much! --[[Wužiwar:Amire80|Amir E. Aharoni]] ([[Diskusija z wužiwarjom:Amire80|diskusija]]) 18. junija 2015, 18:06 (CEST)
Thank you very much! --[[Wužiwar:Amire80|Amir E. Aharoni]] ([[Diskusija z wužiwarjom:Amire80|diskusija]]) 18. junija 2015, 18:06 (CEST)
:{{wotmołwa|Amire80}}{{sčinjene}} Mi ĵus korektis tiun fuŝon. / Runje porjedźich tón zmylk. :-) --[[Wužiwar:Tlustulimu|Tlustulimu]] ([[Diskusija z wužiwarjom:Tlustulimu|diskusija]]) 18. junija 2015, 19:06 (CEST)
:{{wotmołwa|Amire80}}{{sčinjene}} Mi ĵus korektis tiun fuŝon. / Runje porjedźich tón zmylk. :-) --[[Wužiwar:Tlustulimu|Tlustulimu]] ([[Diskusija z wužiwarjom:Tlustulimu|diskusija]]) 18. junija 2015, 19:06 (CEST)

== 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, [[Wužiwar:Arlolra|Arlolra]] ([[Diskusija z wužiwarjom:Arlolra|diskusija]]) 31. januara 2023, 21:20 (CET)

Wersija wot 31. januara 2023, 22:20

Give search results even when page doesn't exist

Screenshot of the Earth test search, with this script adding links to Wikidata, Reasonator, Commons, and Wikipedia.

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");
}
--[[m:User:Nemo_bis|Nemo]] ~~~~~ ([[w:en:MediaWiki talk:Wdsearch.js|comments, translations and last instructions]])
</div>
<!-- EdwardsBot 0661 -->

Announced JavaScript change for badges implementation

Hi! I want to let you know that in near future badges will be deployed on Wikidata and the Wikipedias. They help us with displaying the good and featured article icons next to the sitelinks and will replace the javascript hack which is used at the moment together with the Link GA and Link FA templates. To avoid an overlap where the current system and the new feature conflict, I will add a minor fix to your Common.js which adds the class names to the interwiki links. This is part of my task as a global edit interface editor for the Wikidata team. Thanks, Bene* (diskusija) 11. awgusta 2014, 21:16 (CEST)[wotmołwić]

ContentTranslation

Hi,

We, the Language Engineering team, are trying to test the ContentTranslation beta feature here, and it's failing because of an issue in this script. The '#content' element doesn't exist on Special:ContentTranslation, so it's irrelevant.

We'd be very thankful if you could please change the collapsibleDivs function (line 288) to the following code:

function collapsibleDivs(){
	var navIdx = 0, colNavs = [], i, NavFrame
	var content = document.getElementById('content')

	if ( !content ) {
		return
	}

	var divs = 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))
		// Find the NavHead and attach the toggle link (Must be this complicated because Moz's firstChild handling is borked)
		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)
}

(Tagging relevant admins: Tlustulimu, Tchoř, J budissin.)

Thank you very much! --Amir E. Aharoni (diskusija) 18. junija 2015, 18:06 (CEST)[wotmołwić]

@Amire80: sčinjene Mi ĵus korektis tiun fuŝon. / Runje porjedźich tón zmylk. :-) --Tlustulimu (diskusija) 18. junija 2015, 19:06 (CEST)[wotmołwić]

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, Arlolra (diskusija) 31. januara 2023, 21:20 (CET)[wotmołwić]

Z Wikipedije, swobodneje encyklopedije