LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 ext.backgroundPage.sendMessage(message, callback); | 59 ext.backgroundPage.sendMessage(message, callback); |
60 }; | 60 }; |
61 } | 61 } |
62 | 62 |
63 const getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); | 63 const getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); |
64 const getInfo = wrapper({type: "app.get"}, "what"); | 64 const getInfo = wrapper({type: "app.get"}, "what"); |
65 const getPref = wrapper({type: "prefs.get"}, "key"); | 65 const getPref = wrapper({type: "prefs.get"}, "key"); |
66 const togglePref = wrapper({type: "prefs.toggle"}, "key"); | 66 const togglePref = wrapper({type: "prefs.toggle"}, "key"); |
67 const getSubscriptions = wrapper({type: "subscriptions.get"}, | 67 const getSubscriptions = wrapper({type: "subscriptions.get"}, |
68 "downloadable", "special"); | 68 "downloadable", "special"); |
69 const removeSubscription = wrapper({type: "subscriptions.remove"}, "url"); | 69 const removeSubscription = wrapper({type: "subscriptions.remove"}, "url"); |
70 const addSubscription = wrapper({type: "subscriptions.add"}, | 70 const addSubscription = wrapper({type: "subscriptions.add"}, |
71 "url", "title", "homepage"); | 71 "url", "title", "homepage"); |
72 const toggleSubscription = wrapper({type: "subscriptions.toggle"}, | 72 const toggleSubscription = wrapper({type: "subscriptions.toggle"}, |
73 "url", "keepInstalled"); | 73 "url", "keepInstalled"); |
74 const updateSubscription = wrapper({type: "subscriptions.update"}, "url"); | 74 const updateSubscription = wrapper({type: "subscriptions.update"}, "url"); |
75 const importRawFilters = wrapper({type: "filters.importRaw"}, | 75 const importRawFilters = wrapper({type: "filters.importRaw"}, |
76 "text", "removeExisting"); | 76 "text", "removeExisting"); |
77 const addFilter = wrapper({type: "filters.add"}, "text"); | 77 const addFilter = wrapper({type: "filters.add"}, "text"); |
78 const getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); | 78 const getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); |
79 const removeFilter = wrapper({type: "filters.remove"}, "text"); | 79 const removeFilter = wrapper({type: "filters.remove"}, "text"); |
80 | 80 |
81 const whitelistedDomainRegexp = /^@@\|\|([^\/:]+)\^\$document$/; | 81 const whitelistedDomainRegexp = /^@@\|\|([^\/:]+)\^\$document$/; |
82 let delayedSubscriptionSelection = null; | 82 let delayedSubscriptionSelection = null; |
83 | 83 |
84 let acceptableAdsUrl; | 84 let acceptableAdsUrl; |
85 | 85 |
86 // Loads options from localStorage and sets UI elements accordingly | 86 // Loads options from localStorage and sets UI elements accordingly |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 onFilterMessage(message.action, message.args[0]); | 721 onFilterMessage(message.action, message.args[0]); |
722 break; | 722 break; |
723 case "prefs.respond": | 723 case "prefs.respond": |
724 onPrefMessage(message.action, message.args[0]); | 724 onPrefMessage(message.action, message.args[0]); |
725 break; | 725 break; |
726 case "subscriptions.respond": | 726 case "subscriptions.respond": |
727 onSubscriptionMessage(message.action, message.args[0]); | 727 onSubscriptionMessage(message.action, message.args[0]); |
728 break; | 728 break; |
729 } | 729 } |
730 }); | 730 }); |
LEFT | RIGHT |