diff --git a/dist/index.html b/dist/index.html
index bf053da..a07a3e5 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -5,10 +5,11 @@
-
Debrid Services Comparison - Compare Pricing & Hosts
+ Debrid Services Comparison - Compare Pricing, Hosts & Features
-
+ content="Comprehensive comparison of 9 premium debrid services including AllDebrid, Real-Debrid, TorBox, Premiumize, Debrid-Link, LinkSnappy & more. Compare pricing, 400+ file hosts, refund policies, and speeds. Find the best debrid service for your needs in 2025.">
+
+
@@ -56,21 +57,81 @@
-
+
+ content="Compare pricing and supported hosts across 9 major debrid services including AllDebrid, Real-Debrid, TorBox & more. Find the best premium download service with 400+ host support.">
+
+
-
+
+ content="Compare pricing and supported hosts across 9 major debrid services. Find the best premium download service for your needs.">
+
+
+
+
@@ -239,7 +300,7 @@
@@ -1135,6 +1196,7 @@
requestAnimationFrame(() => bodyEl.classList.add('js-ready'));
function trapFocus(container) {
+ if (!container || container.dataset.trapBound === 'true') return;
const focusables = Array.from(container.querySelectorAll(focusableSelectors));
if (!focusables.length) return;
let first = focusables[0];
@@ -1146,6 +1208,7 @@
}
}
container.addEventListener('keydown', handle);
+ container.dataset.trapBound = 'true';
}
function updateNavAria() {
@@ -1154,26 +1217,38 @@
nav.setAttribute('aria-hidden', bodyEl.classList.contains('nav-open') ? 'false' : 'true');
} else {
nav.removeAttribute('aria-hidden');
+ if (bodyEl.classList.contains('nav-open')) {
+ closeMenu({ restoreFocus: false });
+ } else {
+ nav.removeAttribute('data-open');
+ navToggle?.setAttribute('aria-expanded', 'false');
+ if (navOverlay) navOverlay.hidden = true;
+ }
}
}
function openMenu() {
+ if (!nav) return;
lastFocusedBeforeMenu = document.activeElement;
bodyEl.classList.add('nav-open');
- navToggle.setAttribute('aria-expanded', 'true');
- navOverlay.hidden = false;
+ navToggle?.setAttribute('aria-expanded', 'true');
+ if (navOverlay) navOverlay.hidden = false;
nav.setAttribute('data-open', 'true');
const firstLink = nav.querySelector('a');
firstLink && firstLink.focus();
trapFocus(nav);
updateNavAria();
}
- function closeMenu() {
+ function closeMenu(options = {}) {
+ if (!nav) return;
+ const { restoreFocus = true } = options;
bodyEl.classList.remove('nav-open');
- navToggle.setAttribute('aria-expanded', 'false');
- navOverlay.hidden = true;
+ navToggle?.setAttribute('aria-expanded', 'false');
+ if (navOverlay) navOverlay.hidden = true;
nav.removeAttribute('data-open');
- lastFocusedBeforeMenu && lastFocusedBeforeMenu.focus();
+ if (restoreFocus && lastFocusedBeforeMenu) {
+ lastFocusedBeforeMenu.focus();
+ }
updateNavAria();
}
if (navToggle) {
@@ -1184,6 +1259,13 @@
if (navOverlay) {
navOverlay.addEventListener('click', closeMenu);
}
+ if (nav) {
+ nav.addEventListener('click', (event) => {
+ const target = event.target instanceof Element ? event.target.closest('.nav-link') : null;
+ if (!target) return;
+ if (window.innerWidth <= 900) closeMenu();
+ });
+ }
window.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && bodyEl.classList.contains('nav-open')) closeMenu();
});