MediaWiki:Mobile.js: Difference between revisions
Content deleted Content added
No edit summary Tag: Manual revert |
No edit summary |
||
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.
▲ btn.style.display = 'flex';
})();
| |||