Move JS yet again

This commit is contained in:
Michał Gdula 2023-04-09 00:41:14 +00:00
parent f4ea1984b0
commit 6729142d1b
5 changed files with 129 additions and 59 deletions

10
gallery/static/js/webp.js Normal file
View file

@ -0,0 +1,10 @@
function checkWebpSupport() {
var webpSupport = false;
try {
webpSupport = document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') === 0;
} catch (e) {
webpSupport = false;
}
return webpSupport;
}