Sumber: Lihat artikel asli di Wikipedia
Ada beberapa script tambahan yang bisa dinonaktifkan jika koneksi Internet Anda lambat atau Anda tidak menyukai tampilan itu.
Atur variabel yang Anda inginkan tersebut di sub halaman switches.js di halaman pengguna Anda.
Jika Anda menyalin kode berikut ini ke switch.js, keenam fitur di atas akan dinonaktifkan dan mempercepat munculnya halaman.
LoadInterProject = false; LoadLinkFA = false; LoadNavFrame = false; load_edittools = false; LoadExtraPortlet = false; LoadStripe = false;
/** Collapsible tables *********************************************************
*
* Description: Allows tables to be collapsed, showing only the header. See
* [[Wikipedia:NavFrame]].
* Maintainers: [[User:R. Koot]]
*/
var autoCollapse = 2;
var collapseCaption = "hide";
var expandCaption = "show";
function collapseTable( tableIndex )
{
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
if ( !Table || !Button ) {
return false;
}
var Rows = Table.rows;
if ( Button.firstChild.data == collapseCaption ) {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = "none";
}
Button.firstChild.data = expandCaption;
} else {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = Rows[0].style.display;
}
Button.firstChild.data = collapseCaption;
}
}
function createCollapseButtons()
{
var tableIndex = 0;
var NavigationBoxes = new Object();
var Tables = document.getElementsByTagName( "table" );
for ( var i = 0; i < Tables.length; i++ ) {
if ( hasClass( Tables[i], "collapsible" ) ) {
/* only add button and increment count if there is a header row to work with */
var HeaderRow = Tables[i].getElementsByTagName( "tr" )[0];
if (!HeaderRow) continue;
var Header = HeaderRow.getElementsByTagName( "th" )[0];
if (!Header) continue;
NavigationBoxes[ tableIndex ] = Tables[i];
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
var Button = document.createElement( "span" );
var ButtonLink = document.createElement( "a" );
var ButtonText = document.createTextNode( collapseCaption );
Button.style.styleFloat = "right";
Button.style.cssFloat = "right";
Button.style.fontWeight = "normal";
Button.style.textAlign = "right";
Button.style.width = "6em";
ButtonLink.style.color = Header.style.color;
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tableIndex + ");" );
ButtonLink.appendChild( ButtonText );
Button.appendChild( document.createTextNode( "[" ) );
Button.appendChild( ButtonLink );
Button.appendChild( document.createTextNode( "]" ) );
Header.insertBefore( Button, Header.childNodes[0] );
tableIndex++;
}
}
for ( var i = 0; i < tableIndex; i++ ) {
if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex >= autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) {
collapseTable( i );
}
}
}
addOnloadHook( createCollapseButtons );
bennylin (-_-)V 12:10, 3 Desember 2007 (UTC)
Tidak bisa ya? Hmm.... (-_-)V bennylin 404 09:29, 12 Desember 2007 (UTC)
var autoCollapse = 2;
var collapseCaption = "hide";
var expandCaption = "show";
function collapseTable( tableIndex ){
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
if ( !Table || !Button ) {
return false;
}
var Rows = Table.rows;
if ( Button.firstChild.data == collapseCaption ) {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = "none";
}
Button.firstChild.data = expandCaption;
} else {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = Rows[0].style.display;
}
Button.firstChild.data = collapseCaption;
}
}
function createCollapseButtons(){
var tableIndex = 0;
var NavigationBoxes = new Object();
var Tables = document.getElementsByTagName( "table" );
for ( var i = 0; i < Tables.length; i++ ) {
if ( hasClass( Tables[i], "collapsible" ) ) {
/* only add button and increment count if there is a header row to work with */
var HeaderRow = Tables[i].getElementsByTagName( "tr" )[0];
if (!HeaderRow) continue;
var Header = HeaderRow.getElementsByTagName( "th" )[0];
if (!Header) continue;
NavigationBoxes[ tableIndex ] = Tables[i];
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
var Button = document.createElement( "span" );
var ButtonLink = document.createElement( "a" );
var ButtonText = document.createTextNode( collapseCaption );
Button.className = "collapseButton"; //Styles are declared in Common.css
ButtonLink.style.color = Header.style.color;
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
ButtonLink.setAttribute( "href", "#" );
addHandler( ButtonLink, "click", new Function( "evt", "collapseTable(" + tableIndex + " ); return killEvt( evt );") );
ButtonLink.appendChild( ButtonText );
Button.appendChild( document.createTextNode( "[" ) );
Button.appendChild( ButtonLink );
Button.appendChild( document.createTextNode( "]" ) );
Header.insertBefore( Button, Header.childNodes[0] );
tableIndex++;
}
}
for ( var i = 0; i < tableIndex; i++ ) {
if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex >= autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) {
collapseTable( i );
}
else if ( hasClass( NavigationBoxes[i], "innercollapse" ) ) {
var element = NavigationBoxes[i];
while (element = element.parentNode) {
if ( hasClass( element, "outercollapse" ) ) {
collapseTable ( i );
break;
}
}
}
}
}
$( createCollapseButtons );
Terima kasih
Kok pranala "Subhalaman" yang menurut saya sangat berguna dihapus ya, bung Ivan? (-_-)V bennylin 404 08:59, 29 April 2008 (UTC)
addCustomEditButton( "3/3b/Button_template_alt.png", "Catatan kaki", "\n== Catatan kaki ==\n\n" + "Templat:" + "reflist" + "" + "\n", "", "" );
ada yang berkeberatan jka kata "Catatan kaki" diganti menjadi "Referensi"?
✒ Bennylin 10:21, 19 November 2009 (UTC)
Beberapa tombol baru telah ditambahkan. Silakan utarakan di sini usulan tombol yang perlu ditambahkan/dibuang, atau kalau urutannya ingin diubah.
✒ bennylin 10:47, 27 Januari 2010 (UTC)
Tambahin juga donk yang bersumber pada ini ==> http://tolololpedia.wikia.com/wiki/MediaWiki:Common.js
function mainpg() {
if ((isMainPage || /[\/=:]Halaman_Utama/.test(document.location)) && document.getElementById('ca-nstab-main')) {
document.getElementById('ca-nstab-main').firstChild.innerHTML = '<span>Utama<\/span>';
}
}
addOnloadHook(mainpg);

