Pembicaraan MediaWiki:Common.js/Arsip

message: Ada beberapa script tambahan yang bisa dinonaktifkan jika koneksi Internet Anda lambat atau Anda tidak menyukai tampilan itu.
* MediaWiki:Edittools.js; menampilkan peralatan bantuan suntingan yang lebih banyak di bagian bawah kotak suntingan. Dimatikan dengan load_edittools = false
* MediaWiki:ExtraPortlet.js; menampilkan kotak "peralatan tambahan" di menu samping kiri layar, di bawah "kotak peralatan". Dimatikan dengan LoadExtraPortlet = false
* MediaWiki:LinkFA.js; menampilkan tanda bintang untuk artikel dalam bahasa lain yang dinilai bagus (jika ada). Lihat Wikipedia:LinkFA. Dimatikan dengan LoadLinkFA = false
* MediaWiki:InterProject.js; menampilkan pranala ke proyek lain (jika ada). Lihat Wikipedia:Interproyek. Dimatikan dengan LoadInterProject = false
* MediaWiki:NavFrame.js; lihat Wikipedia:Sembunyikan dan Tampilkan. Dimatikan dengan LoadNavFrame = false
* MediaWiki:Stripe.js; lihat Bantuan:Tabelcantik. Dimatikan dengan LoadStripe = false
Atur variabel yang Anda inginkan tersebut di sub halaman switches.js di halaman pengguna Anda.
thread_title:  Script tambahan 

message: 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;
thread_title:  Contoh 

message: :Ternyata ada perbedaan di MediaWiki:Common.js yang tidak memungkinkan hal tersebut. Tolong ditambahin di MediaWiki:Common.js seperi di versi en.wiki (saat ini halaman tersebut tidak bisa diedit):
/** 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)
replies: text: Tolong diperbarui lagi, karena Navframe jadi tidak berfungsi dengan benar
Terima kasih
thread_title: Pembicaraan Templat:Navbox

message: Kok pranala "Subhalaman" yang menurut saya sangat berguna dihapus ya, bung Ivan? (-_-)V  bennylin 404 08:59, 29 April 2008 (UTC)
replies: text: Tidak dihapus, hanya dipindahkan ke gadget. borgx(kirim pesan) 00:12, 30 April 2008 (UTC)
thread_title:  Subhalaman 

message: addCustomEditButton( "3/3b/Button_template_alt.png", "Catatan kaki", 
  	"\n== Catatan kaki ==\n\n" + "" + "\n", "", "" );
ada yang berkeberatan jka kata "Catatan kaki" diganti menjadi "Referensi"? ✒ Bennylin 10:21, 19 November 2009 (UTC)
  Tjmoel    ✉  11:20, 19 November 2009 (UTC)
replies: text: Sudah diganti. Terima kasih. ✒ Bennylin 06:45, 7 Desember 2009 (UTC)
thread_title:  Referensi 

message: 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)
thread_title:  Tambah 

message: Tambahin juga donk yang bersumber pada ini ==> http://tolololpedia.wikia.com/wiki/MediaWiki:Common.js
--Erik ✉ ⌨ 08:27, 27 Maret 2011 (UTC)
thread_title:  tambah donk 

message: function mainpg() {
     if ((isMainPage || /[\/=:]Halaman_Utama/.test(document.location)) && document.getElementById('ca-nstab-main')) {
          document.getElementById('ca-nstab-main').firstChild.innerHTML = '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)
* ·· Kℇℵ℟ℑℭK 14:51, 22 Juni 2011 (UTC)
replies: text: Ternyata penyelesaiannya sangat mudah. Tinggal tambahkan <a></a> di antara kata Utama -> <a>Utama</a> dan masalahnya selesai. Sudah dicoba di Wiktionary bahasa Indonesia. Silakan dicoba. вёӣйүӀіп ※ 14.46, 6 Februari 2012 (WIB)
replies: text: :Kalau tidak ada yang menyadari, ini juga merusak tampilan halaman utama untuk anon dan pengguna yang menggunakan kulit Vector. Sejak kulit ini dijadikan tampilan default pada Desember 2008 (>3 tahun!). Mohon segera diperbaiki ASAP. вёӣйүӀіп ※ 14.58, 6 Februari 2012 (WIB)
replies: text: ::Sepertinya maksud Benny adalah: 
 function mainpg() {
     if ((isMainPage || /[\/=:]Halaman_Utama/.test(document.location)) && document.getElementById('ca-nstab-main')) {
          document.getElementById('ca-nstab-main').firstChild.innerHTML = '<a>Utama<\/a><\/span>';
     }   
 }
 addOnloadHook(mainpg);
 Kℇℵ℟ℑℭK 6 Februari 2012 14.32 (UTC)
thread_title:  mainpg 

message: 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.
 
 <nowiki> */
 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" style="display:block;">'+iProject+'<\/div>';
          document.getElementById("p-tb").appendChild(interProject);
     }
 }
 addOnloadHook(iProject);
 /* </nowiki> */
thread_title:  iProject 

message: Dikarenakan Soxred93 sudah pensiun dari Wikipedia, alat penghitung suntingan bisa ditemukan di //toolserver.org/~tparis. 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 );
thread_title:  Penghitung suntingan 

message: 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 19 Desember 2013 08.41 (UTC) (comments, translations and last instructions)
replies: text: Done. Thanks. ꦱꦭꦩ꧀ ‑Ｂｅｎｎｙｌｉｎ ｢diskusi｣ 15.41, 19 Desember 2013 (WIB)</pre>
thread_title:  Give search results even when page doesn't exist 

message: 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)
replies: text: : Sure, why not? Gombang (bicara) 20 Agustus 2014 07.01 (UTC)

text: Thank you for implementing my request. ꦱꦭꦩ꧀ ‑Ｂｅｎｎｙｌｉｎ ｢cakap｣ 01.45, 22 Agustus 2014 (WIB)
thread_title:  Announced JavaScript change for badges implementation 

message: 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)
replies: text: Okay. I'll look into it. Thanks. ·· Kℇℵ℟ℑℭK 18 Januari 2015 01.36 (UTC)
replies: text: :, Bugnya bikin masalah ke "add translation", udah di remove?-AldNonUcallin?♫☎☏♬ 18 Januari 2015 11.54 (UTC)
replies: text: ::Per suntingan ini, harusnya sudah beres. ·· Kℇℵ℟ℑℭK 18 Januari 2015 13.07 (UTC)
replies: text: :::Trims :D -AldNonUcallin?♫☎☏♬ 18 Januari 2015 13.17 (UTC)

text: Thanks Amir, for finding out the source of the problem. ꦱꦭꦩ꧀ ‑Ｂｅｎｎｙｌｉｎ ｢cakap｣ 22.42, 18 Januari 2015 (WIB)
thread_title:  hookEvent 

message: 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)
replies: text: To be honest, I have never used the other options (as lots of them are already available in Vector's toolbar; though few people here still use Monobook). But on the default option, I often use the list of templates there to tag articles. So, probably tell us how to fix? ·· Kℇℵ℟ℑℭK 12 Juni 2016 01.06 (UTC)
replies: text: :To be clear, if you just remove the javascript, it will make the default option be the only option, which seems to be the state of things anyways since roughly 2010. Bawolff (bicara) 13 Juni 2016 09.03 (UTC)
thread_title:  Breaking &lt;charinsert&gt; 

message: 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)
replies: text: Sebenarnya sih masalahnya cukup sering 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)
thread_title:  Deskripsi di warung kopi (bantuan)