ميدياويكي:Common.js: الفرق بين النسختين
المظهر
لا ملخص تعديل |
لا ملخص تعديل |
||
| سطر ١: | سطر ١: | ||
$(function () { | $(function () { | ||
if (mw.user.isAnon()) { | if (!mw.user.isAnon()) { | ||
$('#right-navigation, #left-navigation .selected'). | $('#right-navigation, #left-navigation .selected') | ||
.attr('style', 'display:block !important;'); | |||
} | } | ||
}); | }); | ||
مراجعة ١٦:٥٧، ١٦ يوليو ٢٠٢٦
$(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', '');
} );
} );