Add mimetype to XHR call
This silences warnings about the JSON files being ill-formed
This commit is contained in:
parent
5e0ac4e8ea
commit
28de6a4d6e
@ -237,6 +237,7 @@ class Translator {
|
||||
|
||||
static loadData(url, callback) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.overrideMimeType("application/json");
|
||||
xhr.addEventListener('load', () => callback(xhr.responseText));
|
||||
xhr.open('GET', chrome.extension.getURL(url), true);
|
||||
xhr.send();
|
||||
|
Loading…
Reference in New Issue
Block a user