diff --git a/.gitignore b/.gitignore index 67b9620..ae0f955 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,8 @@ node_modules data.json main.js main.js.LICENSE.txt +release +deploy.bat + + diff --git a/src/main.ts b/src/main.ts index b31c30c..c306e19 100644 --- a/src/main.ts +++ b/src/main.ts @@ -79,8 +79,8 @@ export default class URLBlockPlugin extends Plugin { if (p.parentElement.tagName !== "DIV" || p.children.length !== 1)continue; const ael = p.children[0] as HTMLAnchorElement; if (ael.tagName == "A" && ael.className === "external-link" && p.textContent === ael.textContent ) { - const href = ael.href; - const g = r.exec(href) + const g = r.exec(ael.href) + if (!g) continue; let icon = ""; if (g) { icon = g[1] + "/favicon.ico";