From: Dessalines Date: Wed, 10 Jun 2020 02:43:28 +0000 (-0400) Subject: Merge branch 'master' into dev X-Git-Url: http://these/git/%22https:/join-lemmy.org/%7Bthis.state.url%7D?a=commitdiff_plain;h=da2229a3033d5f14bf1a6bce34d98f2a0680cd43;p=lemmy.git Merge branch 'master' into dev --- da2229a3033d5f14bf1a6bce34d98f2a0680cd43 diff --cc ui/src/utils.ts index 82900cab,3bad5040..81bb0147 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@@ -863,14 -883,19 +883,18 @@@ export function previewLines(text: stri } function canUseWebP() { - var elem = document.createElement('canvas'); - - if (!!(elem.getContext && elem.getContext('2d'))) { - var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp'; - // was able or not to get WebP representation - return elem.toDataURL('image/webp').startsWith('data:image/' + testString); - } - - // very old browser like IE 8, canvas not supported + // TODO pictshare might have a webp conversion bug, try disabling this return false; + + // var elem = document.createElement('canvas'); - + // if (!!(elem.getContext && elem.getContext('2d'))) { + // var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp'; + // // was able or not to get WebP representation + // return ( + // elem.toDataURL('image/webp').startsWith('data:image/' + testString) + // ); + // } + + // // very old browser like IE 8, canvas not supported + // return false; }