summaryrefslogtreecommitdiffstats
path: root/ui/src/utils.ts
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-05 11:45:04 -0400
committerDessalines <tyhou13@gmx.com>2020-06-05 11:45:04 -0400
commit9bf444e93a32e6db3ca0db829b67c6764f18b406 (patch)
tree6e0524b97db5ba133ac9739d8659c8141a9f34e6 /ui/src/utils.ts
parent7c0ea6cfa738c1bef39c91836523d79d433f907e (diff)
Removing webp for now.
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r--ui/src/utils.ts23
1 files changed, 13 insertions, 10 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts
index cb56ba58..96158462 100644
--- a/ui/src/utils.ts
+++ b/ui/src/utils.ts
@@ -863,16 +863,19 @@ export function previewLines(text: string, lines: number = 3): string {
}
function canUseWebP() {
- var elem = document.createElement('canvas');
+ // TODO pictshare might have a webp conversion bug, try disabling this
+ return false;
- 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)
- );
- }
+ // var elem = document.createElement('canvas');
- // very old browser like IE 8, canvas not supported
- return false;
+ // 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;
}