1/* 2 * mobile-btn.js â Floating Add to Discord Button for Mobile 3 * ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 4 * On mobile screens, creates a floating FAB-style button at 5 * bottom-right for the "Add to Discord" CTA. 6 */ 7 8(function () { 9 10 // Only run on mobile screens 11 if (window.innerWidth <= 680) { 12 // Get the Discord invite link from the topnav button 13 const topnavBtn = document.querySelector('.topnav .btn-primary'); 14 if (!topnavBtn) return; 15 16 const discordLink = topnavBtn.getAttribute('href'); 17 18 // Create floating button 19 const floatingBtn = document.createElement('a'); 20 floatingBtn.href = discordLink; 21 floatingBtn.className = 'btn-floating'; 22 floatingBtn.textContent = '+ Add to Discord'; 23 floatingBtn.setAttribute('aria-label', 'Add Mep to Discord'); 24 25 // Append to body 26 document.body.appendChild(floatingBtn); 27 } 28 29})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.