diff options
author | ispedals <ispedals@users.noreply.github.com> | 2016-06-18 18:29:49 -0400 |
---|---|---|
committer | ispedals <ispedals@users.noreply.github.com> | 2016-06-19 12:54:27 -0400 |
commit | 28de6a4d6ecac9dade41f511c426fc16a443c537 (patch) | |
tree | 9637941e934435ab4534c9e3331008c653ecffed /ext/bg/js/translator.js | |
parent | 5e0ac4e8ea32c3e33de38db02d7dcbebfdd05cda (diff) |
Add mimetype to XHR call
This silences warnings about the JSON files being ill-formed
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r-- | ext/bg/js/translator.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 261196d2..d79ec6d1 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -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(); |