feat(gallery): load PhotoSwipe lib from JSDelivr
This commit is contained in:
parent
feff86a9b4
commit
fa0f8fa365
@ -236,10 +236,10 @@ function wrap(gallery: HTMLElement[]) {
|
|||||||
*/
|
*/
|
||||||
function loadPhotoSwipe() {
|
function loadPhotoSwipe() {
|
||||||
const tasks = [
|
const tasks = [
|
||||||
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js"),
|
loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"),
|
||||||
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js"),
|
loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"),
|
||||||
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.css"),
|
loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"),
|
||||||
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/default-skin/default-skin.min.css")
|
loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css")
|
||||||
];
|
];
|
||||||
|
|
||||||
return Promise.all(tasks);
|
return Promise.all(tasks);
|
||||||
|
Loading…
Reference in New Issue
Block a user