From 55bc1a3414ac15b08554a43c00f7f631ca1d304a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 3 Feb 2018 20:32:13 +0300 Subject: fixed stretched spurdo in notifications, misc fixes, detect gif by extension for now --- src/components/still-image/still-image.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/components/still-image/still-image.js') diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index e674b932..595652f2 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -12,14 +12,8 @@ const StillImage = { } }, computed: { - animated: { - get () { - // If mimetype is gif then it is certainly animated, if it's undefined - we don't know YET - return this.mimetype === 'image/gif' ? true : this.mimetype == null ? 'maybe' : false - }, - set (val) { - this.mimetype = val - } + animated () { + return this.mimetype === 'image/gif' || this.src.endsWith('.gif') } }, methods: { @@ -27,12 +21,6 @@ const StillImage = { const canvas = this.$refs.canvas if (!canvas) return canvas.getContext('2d').drawImage(this.$refs.src, 1, 1, canvas.width, canvas.height) - if (this.animated === 'maybe') { - fetch(this.src).then((data) => { - console.log(data) - this.animated = data.type - }) - } } } } -- cgit v1.2.3-70-g09d2