|
|
(2 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| /* Any JavaScript here will be loaded for all users on every page load. */ | | /* Any JavaScript here will be loaded for all users on every page load. */ |
| if (typeof jQuery !== 'undefined') {
| |
| $(document).ready(function() {
| |
| $('#mw-panel a[href^="http"]').attr('target', '_blank');
| |
| });
| |
| }
| |
|
| |
|
| |
| $(document).ready(function() {
| |
| // Menambahkan target="_blank" untuk semua link eksternal di sidebar
| |
| $('#mw-panel a[href^="http"]').attr('target', '_blank');
| |
| });
| |
|
| |
| $(document).ready(function() {
| |
| // Memeriksa apakah pengguna sudah login
| |
| if (mw.config.get('wgUserName') === null) {
| |
| // Jika pengguna belum login, sembunyikan link Mikhmon di sidebar
| |
| $('#mw-panel a[href="http://abahdoku.wiki.gd/mikh3"]').parent().hide();
| |
| } else {
| |
| // Jika pengguna sudah login, biarkan link tetap ada dan buka di tab baru
| |
| $('#mw-panel a[href="http://abahdoku.wiki.gd/mikh3"]').attr('target', '_blank');
| |
| }
| |
| });
| |
Latest revision as of 22:48, 19 November 2024
/* Any JavaScript here will be loaded for all users on every page load. */