MediaWiki:Common.js: Perbedaan antara revisi
Tidak ada ringkasan suntingan Tanda: Suntingan perangkat seluler Suntingan peramban seluler |
Tidak ada ringkasan suntingan Tanda: Suntingan perangkat seluler Suntingan peramban seluler |
||
| Baris 321: | Baris 321: | ||
/* 1. | /* 1. Custom Brand Watermark (Background Samar) */ | ||
$(document).ready(function() { | $(document).ready(function() { | ||
if (mw.config.get('wgIsArticle') | if (mw.config.get('wgIsArticle')) { | ||
var $watermark = $('<div id="mippedia-wm" style="position:fixed; bottom:10%; right:-5%; font-size:120px; font-weight:bold; color:rgba(54,102,204,0.03); transform:rotate(-30deg); pointer-events:none; z-index:-1; user-select:none;">MIPPEDIA</div>'); | |||
$('body').append($watermark); | |||
var | |||
$('body').append($ | |||
} | } | ||
}); | }); | ||
/* 2. | /* 2. Smart Image Glow (Fokus Visual) */ | ||
$(document).ready(function() { | $(document).ready(function() { | ||
$('.mw-parser-output img').css({ | |||
'transition': 'box-shadow 0.3s ease, transform 0.3s ease', | |||
'border-radius': '8px' | |||
}); | |||
}); | |||
$(window).scroll(function() { | $(window).scroll(function() { | ||
$('.mw-parser-output img').each(function() { | |||
var winTop = $(window).scrollTop(); | |||
var imgTop = $(this).offset().top; | |||
if (imgTop < winTop + 400 && imgTop > winTop) { | |||
} | $(this).css({ | ||
'box-shadow': '0 10px 30px rgba(54,102,204,0.2)', | |||
'transform': 'scale(1.02)' | |||
}); | |||
} else { | |||
$(this).css({ | |||
'box-shadow': 'none', | |||
'transform': 'scale(1)' | |||
}); | |||
} | |||
}); | |||
}); | }); | ||
}); | }); | ||
/* 3. Cleanup UI: Hapus Garis Bawah di Tombol Navigasi */ | |||
$("<style>").prop("type", "text/css").html(` | |||
#quick-nav, #ca-speak-icon { text-decoration: none !important; } | |||
.page-actions-menu__list-item a { text-decoration: none !important; } | |||
`).appendTo("head"); | |||