@@ -16,13 +16,13 @@ class IBDAWG { // INDEXABLE BINARY DIRECT ACYCLIC WORD GRAPH - constructor (sDicName) { + constructor (sDicName, sPath="") { try { - let sURL = (typeof(browser) !== 'undefined') ? browser.extension.getURL("grammalecte/_dictionaries/"+sDicName) : "resource://grammalecte/_dictionaries/"+sDicName; + let sURL = (sPath !== "") ? sPath + "/" + sDicName : "resource://grammalecte/_dictionaries/"+sDicName; const dict = JSON.parse(helpers.loadFile(sURL)); Object.assign(this, dict); } catch (e) { throw Error("# Error. File not found or not loadable.\n" + e.message + "\n");