ميدياويكي:Common.js
المظهر
ملاحظة: بعد الحفظ، قد يلزمك محو الاختزان الخاص بمتصفحك لرؤية التغييرات.
- فايرفوكس / سافاري: أمسك Shift أثناء ضغط Reload، أو اضغط على إما Ctrl-F5 أو Ctrl-R (⌘-R على ماك)
- جوجل كروم: اضغط Ctrl-Shift-R (⌘-Shift-R على ماك)
- إنترنت إكسبلورر/إيدج: أمسك Ctrl أثناء ضغط Refresh، أو اضغط Ctrl-F5
- أوبرا: اضغط Ctrl-F5.
$(function () {
if (!mw.user.isAnon()) {
$('#right-navigation, #left-navigation .selected')
.attr('style', 'display:block !important;');
}
});
/**
* قراردادن فرمولهای ریاضی در سمت چپ مناسب برای ویکیهای راست به چپ
*/
$(function() {
$("span.mwe-math-mathml-inline").each(function() {
if ($(this).parent().parent().text().trim() === $(this).parent().text().trim() && $(this).parent().parent().is("p, dd")) {
$(this).parent().parent().css({
direction: "ltr",
padding: "1em 0"
});
}
});
});
// هشدار به کاربرها در مورد عنوان ایمیل
$(function() {
if ( $('#mw-input-wpSubject').parents('tr').length > 0 ) {
$('#mw-input-wpSubject').parents('tr').before('<tr><td></td><td style="color: red; font-weight: bold">لطفاً عبارت Wikipedia e-mail را با یک عنوان مناسب جایگزین کنید!</td><tr>');
}
});
// Make refrence number that you clicked on bold for proper navigation
// Author: User:Ladsgroup
$( 'sup.reference' ).click( function () {
var citeId = $( this ).attr( 'id' );
$( 'sup > a[href="#' + citeId + '"]').css('color', '#2a4b8d').css('font-weight', 'bold');
$( 'sup > a[href="#' + citeId + '"]').click( function() {
$( this ).css('color', '').css('font-weight', '');
} );
} );
$(function () {
if (mw.user.isAnon()) {
document.body.oncut = () => false;
document.body.oncopy = () => false;
}
});