| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 53         callback = lastArg; | 53         callback = lastArg; | 
| 54 | 54 | 
| 55       for (let i = 0; i < arguments.length - (callback ? 1 : 0); i++) | 55       for (let i = 0; i < arguments.length - (callback ? 1 : 0); i++) | 
| 56         message[paramKeys[i]] = arguments[i]; | 56         message[paramKeys[i]] = arguments[i]; | 
| 57     } | 57     } | 
| 58 | 58 | 
| 59     ext.backgroundPage.sendMessage(message, callback); | 59     ext.backgroundPage.sendMessage(message, callback); | 
| 60   }; | 60   }; | 
| 61 } | 61 } | 
| 62 | 62 | 
| 63 let getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); | 63 const getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); | 
| 64 let getInfo = wrapper({type: "app.get"}, "what"); | 64 const getInfo = wrapper({type: "app.get"}, "what"); | 
| 65 let getPref = wrapper({type: "prefs.get"}, "key"); | 65 const getPref = wrapper({type: "prefs.get"}, "key"); | 
| 66 let togglePref = wrapper({type: "prefs.toggle"}, "key"); | 66 const togglePref = wrapper({type: "prefs.toggle"}, "key"); | 
| 67 let getSubscriptions = wrapper({type: "subscriptions.get"}, | 67 const getSubscriptions = wrapper({type: "subscriptions.get"}, | 
| 68                                "downloadable", "special"); | 68                                  "downloadable", "special"); | 
| 69 let removeSubscription = wrapper({type: "subscriptions.remove"}, "url"); | 69 const removeSubscription = wrapper({type: "subscriptions.remove"}, "url"); | 
| 70 let addSubscription = wrapper({type: "subscriptions.add"}, | 70 const addSubscription = wrapper({type: "subscriptions.add"}, | 
| 71                                 "url", "title", "homepage"); | 71                                 "url", "title", "homepage"); | 
| 72 let toggleSubscription = wrapper({type: "subscriptions.toggle"}, | 72 const toggleSubscription = wrapper({type: "subscriptions.toggle"}, | 
| 73                                  "url", "keepInstalled"); | 73                                    "url", "keepInstalled"); | 
| 74 let updateSubscription = wrapper({type: "subscriptions.update"}, "url"); | 74 const updateSubscription = wrapper({type: "subscriptions.update"}, "url"); | 
| 75 let importRawFilters = wrapper({type: "filters.importRaw"}, | 75 const importRawFilters = wrapper({type: "filters.importRaw"}, | 
| 76                                "text", "removeExisting"); | 76                                  "text", "removeExisting"); | 
| 77 let addFilter = wrapper({type: "filters.add"}, "text"); | 77 const addFilter = wrapper({type: "filters.add"}, "text"); | 
| 78 let getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); | 78 const getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); | 
| 79 let removeFilter = wrapper({type: "filters.remove"}, "text"); | 79 const removeFilter = wrapper({type: "filters.remove"}, "text"); | 
| 80 | 80 | 
| 81 let 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 | 
| 87 function loadOptions() | 87 function loadOptions() | 
| 88 { | 88 { | 
| 89   // Set page title to i18n version of "Adblock Plus Options" | 89   // Set page title to i18n version of "Adblock Plus Options" | 
| 90   document.title = i18n.getMessage("options"); | 90   document.title = i18n.getMessage("options"); | 
| 91 | 91 | 
| (...skipping 629 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 | 
|---|