Jump to content

MediaWiki бєсѣда:Common.js

Page contents not supported in other languages.
Википєдїѩ · отврьстꙑ єнкѷклопєдїѩ · страница

Note that de:wikt:MediaWiki:If-search.js has been updated: Important fix for an upcoming DOM change, plus some optimizations! Please update your code or consider just importing the script instead, like described at de:wikt:MediaWiki:If-search.js/import. --- Best regards, Melancholie 04:18, ма́ртїꙗ 4 числа, 2009 (UTC)

Now that you are importing the script, you can even remove the old code somewhat above, by the way. --- Best regards, Melancholie 06:13, ма́ртїꙗ 26 числа, 2009 (UTC)

I've temporarily removed the last part of common.js, because it caused the edit page to totally disappear while trying to edit a page on this wiki, while all the time a message in the statusbar appears with the text "Read de.wiktionary.org". This happens under XP/FF 3.6.13. The same has occured earlier on s:fr or b:fr (ask DarkoNeko, he fixed it there). This problem seems to be connected, at least in time, with the MW 1.17 implementation: earlier it did not occur. Someone may want to look into this. I will send Krinkle an email about this. Wutsje 17:51, фєвроуа́рїꙗ 28 числа, 2011 (UTC)

Using document.write was the problem. This would have most likely failed in some browsers before the 1.17 upgrade as well. document.write is evil and shouldn't be used in any user-side scripting. I've migrated this and other parts of the script to replace calls to deprecatd and/or removed functionality with their successors. Krinkle 21:49, фєвроуа́рїꙗ 28 числа, 2011 (UTC)
Thanks for fixing this! Wutsje 21:54, ма́ртїꙗ 2 числа, 2011 (UTC)

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* (бєсѣда) 20:25, аѷгоуста 18 числа, 2014 (UTC)[reply]

OSZAR »