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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 let rawFilters = document.getElementById("rawFilters"); | 608 let rawFilters = document.getElementById("rawFilters"); |
609 let filters = []; | 609 let filters = []; |
610 | 610 |
611 if (rawFilters.style.display != "table-row") | 611 if (rawFilters.style.display != "table-row") |
612 { | 612 { |
613 rawFilters.style.display = "table-row"; | 613 rawFilters.style.display = "table-row"; |
614 for (let option of document.getElementById("userFiltersBox").options) | 614 for (let option of document.getElementById("userFiltersBox").options) |
615 filters.push(option.value); | 615 filters.push(option.value); |
616 } | 616 } |
617 else | 617 else |
| 618 { |
618 rawFilters.style.display = "none"; | 619 rawFilters.style.display = "none"; |
| 620 } |
619 | 621 |
620 document.getElementById("rawFiltersText").value = filters.join("\n"); | 622 document.getElementById("rawFiltersText").value = filters.join("\n"); |
621 } | 623 } |
622 | 624 |
623 // Imports filters in the raw text box | 625 // Imports filters in the raw text box |
624 function importRawFiltersText() | 626 function importRawFiltersText() |
625 { | 627 { |
626 let text = document.getElementById("rawFiltersText").value; | 628 let text = document.getElementById("rawFiltersText").value; |
627 | 629 |
628 importRawFilters(text, true, errors => | 630 importRawFilters(text, true, errors => |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 onFilterMessage(message.action, message.args[0]); | 739 onFilterMessage(message.action, message.args[0]); |
738 break; | 740 break; |
739 case "prefs.respond": | 741 case "prefs.respond": |
740 onPrefMessage(message.action, message.args[0]); | 742 onPrefMessage(message.action, message.args[0]); |
741 break; | 743 break; |
742 case "subscriptions.respond": | 744 case "subscriptions.respond": |
743 onSubscriptionMessage(message.action, message.args[0]); | 745 onSubscriptionMessage(message.action, message.args[0]); |
744 break; | 746 break; |
745 } | 747 } |
746 }); | 748 }); |
LEFT | RIGHT |