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

Side by Side Diff: lib/prefs.js

Issue 11627039: Added ad counting functionality (Closed)
Patch Set: Created Sept. 11, 2013, 3:10 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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 15 matching lines...) Expand all
26 patternsbackups: 5, 26 patternsbackups: 5,
27 patternsbackupinterval: 24, 27 patternsbackupinterval: 24,
28 savestats: false, 28 savestats: false,
29 privateBrowsing: false, 29 privateBrowsing: false,
30 subscriptions_fallbackerrors: 5, 30 subscriptions_fallbackerrors: 5,
31 subscriptions_fallbackurl: "https://adblockplus.org/getSubscription?version=%V ERSION%&url=%SUBSCRIPTION%&downloadURL=%URL%&error=%ERROR%&channelStatus=%CHANNE LSTATUS%&responseStatus=%RESPONSESTATUS%", 31 subscriptions_fallbackurl: "https://adblockplus.org/getSubscription?version=%V ERSION%&url=%SUBSCRIPTION%&downloadURL=%URL%&error=%ERROR%&channelStatus=%CHANNE LSTATUS%&responseStatus=%RESPONSESTATUS%",
32 subscriptions_autoupdate: true, 32 subscriptions_autoupdate: true,
33 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/excep tionrules.txt", 33 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/excep tionrules.txt",
34 documentation_link: "https://adblockplus.org/redirect?link=%LINK%&lang=%LANG%" , 34 documentation_link: "https://adblockplus.org/redirect?link=%LINK%&lang=%LANG%" ,
35 notificationdata: {}, 35 notificationdata: {},
36 notificationurl: "https://notification.adblockplus.org/notification.json" 36 notificationurl: "https://notification.adblockplus.org/notification.json",
37 stats_total: {}
Wladimir Palant 2013/09/18 09:44:41 Why store an object when we really need only a sin
Thomas Greiner 2013/09/19 09:42:29 We agreed on extending it in the near future to pr
Wladimir Palant 2013/09/19 10:56:22 I wonder what you have in mind here. Counting elem
Thomas Greiner 2013/09/20 15:09:50 There are two categories of additional data that w
37 }; 38 };
38 39
39 let listeners = []; 40 let listeners = [];
40 41
41 function defineProperty(key) 42 function defineProperty(key)
42 { 43 {
43 let value = null; 44 let value = null;
44 Prefs.__defineGetter__(key, function() 45 Prefs.__defineGetter__(key, function()
45 { 46 {
46 if (value === null) 47 if (value === null)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 removeListener: function(listener) 94 removeListener: function(listener)
94 { 95 {
95 let index = listeners.indexOf(listener); 96 let index = listeners.indexOf(listener);
96 if (index >= 0) 97 if (index >= 0)
97 listeners.splice(index, 1); 98 listeners.splice(index, 1);
98 }, 99 },
99 }; 100 };
100 101
101 for (let key in defaults) 102 for (let key in defaults)
102 defineProperty(key); 103 defineProperty(key);
OLDNEW

Powered by Google App Engine
This is Rietveld