Use JSDelivr as CDN
This commit is contained in:
+1
-1
@@ -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
@@ -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: ⚡️
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user