Use JSDelivr as CDN

This commit is contained in:
Tiago Rangel
2025-01-11 18:21:31 +00:00
parent 071f9904b9
commit 351711fd3c
4 changed files with 7 additions and 28 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ Cap is a library designed for safeguarding against spam and abuse by utilizing a
Cap is built to be straightforward and requires no API tokens for setup. Start by importing the Cap library:
```html
<script src="https://cdn.jsdelivr.net/gh/tiagorangel1/cap@latest/cap.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tiagorangel1/cap/src/js/min/cap.min.js"></script>
```
Next, add the `<cap-widget>` component to your HTML.
+3 -3
View File
@@ -10,9 +10,9 @@ hero:
- theme: brand
text: Documentation
link: /guide
- theme: alt
text: Demo
link: /demo
- theme: alt
text: Demo
link: ../demo/
features:
- icon: ⚡️
-21
View File
@@ -154,27 +154,6 @@ router.get("/", async (ctx) => {
router.get("/demo", async (ctx) => {
await send(ctx, "src/index.html", { root: __dirname });
});
router.get("/cap.js", async (ctx) => {
await send(ctx, "src/js/cap.js", { root: __dirname });
});
router.get("/cap-floating.js", async (ctx) => {
await send(ctx, "src/js/cap-floating.js", { root: __dirname });
});
router.get("/cap.min.js", async (ctx) => {
ctx.type = "application/javascript";
await send(ctx, "src/js/min/cap.min.js", { root: __dirname });
});
router.get("/cap-floating.min.js", async (ctx) => {
ctx.type = "application/javascript";
await send(ctx, "src/js/min/cap-floating.min.js", { root: __dirname });
});
router.get("/cap-interstitial.min.js", async (ctx) => {
ctx.type = "application/javascript";
await send(ctx, "src/js/min/cap-interstitial.min.js", { root: __dirname });
});
router.get("/wasm-hashes.min.js", async (ctx) => {
ctx.type = "application/javascript";
+3 -3
View File
@@ -80,7 +80,7 @@
}
</script>
<script src="/cap.min.js"></script>
<script src="/cap-floating.min.js"></script>
<script src="/cap-interstitial.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tiagorangel1/cap/src/js/min/cap.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tiagorangel1/cap/src/js/min/cap-floating.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tiagorangel1/cap/src/js/min/cap-interstitial.min.js"></script>
</html>