Pinned Loading
-
Bookmarklet for Link Information on ...
Bookmarklet for Link Information on a Page (minified) 1!function(){const t=document.title||"",e=document.querySelectorAll("meta"),o=document.querySelectorAll("a[href]"),n=document.querySelector('link[rel="canonical"]');let r="",a="";e.forEach((t=>{const e=t.name?.toLowerCase();"description"===e&&(r=t.content||""),"robots"===e&&(a=t.content||"")}));const s=n?.href||"",d=["<html><head><title>Link Analysis</title>","<style>body{font-family:sans-serif;margin:0 auto;max-width:1200px;padding:20px}table{border-collapse:collapse;margin:10px 0;width:100%}th,td{border:1px solid #ddd;padding:8px;text-align:left}th{background:#f5f5f5}td{max-width:400px;overflow:auto;font-size:14px}.stats{background:#f9f9f9;padding:10px;margin:10px 0}textarea{width:100%;box-sizing:border-box;font-family:monospace;font-size:12px}</style>","</head><body><h1>Page Analysis</h1>"];d.push('<div class="stats"><strong>Page Info:</strong></div>',"<table><tr><th>Property</th><th>Value</th></tr>",`<tr><td>Title</td><td>${t}</td></tr>`,`<tr><td>Description</td><td>${r}</td></tr>`,`<tr><td>Robots</td><td>${a}</td></tr>`,`<tr><td>Canonical</td><td>${s}</td></tr>`,"</table>");const i=[],l=new Set,h=window.location.hostname,c=[],p=[],u=/^(mailto:|tel:|javascript:|#$)|google\.com\/search|youtube\.com\/results/i;o.forEach((t=>{const e=t.href,o=(t.textContent||t.innerText||"").trim(),n=t.rel||"";if(!e||l.has(e)||u.test(e))return;l.add(e),c.push(e),p.push(`<a href="${e}">${o}</a>`);const r=t.hostname===h,a=!r&&t.hostname;i.push({href:e,text:o.substring(0,100),rel:n,type:r?"Internal":a?"External":"Other"})}));const f=i.reduce(((t,e)=>(t[e.type]=t[e.type]||[],t[e.type].push(e),t)),{});Object.entries(f).forEach((([t,e])=>{d.push(`<div class="stats"><strong>${t} Links (${e.length}):</strong></div>`,"<table><tr><th>#</th><th>URL</th><th>Text</th><th>Rel</th></tr>"),e.forEach(((t,e)=>{d.push("<tr>",`<td>${e+1}</td>`,`<td><a href="${t.href}" target="_blank">${t.href}</a></td>`,`<td>${t.text}</td>`,`<td>${t.rel}</td>`,"</tr>")})),d.push("</table>")})),d.push('<div class="stats">',`<strong>Summary:</strong> ${i.length} unique links found`,"</div>","<h2>Plain Links (Copy/Paste)</h2>",`<textarea rows="10">${c.join("\n")}</textarea>`,"<h2>HTML Links (Copy/Paste)</h2>",`<textarea rows="10">${p.join("\n")}</textarea>`,"</body></html>");const m=window.open("","_blank");m.document.write(d.join("")),m.document.close()}();
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.