MediaWiki Diskussioun:Common.js

Inhalter vun der Säit ginn an anere Sproochen net ënnerstëtzt.
Vu Wikipedia

Give search results even when page doesn't exist[Quelltext änneren]

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");
}

--Nemo 06:12, 13. Dez. 2013 (UTC) (comments, translations and last instructions)[äntweren]

A wann ech wëll wësse wéi eng Säite mär iwwerhaapt hunn, fir ze wësse wat eis nach feelt a wou ech nach schaffe muss, da ginn déi Resultater ais anere Sproochewikien ënner eis drënnergemëscht an et ass keng kloer Ausso méi iwwer eis bestehend Artikel méi ze maachen? Oder ginn déi zwou Lëschte vu Sichresultater kloer vunenee getrennt? (Commentaire vum Otets)

Dat ass scho kloer getrennt ech hunn dës Funktioun an de leschten Deeg op it-wikipedia gesinn an dat war schonn nëtzlech well ech dat konnt gesinn a watfirenger anerer Sprooch et en Artikel mat deem Titel ginn huet. Dofir setzen ech et elo emol dran.
Wann et net gutt ass ass et och nees séier erausgeholl. Wéi ass eng vun den Devisen an der däitscher Wiki 'Sei mutig!' Robby (Diskussioun) 10:12, 12. Dez. 2013 (UTC)[äntweren]
Ech fannen dat am Prinzip och eng gudd Saach. Et schéngt awer bei eis nach net richteg ze funktionéieren oder kënnt do nach eppes?--MMFE (Diskussioun) 10:55, 12. Dez. 2013 (UTC)[äntweren]
Jo, hunn et elo och op enger anerer Wiki an Aktioun gesinn. Et muss een extra op e Link klicke fir d'Resultater op enger Wiki vu sengem Choix ze gesinn. Also tiptop. Hei soe mer dofir: "Hief Courage!" ;-)) --Otets 16:05, 12. Dez. 2013 (UTC)[äntweren]
Merci Robby, elo funktionéiert et richteg. --MMFE (Diskussioun) 22:04, 12. Dez. 2013 (UTC)[äntweren]

Nice to see it enabled already (and sorry for the wrong pre above). Looks great on Special:Search, while I'm not sure it's working with noarticletext, even though it's default: probably the script needs some tweak, I'll ask. --Nemo bis (Diskussioun) 06:12, 13. Dez. 2013 (UTC)[äntweren]

Announced JavaScript change for badges implementation[Quelltext änneren]

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* (Diskussioun) 19:22, 11. Aug. 2014 (UTC)[äntweren]