From babc4dc26f10b06d6c19297d10eb24357eea4420 Mon Sep 17 00:00:00 2001 From: Kenshin Date: Sun, 21 Jun 2020 18:49:09 +0800 Subject: [PATCH] Merge 'a059a67' source. --- src/options/corb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options/corb.js b/src/options/corb.js index 8d3800ce..5bec9b9b 100644 --- a/src/options/corb.js +++ b/src/options/corb.js @@ -40,7 +40,7 @@ browser.runtime.onMessage.addListener( async function ( request, sender, sendRes try { const option = request.value, { url, protocol } = option, - dlRes = await axios({ method: 'get', url, responseType: 'blob', }); + dlRes = await axios({ method: 'get', url: url.replace( /https?:/, protocol ), responseType: 'blob', }); let blob = dlRes.data; if ( blob.type === 'image/webp' ) { @@ -51,7 +51,7 @@ browser.runtime.onMessage.addListener( async function ( request, sender, sendRes done: { type: blob.type, size: blob.size, - url : url.replace( /https?:/, protocol ), + url, }, }); } catch ( err ) {