Left: | ||
Right: |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 | 46 |
47 function onDOMLoaded() | 47 function onDOMLoaded() |
48 { | 48 { |
49 // Show warning if data corruption was detected | 49 // Show warning if data corruption was detected |
50 if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruptio n) | 50 if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruptio n) |
51 { | 51 { |
52 E("dataCorruptionWarning").removeAttribute("hidden"); | 52 E("dataCorruptionWarning").removeAttribute("hidden"); |
53 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filt erstorage")); | 53 setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filt erstorage")); |
54 } | 54 } |
55 | 55 |
56 // Show warning if Safari < 6 | |
57 var info = require('info'); | |
Wladimir Palant
2013/09/10 06:53:46
Nit: Please use double quotation marks unless ther
| |
58 if (info.platform == "safari" && info.platformVersion.split(".") < [6]) | |
Wladimir Palant
2013/09/10 06:53:46
This is JavaScript, not Python ;)
Please have a l
Sebastian Noack
2013/09/10 10:56:29
Services.vc.compare is Firefox specific, isn't it?
Wladimir Palant
2013/09/10 11:10:14
No, we also have our own version comparator implem
Wladimir Palant
2013/09/10 11:12:52
Argh, should be: "implicitly converts the latter t
Sebastian Noack
2013/09/10 14:20:57
Well, "12.0".split(".")[0] < 6, returns false as i
Wladimir Palant
2013/09/10 14:34:21
Never mind, my bad. Regardless, the version compar
| |
59 E("legacySafariWarning").removeAttribute("hidden"); | |
60 | |
56 // Set up URL | 61 // Set up URL |
57 setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criter ia"), openFilters); | 62 setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criter ia"), openFilters); |
58 | 63 |
59 shade = E("shade"); | 64 shade = E("shade"); |
60 shade.addEventListener("mouseover", scrollPage, false); | 65 shade.addEventListener("mouseover", scrollPage, false); |
61 shade.addEventListener("mouseout", stopScroll, false); | 66 shade.addEventListener("mouseout", stopScroll, false); |
62 | 67 |
63 // Set up feature buttons linked to subscriptions | 68 // Set up feature buttons linked to subscriptions |
64 featureSubscriptions.forEach(setToggleSubscriptionButton); | 69 featureSubscriptions.forEach(setToggleSubscriptionButton); |
65 var filterListener = function(action) | 70 var filterListener = function(action) |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 { | 262 { |
258 var button = E("toggle-" + feature); | 263 var button = E("toggle-" + feature); |
259 if (isEnabled) | 264 if (isEnabled) |
260 button.classList.remove("off"); | 265 button.classList.remove("off"); |
261 else | 266 else |
262 button.classList.add("off"); | 267 button.classList.add("off"); |
263 } | 268 } |
264 | 269 |
265 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 270 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
266 })(); | 271 })(); |
OLD | NEW |