Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/firstRun.js

Issue 5450822905233408: Issue 417 - Reinitializing removed filter lists (Core/Firefox) (Closed)
Patch Set: Created May 26, 2014, 10:22 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criter ia"), openFilters); 56 setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criter ia"), openFilters);
57 setLinks("share-headline", Utils.getDocLink("contribute")); 57 setLinks("share-headline", Utils.getDocLink("contribute"));
58 58
59 // Show warning if data corruption was detected 59 // Show warning if data corruption was detected
60 if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruptio n) 60 if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruptio n)
61 { 61 {
62 E("dataCorruptionWarning").removeAttribute("hidden"); 62 E("dataCorruptionWarning").removeAttribute("hidden");
63 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filt erstorage")); 63 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filt erstorage"));
64 } 64 }
65 65
66 // Show warning if filterlists settings were reinitialized
67 var filterlistsReinitialized = false;
68 if (typeof backgroundPage != "undefined")
69 filterlistsReinitialized = backgroundPage.filterlistsReinitialized;
70 else
71 {
72 var UI = require("ui").UI;
73 filterlistsReinitialized = (typeof UI != "undefined" && UI.filterlistsRein itialized);
74 }
75 if (filterlistsReinitialized)
76 {
77 E("filterlistsReinitializedWarning").removeAttribute("hidden");
78 setLinks("filterlistsReinitializedWarning", openFilters);
79 }
80
66 // Show warning if Safari version isn't supported 81 // Show warning if Safari version isn't supported
67 var info = require("info"); 82 var info = require("info");
68 if (info.platform == "safari" && ( 83 if (info.platform == "safari" && (
69 Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload br eaks websites in Safari 5 84 Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload br eaks websites in Safari 5
70 Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions ar e broken in 6.1 and 7.0 85 Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions ar e broken in 6.1 and 7.0
71 Services.vc.compare(info.platformVersion, "7.0") == 0 86 Services.vc.compare(info.platformVersion, "7.0") == 0
72 )) 87 ))
73 E("legacySafariWarning").removeAttribute("hidden"); 88 E("legacySafariWarning").removeAttribute("hidden");
74 89
75 // Set up feature buttons linked to subscriptions 90 // Set up feature buttons linked to subscriptions
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 { 249 {
235 var button = E("toggle-" + feature); 250 var button = E("toggle-" + feature);
236 if (isEnabled) 251 if (isEnabled)
237 button.classList.remove("off"); 252 button.classList.remove("off");
238 else 253 else
239 button.classList.add("off"); 254 button.classList.add("off");
240 } 255 }
241 256
242 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 257 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
243 })(); 258 })();
OLDNEW

Powered by Google App Engine
This is Rietveld