Skip to content

Commit

Permalink
fix: renable hit counter
Browse files Browse the repository at this point in the history
  • Loading branch information
okikio authored Oct 12, 2021
1 parent 4176d98 commit 077076a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,16 @@ import * as Monaco from "./modules/monaco";
// countapi-js hit counter. It counts the number of time the website is loaded
import { hit } from "countapi-js";

// (async () => {
// try {
// let { value } = await hit("bundle.js.org", "visits");
// let visitCounterEl = document.querySelector("#visit-counter");
// if (visitCounterEl)
// visitCounterEl.textContent = `👋 ${value} visits`;
// } catch (err) {
// console.warn(
// "Visit Counter Error (please create a new issue in the repo)",
// err
// );
// }
// })();
(async () => {
try {
let { value } = await hit("bundle.js.org", "visits");
let visitCounterEl = document.querySelector("#visit-counter");
if (visitCounterEl)
visitCounterEl.textContent = `👋 ${value} visits`;
} catch (err) {
console.warn(
"Visit Counter Error (please create a new issue in the repo)",
err
);
}
})();

0 comments on commit 077076a

Please sign in to comment.