Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: options.js

Issue 5279235799252992: Issue 491 - Validate custom filters (Closed)
Left Patch Set: Created Nov. 19, 2014, 3:26 p.m.
Right Patch Set: Improved test messages Created Nov. 21, 2014, 8:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « metadata.common ('k') | qunit/index.html » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld