Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

feat: make source domain clickable in HTML + PDF exports

Luis Ortiz37e319354a1e
diff --git a/src/core/export/html-export.ts b/src/core/export/html-export.ts
index 562f7f4..e7baeb9 100644
--- a/src/core/export/html-export.ts
+++ b/src/core/export/html-export.ts
@@ -61,7 +61,7 @@ export async function exportGuideAsHTML(
domain
? `<div style="text-align:left;">
<div style="font-size:10px;font-weight:600;color:#6B7280;text-transform:uppercase;letter-spacing:0.06em;">Source</div>
- <div style="font-size:14px;font-weight:600;color:#4F46E5;display:flex;align-items:center;gap:6px;">${favicon ? `<img src="${favicon}" width="18" height="18" style="border-radius:4px;" />` : ''}${escapeHtml(domain)}</div>
+ <a href="https://${escapeHtml(domain)}" target="_blank" rel="noopener" style="font-size:14px;font-weight:600;color:#4F46E5;display:flex;align-items:center;gap:6px;text-decoration:none;">${favicon ? `<img src="${favicon}" width="18" height="18" style="border-radius:4px;" />` : ''}${escapeHtml(domain)}</a>
</div>`
: ''
}
diff --git a/src/core/export/pdf-export.ts b/src/core/export/pdf-export.ts
index 1ee4b92..ad18bbe 100644
--- a/src/core/export/pdf-export.ts
+++ b/src/core/export/pdf-export.ts
@@ -102,7 +102,7 @@ export async function exportGuideAsPDF(
doc.setFontSize(12);
doc.setFont('helvetica', 'normal');
doc.setTextColor(79, 70, 229);
- doc.text(domain, domainTextX, y + 6);
+ doc.textWithLink(domain, domainTextX, y + 6, { url: `https://${domain}` });
}
const stepIndent = 16;