aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-02-14 07:59:11 +0000
committerStephen Blott2016-02-14 07:59:11 +0000
commitceada9cdf8cb97c35b4871553e3c8b642c4806ef (patch)
treec43ea1999749893f5c1132ab6355c46772b94f4d /background_scripts
parent54b8957942545b89989a5c8b71238d60be6349e5 (diff)
parent539a7c37d66524304a5047954443ff522f9b82d1 (diff)
downloadvimium-ceada9cdf8cb97c35b4871553e3c8b642c4806ef.tar.bz2
Merge pull request #1991 from smblott-github/nuke-some-migrations
Nuke some legacy migration code.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/exclusions.coffee26
1 files changed, 0 insertions, 26 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee
index 21342d61..95100935 100644
--- a/background_scripts/exclusions.coffee
+++ b/background_scripts/exclusions.coffee
@@ -48,32 +48,6 @@ root.Exclusions = Exclusions =
postUpdateHook: (@rules) ->
RegexpCache.clear()
-# Development and debug only.
-# Enable this (temporarily) to restore legacy exclusion rules from backup.
-if false and Settings.has("excludedUrlsBackup")
- Settings.clear("exclusionRules")
- Settings.set("excludedUrls", Settings.get("excludedUrlsBackup"))
-
-if not Settings.has("exclusionRules") and Settings.has("excludedUrls")
- # Migration from the legacy representation of exclusion rules.
- #
- # In Vimium 1.45 and in github/master on 27 August, 2014, exclusion rules are represented by the setting:
- # excludedUrls: "http*://www.google.com/reader/*\nhttp*://mail.google.com/* jk"
- #
- # The new (equivalent) settings is:
- # exclusionRules: [ { pattern: "http*://www.google.com/reader/*", passKeys: "" }, { pattern: "http*://mail.google.com/*", passKeys: "jk" } ]
-
- parseLegacyRules = (lines) ->
- for line in lines.trim().split("\n").map((line) -> line.trim())
- if line.length and line.indexOf("#") != 0 and line.indexOf('"') != 0
- parse = line.split(/\s+/)
- { pattern: parse[0], passKeys: parse[1..].join("") }
-
- Exclusions.setRules(parseLegacyRules(Settings.get("excludedUrls")))
- # We'll keep a backup of the "excludedUrls" setting, just in case.
- Settings.set("excludedUrlsBackup", Settings.get("excludedUrls")) if not Settings.has("excludedUrlsBackup")
- Settings.clear("excludedUrls")
-
# Register postUpdateHook for exclusionRules setting.
Settings.postUpdateHooks["exclusionRules"] = (value) ->
Exclusions.postUpdateHook value