USO can't handle POST requests for style json
This commit is contained in:
parent
64f18ab901
commit
40054902e9
|
@ -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),
|
||||
|
||||
|
|
|
@ -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 : ''));
|
||||
|
|
Loading…
Reference in New Issue
Block a user