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

Side by Side Diff: options.js

Issue 5721433737003008: Issue 1985 - Replaced __proto__ with Object.create() and Object.getPrototypeOf() (Closed)
Patch Set: Created Feb. 11, 2015, 11:51 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/whitelisting.js ('k') | qunit/common.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 try 546 try
547 { 547 {
548 add = parseFilters(text, true); 548 add = parseFilters(text, true);
549 } 549 }
550 catch (error) 550 catch (error)
551 { 551 {
552 alert(error); 552 alert(error);
553 return; 553 return;
554 } 554 }
555 555
556 var seenFilter = {__proto__: null}; 556 var seenFilter = Object.create(null);
557 for (var i = 0; i < add.length; i++) 557 for (var i = 0; i < add.length; i++)
558 { 558 {
559 var filter = add[i]; 559 var filter = add[i];
560 FilterStorage.addFilter(filter); 560 FilterStorage.addFilter(filter);
561 seenFilter[filter.text] = null; 561 seenFilter[filter.text] = null;
562 } 562 }
563 563
564 var remove = []; 564 var remove = [];
565 for (var i = 0; i < FilterStorage.subscriptions.length; i++) 565 for (var i = 0; i < FilterStorage.subscriptions.length; i++)
566 { 566 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 links[i].href = arguments[i + 1]; 643 links[i].href = arguments[i + 1];
644 links[i].setAttribute("target", "_blank"); 644 links[i].setAttribute("target", "_blank");
645 } 645 }
646 else if (typeof arguments[i + 1] == "function") 646 else if (typeof arguments[i + 1] == "function")
647 { 647 {
648 links[i].href = "javascript:void(0);"; 648 links[i].href = "javascript:void(0);";
649 links[i].addEventListener("click", arguments[i + 1], false); 649 links[i].addEventListener("click", arguments[i + 1], false);
650 } 650 }
651 } 651 }
652 } 652 }
OLDNEW
« no previous file with comments | « lib/whitelisting.js ('k') | qunit/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld