MediaWiki:Common.js: Difference between revisions
From അഭിപ്രായവേദി
mNo edit summary Tag: Manual revert |
mNo edit summary Tag: Reverted |
||
| Line 30: | Line 30: | ||
} | } | ||
}()); | }()); | ||
/* $wgSitename ഇരിക്കുന്ന സ്ഥാനത്ത് വലിയ ലോഗോ ചിത്രം ഇൻജക്ട് ചെയ്യുന്നു */ | |||
$(document).ready(function () { | |||
var logoUrl = https://abhiprayavedi.org/images/1/17/AV-Logo.png; | |||
// ടോപ്പ് ബാനറിലെ സിറ്റ്നൈം ലിങ്ക് കണ്ടെത്തുന്നു | |||
var $brandLink = $('#p-logo-text a, .mw-wiki-title'); | |||
if ($brandLink.length > 0) { | |||
// ലിങ്കിനുള്ളിലെ പഴയ ടെക്സ്റ്റ് മാറ്റി പകരം കൃത്യമായ വലിപ്പമുള്ള <img> ടാഗ് നൽകുന്നു | |||
$brandLink.html('<img src="' + logoUrl + '" style="height: 52px; width: auto; max-width: 280px; display: inline-block; vertical-align: middle;" alt="അഭിപ്രായവേദി">'); | |||
} | |||
}); | |||
Revision as of 15:20, 16 June 2026
/* ഇവിടെ നൽകുന്ന ജാവാസ്ക്രിപ്റ്റ് എല്ലാ ഉപയോക്താക്കൾക്കും, എല്ലാ താളുകളിലും പ്രവർത്തിക്കുന്നതായിരിക്കും */
// Show display titles in category pages instead of page names
$(document).ready(function() {
if ($('.mw-category').length) {
$('.mw-category li a').each(function() {
var pageTitle = $(this).attr('title');
if (pageTitle) {
// This will use the page's actual display title
// MediaWiki automatically uses DISPLAYTITLE in title attribute
$(this).text(pageTitle);
}
});
}
});
/* ==========================================================================
ANONYMOUS USERS ONLY: HIDE PAGE TABS (View Source, History etc.)
========================================================================== */
(function () {
// ഉപയോക്താവ് ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (അനോണിമസ് ആണെങ്കിൽ)
if (mw.config.get('wgUserId') === null) {
// ഡോക്യുമെന്റ് ലോഡ് ആയതിനു ശേഷം റൺ ചെയ്യുക
$(document).ready(function () {
// പേജ് ടാബുകൾ അടങ്ങിയ കണ്ടെയ്നർ പൂർണ്ണമായി നീക്കം ചെയ്യുക
$('#mw-page-header-links').remove();
// 'From AbhiprayaVedi' എന്ന ലൈൻ നീക്കം ചെയ്യുക
$('#siteSub').remove();
});
}
}());
/* $wgSitename ഇരിക്കുന്ന സ്ഥാനത്ത് വലിയ ലോഗോ ചിത്രം ഇൻജക്ട് ചെയ്യുന്നു */
$(document).ready(function () {
var logoUrl = https://abhiprayavedi.org/images/1/17/AV-Logo.png;
// ടോപ്പ് ബാനറിലെ സിറ്റ്നൈം ലിങ്ക് കണ്ടെത്തുന്നു
var $brandLink = $('#p-logo-text a, .mw-wiki-title');
if ($brandLink.length > 0) {
// ലിങ്കിനുള്ളിലെ പഴയ ടെക്സ്റ്റ് മാറ്റി പകരം കൃത്യമായ വലിപ്പമുള്ള <img> ടാഗ് നൽകുന്നു
$brandLink.html('<img src="' + logoUrl + '" style="height: 52px; width: auto; max-width: 280px; display: inline-block; vertical-align: middle;" alt="അഭിപ്രായവേദി">');
}
});