MediaWiki:Mobile.js
Loncat ke navigasi
Loncat ke pencarian
Catatan:Setelah disimpan, Anda mungkin perlu melewati tembolok peramban web untuk melihat perubahan.
- Firefox/Safari: Tekan dan tahan Shift sembari mengeklik Reload, atau tekan Ctrl-F5 atau Ctrl-R (⌘-R di Mac)
- Google Chrome: Tekan Ctrl-Shift-R (⌘-Shift-R di Mac)
- Internet Explorer / Edge: Tahan Ctrl sembari mengeklik Refresh, atau tekan Ctrl-F5
- Opera: Tekan Ctrl-F5.
/* All JavaScript here will be loaded for users of the mobile site */ /* Add to MediaWiki:Mobile.js for custom Mobile Menu links for MW-1.34.2 with MobileFrontend and MinervaNeue Just replace span text and href to add links */ var timer = setInterval(function() { if ($('.menu ul:first').length) { console.log("mobile menu exists"); clearInterval(timer); $('.menu ul:first').after( '<ul class="level1"> \ <li> \ <a href="#" \ class="mw-ui-icon mw-ui-icon-before mw-ui-icon-mf-expand mw-ui-icon-small"> \ <span>UTAMA</span> \ </a> \ </li> \ <ul class ="level2"> \ <li> \ <a href="/index.php/Daftar_Isi" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Daftar Isi</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Tokoh" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Tokoh</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Konsep_Kunci" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Konsep Kunci</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Hukum_Keluarga" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Hukum Keluarga</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Lembaga" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Lembaga</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Komunitas" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Komunitas</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Khazanah" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Khazanah</span> \ </a> \ </li> \ </ul> \ </ul>\ <ul class="level1"> \ <li> \ <a href="#" \ class="mw-ui-icon mw-ui-icon-before mw-ui-icon-wikimedia-star-base20"> \ <span>KONGRES 1</span> \ </a> \ </li> \ <ul class ="level2"> \ <li> \ <a href="/index.php/Tentang_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Tentang Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Proses_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Proses Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Hasil_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Hasil Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Dokumen_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Dokumen Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Refleksi_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Refleksi Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Diskursus_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Diskursus Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Berita_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Berita Kongres</span> \ </a> \ </li> \ <li> \ <a href="/index.php/Galeri_Kongres" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Galeri Kongres</span> \ </a> \ </li> \ </ul> \ </ul> <ul class="level1"> \ <li> \ <a href="#" \ class="mw-ui-icon mw-ui-icon-before mw-ui-icon-wikimedia-star-base20"> \ <span>KONGRES 2</span> \ </a> \ </li> \ <ul class ="level2"> \ <li> \ <a href="#" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Mubadalah Postgraduate Forum</span> \ </a> \ </li> \ <li> \ <a href="#" \ class="mw-ui-icon mw-ui-icon-before"> \ <span>Galeri Kongres 2</span> \ </a> \ </li> \ </ul> \ </ul>' ); $(".menu").find(".level2").hide(); // hide level2 until level1 is clicked $(".level1").click(function(event){ $(this).find(".level2").slideToggle(500); }); // if level1 is clicked, dropdown level2 } }, 100); // check every 100ms