Preferences/__init__.py

branch
QtWebEngine
changeset 4847
a1a8eac81b54
parent 4845
2d22ff71c005
child 4859
36c4b21c9f7b
--- a/Preferences/__init__.py	Sat Mar 12 17:02:04 2016 +0100
+++ b/Preferences/__init__.py	Sat Mar 12 20:05:01 2016 +0100
@@ -1065,6 +1065,11 @@
         "SyncFtpPort": 21,
         "SyncFtpIdleTimeout": 30,
         "SyncDirectoryPath": "",
+        # AdBlock
+        "AdBlockEnabled": False,
+        "AdBlockSubscriptions": [],
+        "AdBlockUpdatePeriod": 1,
+        "AdBlockExceptions": [],
         # Flash Cookie Manager: identical to helpDefaults
         # PIM:                  identical to helpDefaults
         # VirusTotal:           identical to helpDefaults
@@ -2787,7 +2792,6 @@
 ##    elif key in ["StartupBehavior",
 ##                 "OfflineStorageDatabaseQuota",
 ##                 "OfflineWebApplicationCacheQuota", "CachePolicy",
-##                 "AdBlockUpdatePeriod",
 ##                  ]:
     elif key in ["StartupBehavior", "HistoryLimit",
                  "DownloadManagerRemovePolicy","SyncType", "SyncFtpPort",
@@ -2796,10 +2800,11 @@
                  "DefaultFontSize", "DefaultFixedFontSize",
                  "MinimumFontSize", "MinimumLogicalFontSize",
                  "DiskCacheSize", "AcceptCookies", "KeepCookiesUntil",
+                 "AdBlockUpdatePeriod",
                  ]:
         return int(prefClass.settings.value(
             "WebBrowser/" + key, prefClass.webBrowserDefaults[key]))
-##    elif key in ["PrintBackgrounds", "AdBlockEnabled"
+##    elif key in ["PrintBackgrounds",
 ##                 "JavaEnabled",
 ##                 "JavaScriptCanCloseWindows",
 ##                 "PluginsEnabled", "DnsPrefetchEnabled",
@@ -2822,13 +2827,14 @@
                  "SyncEncryptData", "SyncEncryptPasswordsOnly",
                  "ShowPreview", "WebInspectorEnabled", "DiskCacheEnabled",
                  "DoNotTrack", "SendReferer", "FilterTrackingCookies",
+                 "AdBlockEnabled", 
                  ]:
         return toBool(prefClass.settings.value(
             "WebBrowser/" + key, prefClass.webBrowserDefaults[key]))
-##    elif key in ["AdBlockSubscriptions", "AdBlockExceptions",
-##                 "ClickToFlashWhitelist",
+##    elif key in ["ClickToFlashWhitelist",
 ##                 "NoCacheHosts",
     elif key in ["GreaseMonkeyDisabledScripts", "SendRefererWhitelist",
+                 "AdBlockSubscriptions", "AdBlockExceptions",
                  ]:
         return toList(prefClass.settings.value(
             "WebBrowser/" + key, prefClass.helpDefaults[key]))

eric ide

mercurial