Contact Lenses
A collection page of FYidoctors
About
// SEO Fix: Override non-crawlable links site-wide document.addEventListener('DOMContentLoaded', function() { // Fix javascript:void(0) links const voidLinks = document.querySelectorAll('a[href="javascript:void(0);"], a[href="javascript:void(0)"]'); voidLinks.forEach(function(link) { // Get the onclick content to determine destination const onclick = link.getAttribute('onclick'); if (onclick) { // Extract URL from common patterns let newHref = extractUrlFromOnclick(onclick); if (newHref) { link.href = newHref; link.removeAttribute('onclick'); } } // If no onclick, try to determine from text content if (!link.href || link.href.includes('javascript:')) { const linkText = link.textContent.toLowerCase().trim(); link.href = getUrlFromLinkText(linkText); } }); // Fix empty href links const emptyLinks = document.querySelectorAll('a[href=""], a[href="#"], a:not([href])'); emptyLinks.forEach(function(link) { const linkText = link.textContent.toLowerCase().trim(); const newHref = getUrlFromLinkText(linkText); if (newHref) { link.href = newHref; } }); // Fix language switching links specifically const langLinks = document.querySelectorAll('a[data-lang]'); langLinks.forEach(function(link) { const lang = link.getAttribute('data-lang'); const currentPath = window.location.pathname; if (lang === 'en') { link.href = currentPath.replace('/fr/', '/') || currentPath; } else if (lang === 'fr') { link.href = currentPath.includes('/fr/') ? currentPath : '/fr' + currentPath; } // Remove the onclick attribute if present link.removeAttribute('onclick'); }); }); // Helper function to extract URL from onclick content function extractUrlFromOnclick(onclick) { // Common patterns in onclick handlers const patterns = [ /window\.location\s*=\s*['"]([^'"]+)['"]/, /location\.href\s*=\s*['"]([^'"]+)['"]/, /goTo\(['"]([^'"]+)['"]\)/, /navigate\(['"]([^'"]+)['"]\)/, /redirect\(['"]([^'"]+)['"]\)/ ]; for (let pattern of patterns) { const match = onclick.match(pattern); if (match) { return match[1]; } }
On-page SEO
Title tag (53)
Contact Lenses – Buy Online in Canada | Free Shipping
Meta description
Order contact lenses online in Canada. Top brands like Acuvue, Dailies and Biofinity with fast shipping, direct insurance billing and optometrist support.
H1
Contact Lenses
Canonical
https://fyidoctors.com/collections/contact-lenses
Robots
index
Copy
673 words
Sign in to see the ads landing on this page and its link graph.
Sign in to see all findings