mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Move JS yet again
This commit is contained in:
parent
f4ea1984b0
commit
6729142d1b
5 changed files with 129 additions and 59 deletions
10
gallery/static/js/webp.js
Normal file
10
gallery/static/js/webp.js
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue