sciactive / tinygesture

Very small gesture recognizer for JavaScript. Swipe, pan, tap, doubletap, longpress, pinch, and rotate.
https://sciactive.github.io/tinygesture/
Apache License 2.0
202 stars 18 forks source link

Can we use TinyGesture using CDN without npm for a native website using just js ? #12

Open LorisInterconsult opened 5 months ago

hperrin commented 5 months ago

Yes, JSDelivr has it available here:

https://cdn.jsdelivr.net/npm/tinygesture@3.0.0/dist/TinyGesture.min.js

For more info and options, you can check out the package's page on JSDelivr:

https://www.jsdelivr.com/package/npm/tinygesture

LorisInterconsult commented 5 months ago

I found it but when I try this I got :

Blocking a multi-origin request (Cross-Origin Request): the “Same Origin” policy does not allow you to consult the remote resource located at file:///C:/Users/PC-te/Desktop/index.js. Reason: The CORS request does not use HTTP.

Error: An unexpected error occurred spoofer.js:1:38935 Uncaught SyntaxError: export declarations may only appear at top level of a module TinyGesture.min.js:7:9705 Uncaught ReferenceError: TinyGesture is not defined

`<!DOCTYPE html>

Swipe

SWIPE PROTOTYPE

Swipe items left or right to categorize them

  • Swipe Item left or right
  • Swipe Item with a bit more text than should overflow to test if the styles work fine. It seems like it is. But we can test it with even more text.
  • Maybe the HTML-Markum can be reduced.
  • Doubletap to undo your choice
  • Only 651 Byte JS needed.
`