نقاش ميدياويكى:Common.js

محتويات الصفحة غير مدعومة بلغات أخرى.
من ويكيبيديا، الموسوعه الحره

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

--Nemo 10:58، 12 ديسمبر 2013 (يو تى سى) (comments, translations and last instructions)[ردّ]

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* (مناقشه) 17:36، 11 اغسطس 2014 (يو تى سى)[ردّ]

Mobile link redirects to English Wikipedia[تعديل]

Please change line 451 from

link.href = 'http://en.m.wikipedia.org/wiki/' + pageLink;

to

link.href = 'http://arz.m.wikipedia.org/wiki/' + pageLink;

As it is now, when someone clicks on the banner link, is redirected to the English Wikipedia (which won't have an article with the same title as here). The text on lines 449 ("View this page on ") and 452 ("Wikipedia's mobile site") could be translated as well!
Capmo (مناقشه) 01:07، 14 مايو 2021 (يو تى سى)[ردّ]