From 28de6a4d6ecac9dade41f511c426fc16a443c537 Mon Sep 17 00:00:00 2001 From: ispedals Date: Sat, 18 Jun 2016 18:29:49 -0400 Subject: Add mimetype to XHR call This silences warnings about the JSON files being ill-formed --- ext/bg/js/translator.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/bg/js/translator.js') 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(); -- cgit v1.2.3