diff options
Diffstat (limited to 'js/storage.js')
-rw-r--r-- | js/storage.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/storage.js b/js/storage.js index 469ee7e..fd51235 100644 --- a/js/storage.js +++ b/js/storage.js @@ -26,6 +26,7 @@ 'use strict'; Components.utils.import('chrome://ematrix/content/lib/PublicSuffixList.jsm'); +Components.utils.import('chrome://ematrix/content/lib/Tools.jsm'); /******************************************************************************/ @@ -113,7 +114,7 @@ Components.utils.import('chrome://ematrix/content/lib/PublicSuffixList.jsm'); ηMatrix.rawSettingsFromString = function(raw) { var result = {}, - lineIter = new this.LineIterator(raw), + lineIter = new Tools.LineIterator(raw), line, matches, name, value; while ( lineIter.eot() === false ) { line = lineIter.next().trim(); @@ -193,14 +194,14 @@ Components.utils.import('chrome://ematrix/content/lib/PublicSuffixList.jsm'); var out = new Set(), reIgnore = /^[!#]/, reValid = /^[a-z-]+:\/\/\S+/, - lineIter = new this.LineIterator(raw), + lineIter = new Tools.LineIterator(raw), location; while ( lineIter.eot() === false ) { location = lineIter.next().trim(); if ( reIgnore.test(location) || !reValid.test(location) ) { continue; } out.add(location); } - return this.setToArray(out); + return Tools.setToArray(out); }; /******************************************************************************/ @@ -487,7 +488,7 @@ Components.utils.import('chrome://ematrix/content/lib/PublicSuffixList.jsm'); title: assetKey }; } - externalHostsFiles = this.setToArray(importedSet).sort().join('\n'); + externalHostsFiles = Tools.setToArray(importedSet).sort().join('\n'); } if ( externalHostsFiles !== this.userSettings.externalHostsFiles ) { |