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

Delta Between Two Patch Sets: options.js

Issue 29369459: Issue 4752 - Improve options page performance for lots of custom filters (Closed)
Left Patch Set: Improve raw filter box toggle performance Created Dec. 21, 2016, 10:40 a.m.
Right Patch Set: Make sure the raw filters text area displays first time Created Dec. 21, 2016, 3:16 p.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 | « no previous file | no next file » | 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 <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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 591
592 // Shows raw filters box and fills it with the current user filters 592 // Shows raw filters box and fills it with the current user filters
593 function toggleFiltersInRawFormat(event) 593 function toggleFiltersInRawFormat(event)
594 { 594 {
595 event.preventDefault(); 595 event.preventDefault();
596 596
597 let rawFilters = document.getElementById("rawFilters"); 597 let rawFilters = document.getElementById("rawFilters");
598 let filters = []; 598 let filters = [];
599 599
600 if (rawFilters.style.display == "none") 600 if (rawFilters.style.display != "table-row")
601 { 601 {
602 rawFilters.style.display = "table-row"; 602 rawFilters.style.display = "table-row";
kzar 2016/12/21 10:44:01 I checked what jQuery was doing when the toggle me
603 for (let option of document.getElementById("userFiltersBox").options) 603 for (let option of document.getElementById("userFiltersBox").options)
604 filters.push(option.value); 604 filters.push(option.value);
605 } 605 }
606 else 606 else
607 { 607 {
608 rawFilters.style.display = "none"; 608 rawFilters.style.display = "none";
609 } 609 }
610 610
611 document.getElementById("rawFiltersText").value = filters.join("\n"); 611 document.getElementById("rawFiltersText").value = filters.join("\n");
612 } 612 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 onFilterMessage(message.action, message.args[0]); 727 onFilterMessage(message.action, message.args[0]);
728 break; 728 break;
729 case "prefs.respond": 729 case "prefs.respond":
730 onPrefMessage(message.action, message.args[0]); 730 onPrefMessage(message.action, message.args[0]);
731 break; 731 break;
732 case "subscriptions.respond": 732 case "subscriptions.respond":
733 onSubscriptionMessage(message.action, message.args[0]); 733 onSubscriptionMessage(message.action, message.args[0]);
734 break; 734 break;
735 } 735 }
736 }); 736 });
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld