michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: var hunspell, dir; michael@0: michael@0: function startup(data) { michael@0: hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"] michael@0: .getService(Components.interfaces.mozISpellCheckingEngine); michael@0: dir = data.installPath.clone(); michael@0: dir.append("dictionaries"); michael@0: hunspell.addDirectory(dir); michael@0: } michael@0: michael@0: function shutdown() { michael@0: hunspell.removeDirectory(dir); michael@0: }