OLD | NEW |
1 var backgroundPage = chrome.extension.getBackgroundPage(); | 1 var backgroundPage = chrome.extension.getBackgroundPage(); |
2 var imports = ["FilterStorage", "FilterNotifier", "Subscription", "SpecialSubscr
iption", | 2 var imports = ["FilterStorage", "FilterNotifier", "Subscription", "SpecialSubscr
iption", |
3 "DownloadableSubscription", "Filter", "WhitelistFilter", | 3 "DownloadableSubscription", "Filter", "WhitelistFilter", |
4 "Synchronizer", "Prefs", "Utils", "require"]; | 4 "Synchronizer", "Prefs", "Utils", "require"]; |
5 for (var i = 0; i < imports.length; i++) | 5 for (var i = 0; i < imports.length; i++) |
6 window[imports[i]] = backgroundPage[imports[i]]; | 6 window[imports[i]] = backgroundPage[imports[i]]; |
7 | 7 |
8 // Loads options from localStorage and sets UI elements accordingly | 8 // Loads options from localStorage and sets UI elements accordingly |
9 function loadOptions() | 9 function loadOptions() |
10 { | 10 { |
11 loadI18nStrings(); | |
12 | |
13 // Set page title to i18n version of "Adblock Plus Options" | 11 // Set page title to i18n version of "Adblock Plus Options" |
14 document.title = chrome.i18n.getMessage("options"); | 12 document.title = chrome.i18n.getMessage("options"); |
15 | 13 |
16 // Set links | 14 // Set links |
17 $("#acceptableAdsLink").attr("href", Prefs.subscriptions_exceptionsurl); | 15 $("#acceptableAdsLink").attr("href", Prefs.subscriptions_exceptionsurl); |
18 $("#acceptableAdsDocs").attr("href", Prefs.documentation_link.replace(/%LINK%/
g, "acceptable_ads").replace(/%LANG%/g, Utils.appLocale)); | 16 $("#acceptableAdsDocs").attr("href", Prefs.documentation_link.replace(/%LINK%/
g, "acceptable_ads").replace(/%LANG%/g, Utils.appLocale)); |
19 | 17 |
20 // Add event listeners | 18 // Add event listeners |
21 window.addEventListener("unload", unloadOptions, false); | 19 window.addEventListener("unload", unloadOptions, false); |
22 $("#updateFilterLists").click(updateFilterLists); | 20 $("#updateFilterLists").click(updateFilterLists); |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 if (subscription.disabled == !enabled.checked) | 577 if (subscription.disabled == !enabled.checked) |
580 return; | 578 return; |
581 | 579 |
582 subscription.disabled = !enabled.checked; | 580 subscription.disabled = !enabled.checked; |
583 }, false); | 581 }, false); |
584 | 582 |
585 updateSubscriptionInfo(element); | 583 updateSubscriptionInfo(element); |
586 | 584 |
587 document.getElementById("filterLists").appendChild(element); | 585 document.getElementById("filterLists").appendChild(element); |
588 } | 586 } |
OLD | NEW |