LEFT | RIGHT |
1 var backgroundPage = opera.extension.bgProcess; | 1 var backgroundPage = opera.extension.bgProcess; |
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 { |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Display jQuery UI elements | 33 // Display jQuery UI elements |
34 $("#tabs").tabs(); | 34 $("#tabs").tabs(); |
35 $("button").button(); | 35 $("button").button(); |
36 $(".refreshButton").button("option", "icons", {primary: "ui-icon-refresh"}); | 36 $(".refreshButton").button("option", "icons", {primary: "ui-icon-refresh"}); |
37 $(".addButton").button("option", "icons", {primary: "ui-icon-plus"}); | 37 $(".addButton").button("option", "icons", {primary: "ui-icon-plus"}); |
38 $(".removeButton").button("option", "icons", {primary: "ui-icon-minus"}); | 38 $(".removeButton").button("option", "icons", {primary: "ui-icon-minus"}); |
39 | 39 |
40 // Popuplate option checkboxes | 40 // Popuplate option checkboxes |
41 initCheckbox("shouldShowIcon"); | 41 initCheckbox("shouldShowIcon"); |
42 initCheckbox("shouldShowBlockElementMenu"); | 42 $("#shouldShowIcon").click(backgroundPage.refreshToolbarButton); |
43 initCheckbox("disableInlineTextAds"); | |
44 initCheckbox("hidePlaceholders"); | |
45 | 43 |
46 // Load recommended subscriptions | 44 // Load recommended subscriptions |
47 loadRecommendations(); | 45 loadRecommendations(); |
48 | 46 |
49 // Show user's filters | 47 // Show user's filters |
50 reloadFilters(); | 48 reloadFilters(); |
51 } | 49 } |
52 $(loadOptions); | 50 $(loadOptions); |
53 | 51 |
54 // Reloads the displayed subscriptions and filters | 52 // Reloads the displayed subscriptions and filters |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 if (subscription.disabled == !enabled.checked) | 575 if (subscription.disabled == !enabled.checked) |
578 return; | 576 return; |
579 | 577 |
580 subscription.disabled = !enabled.checked; | 578 subscription.disabled = !enabled.checked; |
581 }, false); | 579 }, false); |
582 | 580 |
583 updateSubscriptionInfo(element); | 581 updateSubscriptionInfo(element); |
584 | 582 |
585 document.getElementById("filterLists").appendChild(element); | 583 document.getElementById("filterLists").appendChild(element); |
586 } | 584 } |
LEFT | RIGHT |