diff --git a/static/links/main.js b/static/links/main.js index e29d7e4..2669c6b 100644 --- a/static/links/main.js +++ b/static/links/main.js @@ -7,6 +7,12 @@ const PER_PAGE = 8; let currentPage = 1; let linksData = []; +function extractReelId(url) { + // Example: https://www.instagram.com/reel/ABC123xyz/ + const match = url.match(/instagram\.com\/reel\/([a-zA-Z0-9_-]+)/); + return match ? match[1] : null; +} + function loadLinks() { const cacheKey = `links_cache_page_${currentPage}_per_${PER_PAGE}`; const cached = localStorage.getItem(cacheKey);