Skip to content

Commit

Permalink
Prevent data sending on localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwilarg committed Jun 6, 2024
1 parent 6f21ba3 commit 93b39e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/src/shika.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const currentScript = document.currentScript

function send() {
if (window.location.hostname == "localhost") {
return; // Debug environment
}

const url = currentScript.dataset.url; // data-url
const siteKey = currentScript.dataset.siteKey; // data-site-key

Expand Down

0 comments on commit 93b39e6

Please sign in to comment.