Kode di atas merusak tampilan tab vector, baik di WBI maupun situs lain yang mengimpor kode WBI (seperti id.wikisource). Mohon kodenya digantu atau dihapus saja, karena hanya hiasan saja. ✒ вёӣйүӀіп 13:48, 22 Juni 2011 (UTC) (via Meta)
function mainpg() {
if ((isMainPage || /[\/=:]Halaman_Utama/.test(document.location)) && document.getElementById('ca-nstab-main')) {
document.getElementById('ca-nstab-main').firstChild.innerHTML = '<span><a>Utama<\/a><\/span>';
}
}
addOnloadHook(mainpg);
Kℇℵ℟ℑℭK 6 Februari 2012 14.32 (UTC)Sebaiknya menggunakan kode di bawah ini sebab dalam Perubahan terbaru (dalam kulit Vector), ukuran font interproyek terlihat lebih besar. Salam. Kℇℵ℟ℑℭK 30 Maret 2012 11.42 (UTC)
/**
== InterProject ==
InterProject, link di menu samping untuk proyek lain.
*/
mw.util.addCSS('#interProyek {display: none; speak: none;} #p-tb .pBody {padding-right: 0;}');
function iProject() {
if (document.getElementById("interProyek")) {
var iProject = document.getElementById("interProyek").innerHTML;
var interProject = document.createElement("div");
interProject.style.marginTop = "0.7em";
interProject.style.backgroundImage="url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAA"+
"ABCAMAAAA7MLYKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5"+
"ccllPAAAAEtQTFRF29vb2tra4ODg6urq5OTk4uLi6+vr7e3t7Ozs8PDw5+"+
"fn4+Pj4eHh3d3d39/f6Ojo5eXl6enp8fHx8/Pz8vLy7+/v3Nzc2dnZ2NjY"+
"nErj7QAAAD1JREFUeNq0wQUBACAMALDj7hf6JyUFGxzEnYhC9GaNPG1xVf"+
"fGDErk/iCigLl1XV2xM49lfAxEaSM+AQYA9HMKuv4liFQAAAAASUVORK5C"+
"YII=\")";
interProject.style.backgroundPosition="left top";
interProject.style.backgroundRepeat="no-repeat";
interProject.innerHTML = '<h5>Proyek lain<\/h5><div class="pBody body">'+iProject+'<\/div>';
document.getElementById("p-tb").appendChild(interProject);
}
}
addOnloadHook(iProject);
/* */
Dikarenakan Soxred93 sudah pensiun dari Wikipedia, alat penghitung suntingan bisa ditemukan di []. Jadi, ada baiknya jika kode
function addEditcountPortlet() {
if ( document.getElementById("t-contributions") ) {
var sServer = 'idwiki';
switch ( wgServer ) {
case 'http://id.wikibooks.org':
sServer = 'idwikibooks';
break;
case 'http://id.wiktionary.org':
sServer = 'idwiktionary';
break;
case 'http://id.wikiquote.org':
sServer = 'idwikiquote';
break;
case 'http://id.wikisource.org':
sServer = 'idwikisource';
break;
}
var sText = 'Statistik pengguna';
var sLink = 'https://toolserver.org/~soxred93/count/index.php?&lang=id&wiki=wikipedia&uselang=id' +
'&name=' + wgTitle;
addPortletLink( 'p-tb', sLink, sText, 't-editcount',
'Jumlah suntingan pengguna', null, document.getElementById( 't-contributions' ).nextSibling );
}
}
addOnloadHook( addEditcountPortlet );
diganti menjadi
function addEditcountPortlet() {
if ( document.getElementById("t-contributions") ) {
var sServer = 'wikipedia';
switch ( wgServer ) {
case '//id.wikibooks.org':
sServer = 'wikibooks';
break;
case '//id.wiktionary.org':
sServer = 'wiktionary';
break;
case '//id.wikiquote.org':
sServer = 'wikiquote';
break;
case '//id.wikisource.org':
sServer = 'wikisource';
break;
}
var sText = 'Statistik pengguna';
var sLink = 'https://toolserver.org/~tparis/pcount/index.php?&lang=id&uselang=id' +
'&wiki=' + sServer +
'&name=' + wgTitle;
addPortletLink( 'p-tb', sLink, sText, 't-editcount',
'Jumlah suntingan pengguna', null, document.getElementById( 't-contributions' ).nextSibling );
}
}
addOnloadHook( addEditcountPortlet );

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
// [[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 19 Desember 2013 08.41 (UTC) (comments, translations and last instructions)
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* (bicara) 18 Agustus 2014 20.26 (UTC)
Hi,
This page uses the hookEvent function. It has been deprecated since MediaWiki 1.17 (2011), and it's not supposed to do anything, or used in any code.
Now its use here causes the ContentTranslation extension, which is being deplo[y]ed [t]o this wiki, to work in a buggy way.
Can the local administrators please remove it?
Thank you! --Amir E. Aharoni (bicara) 18 Januari 2015 00.32 (UTC)
Could the following code be removed?
// CharSubset selection
function chooseCharSubset(s) {
var specialchars = document.getElementById('specialchars');
if (specialchars) {
var l = specialchars.getElementsByTagName('p'), i;
for (i = 0; i < l.length; i++) {
l[i].style.display = (i === s) ? 'inline' : 'none';
// l[i].style.visibility = i == s ? 'visible' : 'hidden';
}
}
}
$(chooseCharSubset);
// Menu insertion
function addCharSubsetMenu() {
var specialchars = document.getElementById('specialchars');
if (specialchars) {
var menu = "<select style=\"display:inline\" onChange=\"chooseCharSubset(selectedIndex)\">";
menu += "<option>Standar+Templat</option>";
menu += "<option>IPA</option>";
menu += "<option>Latin</option>";
menu += "<option>Jawa+Jawa Kuna</option>";
menu += "<option>Pinyin+Romaji</option>";
menu += "<option>Arab</option>";
menu += "<option>Ibrani</option>";
menu += "<option>Kiril</option>";
menu += "<option>Yunani</option>";
menu += "<option>Devanāgarī</option>";
menu += "<option>Yiddish</option>";
menu += "</select>";
specialchars.innerHTML = menu + specialchars.innerHTML;
// Standard-CharSubset
chooseCharSubset(0);
}
}
$(addCharSubsetMenu);
It hasn't worked correctly for many years (Since MediaWiki 1.17 the drop down box probably didn't work except on the default option). More recently it broke even with the default option. Since it has been broken for many years, I assume nobody really cares about it, and it should probably be removed. If people really do care, I can tell you how to fix it, if you want. (Ping User:Ezagren ). Bawolff (bicara) 11 Juni 2016 22.55 (UTC)
@Kenrick95: Bagian deskripsi di Warung kopi (bantuan) sepertinya sering disalahgunakan untuk bertanya, atau disunting untuk uji coba, menurut saya lebih baik kalau fungsi hide_edit_description diubah saja menjadi "sysop". --Hidayatsrf (bicara) 14 Februari 2017 03.51 (UTC)
hide_edit_description gagal menyembunyikan tombol sunting entah karena apa. Jadi, untuk saat ini, dukunglah agar phab:T113902 diimplementasi. ·· Kℇℵ℟ℑℭK 14 Februari 2017 05.33 (UTC)