OLD | NEW |
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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 Loading... |
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 Safari < 6 |
| 67 var info = require("info"); |
| 68 if (info.platform == "safari" && Services.vc.compare(info.platformVersion, "
6.0") < 0) |
| 69 E("legacySafariWarning").removeAttribute("hidden"); |
| 70 |
66 // Set up feature buttons linked to subscriptions | 71 // Set up feature buttons linked to subscriptions |
67 featureSubscriptions.forEach(setToggleSubscriptionButton); | 72 featureSubscriptions.forEach(setToggleSubscriptionButton); |
68 var filterListener = function(action) | 73 var filterListener = function(action) |
69 { | 74 { |
70 if (/^subscription\.(added|removed|disabled)$/.test(action)) | 75 if (/^subscription\.(added|removed|disabled)$/.test(action)) |
71 { | 76 { |
72 for (var i = 0; i < featureSubscriptions.length; i++) | 77 for (var i = 0; i < featureSubscriptions.length; i++) |
73 { | 78 { |
74 var featureSubscription = featureSubscriptions[i]; | 79 var featureSubscription = featureSubscriptions[i]; |
75 updateToggleButton(featureSubscription.feature, isSubscriptionEnabled(
featureSubscription)); | 80 updateToggleButton(featureSubscription.feature, isSubscriptionEnabled(
featureSubscription)); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 { | 239 { |
235 var button = E("toggle-" + feature); | 240 var button = E("toggle-" + feature); |
236 if (isEnabled) | 241 if (isEnabled) |
237 button.classList.remove("off"); | 242 button.classList.remove("off"); |
238 else | 243 else |
239 button.classList.add("off"); | 244 button.classList.add("off"); |
240 } | 245 } |
241 | 246 |
242 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 247 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
243 })(); | 248 })(); |
OLD | NEW |