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

Unified Diff: lib/prefs.js

Issue 5088751004942336: Issue 370 - Right-clicked element is removed independent of created filter (Closed)
Patch Set: Rebase to rev 3c9cea80c481 Created July 18, 2014, 8:54 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/filesystem/io.js ('k') | lib/rsa.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « lib/filesystem/io.js ('k') | lib/rsa.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld