diff --git a/background/background.js b/background/background.js index cbd672ce..434921e4 100644 --- a/background/background.js +++ b/background/background.js @@ -13,7 +13,10 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, { saveStyle, deleteStyle, - download: msg => download(msg.url), + download(msg) { + delete msg.method; + return download(msg.url, msg); + }, getPrefs: () => prefs.getAll(), healthCheck: () => dbExec().then(() => true), diff --git a/content/install-hook-userstyles.js b/content/install-hook-userstyles.js index f25ba3d0..5fe37747 100644 --- a/content/install-hook-userstyles.js +++ b/content/install-hook-userstyles.js @@ -219,7 +219,12 @@ if (url.startsWith('#')) { resolve(document.getElementById(url.slice(1)).textContent); } else { - chrome.runtime.sendMessage({method: 'download', url}, result => { + chrome.runtime.sendMessage({ + url, + method: 'download', + // USO can't handle POST requests for style json + body: null, + }, result => { const error = result && result.__ERROR__; if (error) { alert('Error' + (error ? '\n' + error : ''));