Skip to content

Commit 0b20840

Browse files
authored
Update meta.js
1 parent 0e7236e commit 0b20840

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

assets/js/meta.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
};
2626
window.hits = (tag) => {
2727
if (settings.get("miscellaneous_hits") === "disable") return;
28-
fetch("https://hits.zkitefly.eu.org/?tag=" + tag, { method: "HEAD" }).then((response) => {
28+
const hitsUrl = new URL("https://hits.zkitefly.eu.org");
29+
hitsUrl.searchParams.set("tag", tag);
30+
fetch(hitsUrl, { method: "HEAD" }).then((response) => {
2931
if (response.status !== 200) return;
3032
const { headers } = response;
3133
const total = headers.get("X-Total-Hits");

0 commit comments

Comments
 (0)