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

Side by Side Diff: options.js

Issue 29339392: Noissue - Don't update items for each change seperately (Closed)
Patch Set: Created April 5, 2016, 6:50 p.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 | « no previous file | no next file » | 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-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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 collections.allLangs.removeItem(subscription); 397 collections.allLangs.removeItem(subscription);
398 collections.langs.addItems(subscription); 398 collections.langs.addItems(subscription);
399 } 399 }
400 else 400 else
401 { 401 {
402 collections.allLangs.addItems(subscription); 402 collections.allLangs.addItems(subscription);
403 collections.langs.removeItem(subscription); 403 collections.langs.removeItem(subscription);
404 } 404 }
405 } 405 }
406 } 406 }
407 for (var i in collections)
408 collections[i].updateItem(subscription);
409 } 407 }
408
409 for (var name in collections)
410 collections[name].updateItem(subscription);
410 } 411 }
411 412
412 if (!Object.observe) 413 if (!Object.observe)
413 { 414 {
414 Object.keys(subscription).forEach(function(property) 415 Object.keys(subscription).forEach(function(property)
415 { 416 {
416 var value = subscription[property]; 417 var value = subscription[property];
417 Object.defineProperty(subscription, property, 418 Object.defineProperty(subscription, property,
418 { 419 {
419 get: function() 420 get: function()
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 }); 1164 });
1164 ext.backgroundPage.sendMessage( 1165 ext.backgroundPage.sendMessage(
1165 { 1166 {
1166 type: "subscriptions.listen", 1167 type: "subscriptions.listen",
1167 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1168 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1168 "title", "downloadStatus", "downloading"] 1169 "title", "downloadStatus", "downloading"]
1169 }); 1170 });
1170 1171
1171 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1172 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1172 })(); 1173 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld