From fa0f8fa365296e773fd46e4955f759a5cf80f543 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 4 Oct 2020 15:59:56 +0200 Subject: [PATCH] feat(gallery): load PhotoSwipe lib from JSDelivr --- assets/ts/gallery.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts index b9871ff..41fba8e 100644 --- a/assets/ts/gallery.ts +++ b/assets/ts/gallery.ts @@ -236,10 +236,10 @@ function wrap(gallery: HTMLElement[]) { */ function loadPhotoSwipe() { const tasks = [ - loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js"), - loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js"), - loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.css"), - loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/default-skin/default-skin.min.css") + loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"), + loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"), + loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"), + loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css") ]; return Promise.all(tasks);