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

Delta Between Two Patch Sets: chrome/content/ui/firstRun.js

Issue 5450822905233408: Issue 417 - Reinitializing removed filter lists (Core/Firefox) (Closed)
Left Patch Set: Created May 26, 2014, 10:22 a.m.
Right Patch Set: Moved check to Platform code Created May 26, 2014, 5:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/content/ui/firstRun.html ('k') | chrome/locale/en-US/firstRun.properties » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Set up URLs 49 // Set up URLs
50 var donateLink = E("donate"); 50 var donateLink = E("donate");
51 donateLink.href = Utils.getDocLink("donate"); 51 donateLink.href = Utils.getDocLink("donate");
52 52
53 var contributors = E("contributors"); 53 var contributors = E("contributors");
54 contributors.href = Utils.getDocLink("contributors"); 54 contributors.href = Utils.getDocLink("contributors");
55 55
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
60 if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruptio n)
61 {
62 E("dataCorruptionWarning").removeAttribute("hidden");
63 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filt erstorage"));
64 }
65
66 // Show warning if filterlists settings were reinitialized
67 var filterlistsReinitialized = false;
68 if (typeof backgroundPage != "undefined") 59 if (typeof backgroundPage != "undefined")
69 filterlistsReinitialized = backgroundPage.filterlistsReinitialized; 60 {
70 else 61 // Show warning if data corruption was detected
71 { 62 if (backgroundPage.seenDataCorruption)
72 var UI = require("ui").UI; 63 {
73 filterlistsReinitialized = (typeof UI != "undefined" && UI.filterlistsRein itialized); 64 E("dataCorruptionWarning").removeAttribute("hidden");
74 } 65 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_fi lterstorage"));
75 if (filterlistsReinitialized) 66 }
76 { 67
77 E("filterlistsReinitializedWarning").removeAttribute("hidden"); 68 // Show warning if filterlists settings were reinitialized
78 setLinks("filterlistsReinitializedWarning", openFilters); 69 if (backgroundPage.filterlistsReinitialized)
70 {
71 E("filterlistsReinitializedWarning").removeAttribute("hidden");
72 setLinks("filterlistsReinitializedWarning", openFilters);
73 }
79 } 74 }
80 75
81 // Show warning if Safari version isn't supported 76 // Show warning if Safari version isn't supported
82 var info = require("info"); 77 var info = require("info");
83 if (info.platform == "safari" && ( 78 if (info.platform == "safari" && (
84 Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload br eaks websites in Safari 5 79 Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload br eaks websites in Safari 5
85 Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions ar e broken in 6.1 and 7.0 80 Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions ar e broken in 6.1 and 7.0
86 Services.vc.compare(info.platformVersion, "7.0") == 0 81 Services.vc.compare(info.platformVersion, "7.0") == 0
87 )) 82 ))
88 E("legacySafariWarning").removeAttribute("hidden"); 83 E("legacySafariWarning").removeAttribute("hidden");
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 { 244 {
250 var button = E("toggle-" + feature); 245 var button = E("toggle-" + feature);
251 if (isEnabled) 246 if (isEnabled)
252 button.classList.remove("off"); 247 button.classList.remove("off");
253 else 248 else
254 button.classList.add("off"); 249 button.classList.add("off");
255 } 250 }
256 251
257 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 252 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
258 })(); 253 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld