| Index: lib/prefs.js |
| =================================================================== |
| --- a/lib/prefs.js |
| +++ b/lib/prefs.js |
| @@ -1,6 +1,6 @@ |
| /* |
| * This file is part of Adblock Plus <http://adblockplus.org/>, |
| - * Copyright (C) 2006-2013 Eyeo GmbH |
| + * Copyright (C) 2006-2014 Eyeo GmbH |
| * |
| * Adblock Plus is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 3 as |
| @@ -31,12 +31,15 @@ |
| subscriptions_fallbackurl: "https://adblockplus.org/getSubscription?version=%VERSION%&url=%SUBSCRIPTION%&downloadURL=%URL%&error=%ERROR%&channelStatus=%CHANNELSTATUS%&responseStatus=%RESPONSESTATUS%", |
| subscriptions_autoupdate: true, |
| subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exceptionrules.txt", |
| + subscriptions_antiadblockurl: "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt", |
| documentation_link: "https://adblockplus.org/redirect?link=%LINK%&lang=%LANG%", |
| notificationdata: {}, |
| notificationurl: "https://notification.adblockplus.org/notification.json", |
| stats_total: {}, |
| show_statsinicon: true, |
| - show_statsinpopup: true |
| + show_statsinpopup: true, |
| + shouldShowBlockElementMenu: true, |
| + hidePlaceholders: true |
| }; |
| let listeners = []; |
| @@ -48,11 +51,11 @@ |
| { |
| if (value === null) |
| { |
| - if (key in localStorage) |
| + if (key in ext.storage) |
| { |
| try |
| { |
| - value = JSON.parse(localStorage[key]); |
| + value = JSON.parse(ext.storage[key]); |
| } |
| catch(e) |
| { |
| @@ -72,13 +75,13 @@ |
| let stringified = JSON.stringify(newValue); |
| if (stringified != JSON.stringify(defaults[key])) |
| - localStorage[key] = stringified; |
| + ext.storage[key] = stringified; |
| else |
| - delete localStorage[key]; |
| + delete ext.storage[key]; |
| value = newValue; |
| - for each (let listener in listeners) |
| + for (let listener of listeners) |
| listener(key); |
| return value; |