LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 } | 543 } |
544 | 544 |
545 // Imports filters in the raw text box | 545 // Imports filters in the raw text box |
546 function importRawFiltersText() | 546 function importRawFiltersText() |
547 { | 547 { |
548 var text = document.getElementById("rawFiltersText").value; | 548 var text = document.getElementById("rawFiltersText").value; |
549 | 549 |
550 var add; | 550 var add; |
551 try | 551 try |
552 { | 552 { |
553 add = parseFilters(text); | 553 add = parseFilters(text, true); |
554 } | 554 } |
555 catch (error) | 555 catch (error) |
556 { | 556 { |
557 alert(error); | 557 alert(error); |
558 return; | 558 return; |
559 } | 559 } |
560 | 560 |
561 var seenFilter = {__proto__: null}; | 561 var seenFilter = {__proto__: null}; |
562 for (var i = 0; i < add.length; i++) | 562 for (var i = 0; i < add.length; i++) |
563 { | 563 { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 links[i].href = arguments[i + 1]; | 648 links[i].href = arguments[i + 1]; |
649 links[i].setAttribute("target", "_blank"); | 649 links[i].setAttribute("target", "_blank"); |
650 } | 650 } |
651 else if (typeof arguments[i + 1] == "function") | 651 else if (typeof arguments[i + 1] == "function") |
652 { | 652 { |
653 links[i].href = "javascript:void(0);"; | 653 links[i].href = "javascript:void(0);"; |
654 links[i].addEventListener("click", arguments[i + 1], false); | 654 links[i].addEventListener("click", arguments[i + 1], false); |
655 } | 655 } |
656 } | 656 } |
657 } | 657 } |
LEFT | RIGHT |