Skip to content

Commit

Permalink
Merge pull request #14 from Astylodon/localhost
Browse files Browse the repository at this point in the history
Prevent data sending on localhost
  • Loading branch information
Xwilarg authored Jun 6, 2024
2 parents 6f21ba3 + 93b39e6 commit f2cd8d1
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 f2cd8d1

Please sign in to comment.