MediaWiki:Mobile.js: Difference between revisions
Content deleted Content added
No edit summary Tag: Manual revert |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
Line 1:
// CapSach —
(function () {
// Only run on
if (window.mw && mw.config && mw.config.get) {
var isAllowed = mw.config.get('wgIsArticle') || mw.config.get('wgIsMainPage');
Line 31:
});
// Show only if there are enough headings to be useful
// CHANGED: Lowered requirement to 1 heading so it always shows if there is any structure
if (items.length < 1) return;
Line 95 ⟶ 96:
}
// Force button display immediately
btn.addEventListener('click', openOverlay);
Line 146 ⟶ 148:
});
// 2. REMOVED the "resize" event listener that was hiding the button.
// The button now persists on all screen sizes.
} else {▼
▲ btn.style.display = 'flex';
}▼
})();
$(document).ready(function() {
// Check if the button already exists to prevent duplicates
if ($('#custom-email-btn').length === 0) {
// Create the email button element
var emailBtn = $('<a>', {
id: 'custom-email-btn',
href: 'mailto:services@axabrain.com',
// Simple accessible title
title: 'Contact AXA BRAIN Services'
});
// Add it to the body of the page
$('body').append(emailBtn);
▲ }
});
| |||