Parembugan MédhiaWiki:Common.js

Konten halaman tidak didukung dalam bahasa lain.
Saka Wikipédia Jawa, bauwarna mardika basa Jawa
var ScriptPrefix = '<script type="text/javascript" src="/w/index.php?title=';
var ScriptSuffix = '&action=raw&ctype=text/javascript&dontcountme=s"></script>';
var LoadExtraEditButtons = true;
document.write( ScriptPrefix + 'MediaWiki:ExtraEditButtons.js' + ScriptSuffix );

tambahan script kulit vector[besut sumber]

sing nduwe wenang nang kaca iki, iki ana script tak jupuk seka dhiskusi kaca utama kanggo ndandani tulisan tab Utama sing nggantung nang ndhuwur,

  if (skin == "vector") {
      document.getElementById('ca-nstab-main').firstChild.firstChild.innerHTML = wgMainPageTitle;
  }
  else {
      document.getElementById('ca-nstab-main').firstChild.innerHTML = wgMainPageTitle;
  }
Wis taklakoni pak. Takkira wis ora nggantung manèh. Meursault2004ngobrol 07:15, 24 Maret 2011 (UTC)
Tampilan sing bermasalah karo tulisan tab 'Utama' namung id:wiki karo jv:wiki, map-bms tampilan kaca utamane apik-apik wae, tapi ora ngangggo terjemahan Utama, nganggone 'Artikel' mirip karo en:wiki ne. Kemungkinan nek ditermahna cukup sak tembung wae ora masalah, misale dadi 'artikel' utawa 'halaman', aja nganggo 'halaman utama' utawa 'kaca utama' mungkin kedawan. Empu rembugan 03:03, 25 Maret 2011 (UTC)

Give search results even when page doesn't exist[besut sumber]

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[besut sumber]

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* pirembagan 18 Agustus 2014 20.27 (UTC)[wangsuli]

Suggested fix for Content Translation[besut sumber]

Hi,

I received a complaint about a malfunction in the ContentTranslation extension on this wiki.

The reason for the malfunction is that Common.js here uses the #bodyContent element, which is not used by ContentTranslation.

I suggest fixing this by checking that #bodyContent actually exists every time when you use it. I wrote a whole version of Common.js that fixes this at Panganggo:Amire80/suggestedCommon.js. Replacing your current Common.js with that version should fix this problem.

Please let me know if ContentTranslation still doesn't work after you do this.

Thanks! --Amir E. Aharoni rembugan 19 Agustus 2016 13.40 (UTC)[wangsuli]

Thank you @Amire80:! It's working now! Cahyo Ramadhani rembugan 19 Agustus 2016 14.11 (UTC)[wangsuli]
Great, thank you! --Amir E. Aharoni rembugan 19 Agustus 2016 14.16 (UTC)[wangsuli]