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

Side by Side Diff: messageResponder.js

Issue 29339395: Noissue - Make the options page respond to subscription title and homepage changes (Closed)
Patch Set: Created April 5, 2016, 7:05 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 catch (e) 53 catch (e)
54 { 54 {
55 return null; 55 return null;
56 } 56 }
57 } 57 }
58 58
59 function convertObject(keys, obj) 59 function convertObject(keys, obj)
60 { 60 {
61 var result = {}; 61 var result = {};
62 for (var i = 0; i < keys.length; i++) 62 for (var i = 0; i < keys.length; i++)
63 result[keys[i]] = obj[keys[i]]; 63 {
64 var key = keys[i];
Sebastian Noack 2016/04/05 19:09:54 As per the comment in background.js we don't set t
65 if (key in obj)
66 result[key] = obj[key];
67 }
64 return result; 68 return result;
65 } 69 }
66 70
67 function convertSubscription(subscription) 71 function convertSubscription(subscription)
68 { 72 {
69 var obj = convertObject(["disabled", "downloadStatus", "homepage", 73 var obj = convertObject(["disabled", "downloadStatus", "homepage",
70 "lastDownload", "title", "url"], subscription); 74 "lastDownload", "title", "url"], subscription);
71 obj.isDownloading = Synchronizer.isExecuting(subscription); 75 obj.isDownloading = Synchronizer.isExecuting(subscription);
72 return obj; 76 return obj;
73 } 77 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 for (var i = 0; i < subscriptions.length; i++) 402 for (var i = 0; i < subscriptions.length; i++)
399 { 403 {
400 var subscription = subscriptions[i]; 404 var subscription = subscriptions[i];
401 if (subscription instanceof DownloadableSubscription) 405 if (subscription instanceof DownloadableSubscription)
402 Synchronizer.execute(subscription, true); 406 Synchronizer.execute(subscription, true);
403 } 407 }
404 break; 408 break;
405 } 409 }
406 }); 410 });
407 })(this); 411 })(this);
OLDNEW

Powered by Google App Engine
This is Rietveld