مدیاویکی گپ:Common.js

Page contents not supported in other languages.
ویکی‌پدیا، آزادِ دانشنومه، جه

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: [۱] [۲] [۳]. More information: Magnus blog.
How to: just add the following line at the end of Common.js.

// Results from Wikidata
// 
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 ‏۳۱ ژانویه ۲۰۲۳، ساعت ۲۰:۳۴ (UTC) (comments, translations and last instructions)[جواب]

Prepare for T314318[دچی‌ین]

Please make a change like the following, https://it.wikipedia.org/w/index.php?title=MediaWiki%3ACommon.js&type=revision&diff=130157033&oldid=127743689 For more information, see mw:Parsoid/Parser_Unification/Media_structure/FAQ Thanks, Arlolra (گپ) ‏۳۱ ژانویه ۲۰۲۳، ساعت ۲۰:۳۴ (UTC) :Done in Special:Diff/169197 ABreault (WMF) (گپ) ‏۲۳ فوریه ۲۰۲۳، ساعت ۲۲:۰۷ (UTC)[جواب]