* Set default values for the settings.
()
| 203 | * Set default values for the settings. |
| 204 | */ |
| 205 | function initSettings() { |
| 206 | storage.ClearURLsData = []; |
| 207 | storage.dataHash = ""; |
| 208 | storage.badgedStatus = true; |
| 209 | storage.globalStatus = true; |
| 210 | storage.totalCounter = 0; |
| 211 | storage.cleanedCounter = 0; |
| 212 | storage.hashStatus = "error"; |
| 213 | storage.loggingStatus = false; |
| 214 | storage.log = {"log": []}; |
| 215 | storage.statisticsStatus = true; |
| 216 | storage.badged_color = "#ffa500"; |
| 217 | storage.hashURL = "https://rules2.clearurls.xyz/rules.minify.hash"; |
| 218 | storage.ruleURL = "https://rules2.clearurls.xyz/data.minify.json"; |
| 219 | storage.contextMenuEnabled = true; |
| 220 | storage.historyListenerEnabled = true; |
| 221 | storage.localHostsSkipping = true; |
| 222 | storage.referralMarketing = false; |
| 223 | storage.logLimit = 100; |
| 224 | storage.domainBlocking = true; |
| 225 | storage.pingBlocking = true; |
| 226 | storage.eTagFiltering = false; |
| 227 | storage.watchDogErrorCount = 0; |
| 228 | |
| 229 | if (getBrowser() === "Firefox") { |
| 230 | storage.types = ["font", "image", "imageset", "main_frame", "media", "object", "object_subrequest", "other", "script", "stylesheet", "sub_frame", "websocket", "xml_dtd", "xmlhttprequest", "xslt"]; |
| 231 | storage.pingRequestTypes = ["ping", "beacon"]; |
| 232 | } else if (getBrowser() === "Chrome") { |
| 233 | storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"]; |
| 234 | storage.pingRequestTypes = ["ping"]; |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Replace the old URLs with the |
no test coverage detected