chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0 (#1228)

* chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0

* actually apply the rules lol

* rebuild

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
renovate[bot]
2024-04-23 00:40:51 +02:00
committed by GitHub
parent 8aacc312cf
commit faa89850d0
53 changed files with 217 additions and 194 deletions
+5 -5
View File
@@ -5,27 +5,27 @@
import { invoke } from "@tauri-apps/api/core";
// open <a href="..."> links with the API
function openLinks() {
function openLinks(): void {
document.querySelector("body")?.addEventListener("click", function (e) {
let target = e.target as HTMLElement;
let target: HTMLElement | null = e.target as HTMLElement;
while (target != null) {
if (target.matches("a")) {
const t = target as HTMLAnchorElement;
if (
t.href &&
t.href !== "" &&
["http://", "https://", "mailto:", "tel:"].some((v) =>
t.href.startsWith(v),
) &&
t.target === "_blank"
) {
invoke("plugin:shell|open", {
void invoke("plugin:shell|open", {
path: t.href,
});
e.preventDefault();
}
break;
}
target = target.parentElement as HTMLElement;
target = target.parentElement;
}
});
}