T48a Docs · Frame passes review; an id-less heading fails the build, protocol-relative links stay native
This commit is contained in:
5 files changed
+7
-4
No files matched your search
@@ -35,7 +35,7 @@ export function Docs() {
|
||||
const target = e.target as HTMLElement;
|
||||
const button = target.closest<HTMLButtonElement>("button.copy");
|
||||
if (button) return void copy(button);
|
||||
const link = target.closest<HTMLAnchorElement>("a[href^='/']");
|
||||
const link = target.closest<HTMLAnchorElement>("a[href^='/']:not([href^='//'])");
|
||||
if (!link || e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
const url = new URL(link.href);
|
||||
|
||||
Reference in new issue
Block a user