Index: lib/utils.js |
diff --git a/lib/utils.js b/lib/utils.js |
index e218dab6258ccbecc283e62c3d27c155cf973774..48e1f1fe3813435aef537cea77e95083e94c6018 100644 |
--- a/lib/utils.js |
+++ b/lib/utils.js |
@@ -79,46 +79,6 @@ let Utils = exports.Utils = { |
return null; |
}, |
- chooseFilterSubscription(subscriptions) |
- { |
- let selectedItem = null; |
- let selectedPrefix = null; |
- let matchCount = 0; |
- for (let subscription of subscriptions) |
- { |
- if (!selectedItem) |
- selectedItem = subscription; |
- |
- let prefix = Utils.checkLocalePrefixMatch( |
- subscription.getAttribute("prefixes") |
- ); |
- if (prefix) |
- { |
- if (!selectedPrefix || selectedPrefix.length < prefix.length) |
- { |
- selectedItem = subscription; |
- selectedPrefix = prefix; |
- matchCount = 1; |
- } |
- else if (selectedPrefix && selectedPrefix.length == prefix.length) |
- { |
- matchCount++; |
- |
- // If multiple items have a matching prefix of the same length: |
- // Select one of the items randomly, probability should be the same |
- // for all items. So we replace the previous match here with |
- // probability 1/N (N being the number of matches). |
- if (Math.random() * matchCount < 1) |
- { |
- selectedItem = subscription; |
- selectedPrefix = prefix; |
- } |
- } |
- } |
- } |
- return selectedItem; |
- }, |
- |
getDocLink(linkID) |
{ |
let docLink = require("prefs").Prefs.documentation_link; |