diff --git a/js/customElements/newComment.js b/js/customElements/newComment.js index 0080b3e..1523128 100644 --- a/js/customElements/newComment.js +++ b/js/customElements/newComment.js @@ -14,7 +14,7 @@ class newComment extends HTMLElement { script.src = "https://hCaptcha.com/1/api.js"; script.type = 'text/javascript'; script.onload = () => { - let pageName = path.split("/").pop(); + let pageName = window.location.pathname.split("/").pop(); this.parentElement.innerHTML = `