summaryrefslogtreecommitdiff
path: root/data/extensions/spyblock@gnu.org/chrome/content
diff options
context:
space:
mode:
Diffstat (limited to 'data/extensions/spyblock@gnu.org/chrome/content')
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/errors.html2
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/objtabs.css4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/composer.js6
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/composer.xul4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js159
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/ext/content.js102
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/fennecSettings.xul6
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-backup.js4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filteractions.js14
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filterview.js8
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-search.js102
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionactions.js8
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionview.js10
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters.js6
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/filters.xul9
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.html164
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.js191
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/flasher.js4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/i18n.js93
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/overlay.xul14
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.js18
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.xul4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.js50
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.xul6
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/settings.xul5
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.js97
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/sidebarDetached.xul4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.pngbin0 -> 7303 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/ajax-loader.gifbin0 -> 3208 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-main.pngbin0 -> 163 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-share.pngbin0 -> 162 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background.pngbin0 -> 162 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/donate.pngbin0 -> 160 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/malware.pngbin0 -> 3335 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/social.pngbin0 -> 4260 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/tracking.pngbin0 -> 3562 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/firstRun.css601
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Italic.otfbin0 -> 43152 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Regular.otfbin0 -> 40968 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/facebook.pngbin0 -> 3861 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/googleplus.pngbin0 -> 4009 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/renren.pngbin0 -> 2619 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/twitter.pngbin0 -> 3944 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/weibo.pngbin0 -> 3497 bytes
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.js8
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.xul4
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptions.xml10
-rw-r--r--data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js4
49 files changed, 1283 insertions, 442 deletions
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/errors.html b/data/extensions/spyblock@gnu.org/chrome/content/errors.html
index 5c18929..24e05a5 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/errors.html
+++ b/data/extensions/spyblock@gnu.org/chrome/content/errors.html
@@ -65,7 +65,7 @@
{
document.write("<p>Errors related to Adblock Plus:</p>");
- for each (let message in messages)
+ for (let message of messages)
{
let type = (message.flags & Components.interfaces.nsIScriptError.warningFlag ? "warning" : "error");
let html = "<b>" + (type == "warning" ? "Warning:" : "Error:") + "</b><br>";
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/objtabs.css b/data/extensions/spyblock@gnu.org/chrome/content/objtabs.css
index ce3a830..d61f702 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/objtabs.css
+++ b/data/extensions/spyblock@gnu.org/chrome/content/objtabs.css
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.js
index f7b8087..98a38aa 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -146,7 +146,7 @@ function init()
let typeGroup = E("typeGroup");
let defaultTypes = RegExpFilter.prototype.contentType & ~RegExpFilter.typeMap.DOCUMENT;
let isDefaultType = (RegExpFilter.typeMap[item.typeDescr] & defaultTypes) != 0;
- for each (let type in types)
+ for (let type of types)
{
if (type == Policy.type.ELEMHIDE)
continue;
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.xul
index 8931e16..66e64ef 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/composer.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js
new file mode 100644
index 0000000..129f232
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js
@@ -0,0 +1,159 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+(function(global)
+{
+ const Ci = Components.interfaces;
+
+ if (!global.ext)
+ global.ext = {};
+
+ var holder = {
+ get Page()
+ {
+ delete this.Page;
+ this.Page = (typeof require == "function" ?
+ require("ext_background").Page :
+ function() {});
+ return this.Page;
+ }
+ };
+
+ var getSender = global.ext._getSender = function(origin)
+ {
+ if (origin instanceof Ci.nsIDOMXULElement)
+ return origin.messageManager;
+ else if (origin instanceof Ci.nsIMessageSender)
+ return origin;
+ else
+ return null;
+ };
+
+ var MessageProxy = global.ext._MessageProxy = function(messageManager, messageTarget)
+ {
+ this._messageManager = messageManager;
+ this._messageTarget = messageTarget;
+ this._callbacks = new Map();
+ this._responseCallbackCounter = 0;
+
+ this._handleRequest = this._handleRequest.bind(this);
+ this._handleResponse = this._handleResponse.bind(this);
+ this._messageManager.addMessageListener("AdblockPlus:Message", this._handleRequest);
+ this._messageManager.addMessageListener("AdblockPlus:Response", this._handleResponse);
+ };
+ MessageProxy.prototype = {
+ _disconnect: function()
+ {
+ this._messageManager.removeMessageListener("AdblockPlus:Message", this._handleRequest);
+ this._messageManager.removeMessageListener("AdblockPlus:Response", this._handleResponse);
+ },
+
+ _sendResponse: function(sender, callbackId, message)
+ {
+ var response = {
+ callbackId: callbackId
+ };
+ if (typeof response != "undefined")
+ response.payload = message;
+ sender.sendAsyncMessage("AdblockPlus:Response", response);
+ },
+
+ _handleRequest: function(message)
+ {
+ var sender = getSender(message.target);
+ var request = message.data;
+
+ var sent = false;
+ var sendResponse;
+ if (sender && "callbackId" in request)
+ {
+ sendResponse = function(message)
+ {
+ this._sendResponse(sender, request.callbackId, message);
+ sent = true;
+ }.bind(this);
+ }
+ else
+ sendResponse = function() {};
+
+ var results = this._messageTarget._dispatch(request.payload, {
+ page: new holder.Page(sender)
+ }, sendResponse);
+ if (!sent && results.indexOf(true) == -1)
+ sendResponse(undefined);
+ },
+
+ _handleResponse: function(message)
+ {
+ var response = message.data;
+ var callback = this._callbacks.get(response.callbackId);
+ if (callback)
+ {
+ this._callbacks.delete(response.callbackId);
+ if ("payload" in response)
+ callback(response.payload);
+ }
+ },
+
+ sendMessage: function(message, responseCallback)
+ {
+ if (!(this._messageManager instanceof Ci.nsIMessageSender))
+ throw new Error("Not implemented");
+
+ var request = {
+ payload: message
+ };
+ if (responseCallback)
+ {
+ request.callbackId = ++this._responseCallbackCounter;
+ this._callbacks.set(request.callbackId, responseCallback);
+ }
+
+ this._messageManager.sendAsyncMessage("AdblockPlus:Message", request);
+ }
+ };
+
+ var EventTarget = global.ext._EventTarget = function()
+ {
+ this._listeners = [];
+ };
+ EventTarget.prototype = {
+ addListener: function(listener)
+ {
+ if (this._listeners.indexOf(listener) == -1)
+ this._listeners.push(listener);
+ },
+ removeListener: function(listener)
+ {
+ var idx = this._listeners.indexOf(listener);
+ if (idx != -1)
+ this._listeners.splice(idx, 1);
+ },
+ _dispatch: function()
+ {
+ var results = [];
+
+ for (var i = 0; i < this._listeners.length; i++)
+ results.push(this._listeners[i].apply(null, arguments));
+
+ return results;
+ }
+ };
+
+ if (typeof exports == "object")
+ exports = global.ext;
+})(this);
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/content.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/content.js
new file mode 100644
index 0000000..db2d7e1
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/ext/content.js
@@ -0,0 +1,102 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+(function(global)
+{
+ const Ci = Components.interfaces;
+ const Cu = Components.utils;
+
+ if (!global.ext)
+ global.ext = {};
+
+ /* Message passing */
+ global.ext.onMessage = new global.ext._EventTarget();
+
+ global.ext.backgroundPage = new global.ext._MessageProxy(
+ window.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDocShell)
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIContentFrameMessageManager),
+ global.ext.onMessage);
+ window.addEventListener("unload", function()
+ {
+ global.ext.backgroundPage._disconnect();
+ }, false);
+
+ /* i18n */
+ global.ext.i18n = (function()
+ {
+ var Services = Cu.import("resource://gre/modules/Services.jsm", null).Services;
+ var pageName = location.pathname.replace(/.*\//, "").replace(/\..*?$/, "");
+
+ // Randomize URI to work around bug 719376
+ var stringBundle = Services.strings.createBundle("chrome://adblockplus/locale/" + pageName +
+ ".properties?" + Math.random());
+
+ function getI18nMessage(key)
+ {
+ return {
+ "message": stringBundle.GetStringFromName(key)
+ };
+ }
+
+ function getText(message, args)
+ {
+ var text = message.message;
+ var placeholders = message.placeholders;
+
+ if (!args || !placeholders)
+ return text;
+
+ for (var key in placeholders)
+ {
+ var content = placeholders[key].content;
+ if (!content)
+ continue;
+
+ var index = parseInt(content.slice(1), 10);
+ if (isNaN(index))
+ continue;
+
+ var replacement = args[index - 1];
+ if (typeof replacement === "undefined")
+ continue;
+
+ text = text.split("$" + key + "$").join(replacement);
+ }
+ return text;
+ }
+
+ return {
+ getMessage: function(key, args)
+ {
+ try{
+ var message = getI18nMessage(key);
+ return getText(message, args);
+ }
+ catch(e)
+ {
+ // Don't report errors for special strings, these are expected to be
+ // missing.
+ if (key[0] != "@")
+ Cu.reportError(e);
+ return "";
+ }
+ }
+ };
+ })();
+})(this);
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/fennecSettings.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/fennecSettings.xul
index acbe2b9..c0f38f6 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/fennecSettings.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/fennecSettings.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -29,8 +29,6 @@
<setting type="control" title="&subscriptions.tab.label;">
<menulist id="adblockplus-subscription-list"/>
</setting>
- <setting pref="extensions.adblockplus.fastcollapse" type="bool" title="&hideplaceholders.label;"
- inverted="true"/>
<setting id="adblockplus-sync" type="bool" title="&sync.label;"
oncommand="/**See bug 762015*/ if (event.type == 'oncommand') {event = document.createEvent('Events'); event.initEvent('command', false, false); this.dispatchEvent(event);}"/>
</vbox>
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-backup.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-backup.js
index 3ef38c6..9232b5f 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-backup.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-backup.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filteractions.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filteractions.js
index 5512fda..2a78e56 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filteractions.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filteractions.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -26,11 +26,7 @@ var FilterActions =
*/
init: function()
{
- let me = this;
- this.treeElement.parentNode.addEventListener("keypress", function(event)
- {
- me.keyPress(event);
- }, true);
+ this.treeElement.parentNode.addEventListener("keydown", this.keyDown.bind(this), true);
this.treeElement.view = FilterView;
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=777832, don't
@@ -373,7 +369,7 @@ var FilterActions =
/**
* Called whenever a key is pressed on the list.
*/
- keyPress: function(/**Event*/ event)
+ keyDown: function(/**Event*/ event)
{
if (event.target != E("filtersTree"))
return;
@@ -386,7 +382,7 @@ var FilterActions =
if (event.metaKey)
modifiers |= SubscriptionActions._metaMask;
- if (event.charCode == " ".charCodeAt(0) && modifiers == 0 && !E("col-enabled").hidden)
+ if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_SPACE && modifiers == 0 && !E("col-enabled").hidden)
this.selectionToggleDisabled();
else if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_UP && modifiers == SubscriptionActions._accelMask)
{
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filterview.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filterview.js
index dcee183..524356f 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filterview.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-filterview.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -647,9 +647,9 @@ var FilterView =
let boolAtoms = ["selected", "dummy", "slow", "disabled"];
this.atoms = {};
- for each (let atom in stringAtoms)
+ for (let atom of stringAtoms)
this.atoms[atom] = atomService.getAtom(atom);
- for each (let atom in boolAtoms)
+ for (let atom of boolAtoms)
{
this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true");
this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false");
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-search.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-search.js
index 4e817ac..2d0c0cf 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-search.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-search.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -26,8 +26,20 @@ var FilterSearch =
*/
init: function()
{
+ let filters = E("filtersTree");
+ for (let prop in FilterSearch.fakeBrowser)
+ filters[prop] = FilterSearch.fakeBrowser[prop];
+ Object.defineProperty(filters, "_lastSearchString", {
+ get: function()
+ {
+ return this.finder.searchString;
+ },
+ enumerable: true,
+ configurable: true
+ });
+
let findbar = E("findbar");
- findbar.browser = FilterSearch.fakeBrowser;
+ findbar.browser = filters;
findbar.addEventListener("keypress", function(event)
{
@@ -144,8 +156,25 @@ FilterSearch.fakeBrowser =
_notifyResultListeners: function(result, findBackwards)
{
this.lastResult = result;
- for each (let listener in this._resultListeners)
- listener.onFindResult(result, findBackwards);
+ for (let listener of this._resultListeners)
+ {
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=958101, starting
+ // with Gecko 29 only one parameter is expected.
+ try
+ {
+ if (listener.onFindResult.length == 1)
+ {
+ listener.onFindResult({searchString: this.searchString,
+ result: result, findBackwards: findBackwards});
+ }
+ else
+ listener.onFindResult(result, findBackwards);
+ }
+ catch (e)
+ {
+ Cu.reportError(e);
+ }
+ }
},
fastFind: function(searchString, linksOnly, drawOutline)
@@ -178,6 +207,7 @@ FilterSearch.fakeBrowser =
},
// Irrelevant for us
+ requestMatchesCount: function(searchString, matchLimit, linksOnly) {},
highlight: function(highlight, word) {},
enableSelection: function() {},
removeSelection: function() {},
@@ -185,57 +215,6 @@ FilterSearch.fakeBrowser =
keyPress: function() {}
},
- get _lastSearchString()
- {
- return this.finder.searchString;
- },
-
- // This was used before Firefox 27 instead of the "finder" property.
- fastFind:
- {
- get searchString()
- {
- return FilterSearch.fakeBrowser.finder.searchString;
- },
-
- set searchString(searchString)
- {
- FilterSearch.fakeBrowser.finder.searchString = searchString;
- },
-
- foundLink: null,
- foundEditable: null,
-
- get caseSensitive()
- {
- return FilterSearch.fakeBrowser.finder.caseSensitive;
- },
-
- set caseSensitive(caseSensitive)
- {
- FilterSearch.fakeBrowser.finder.caseSensitive = caseSensitive;
- },
-
- get currentWindow() FilterSearch.fakeBrowser.contentWindow,
-
- find: function(searchString, linksOnly)
- {
- FilterSearch.fakeBrowser.finder.fastFind(searchString, linksOnly);
- return FilterSearch.fakeBrowser.finder.lastResult;
- },
-
- findAgain: function(findBackwards, linksOnly)
- {
- FilterSearch.fakeBrowser.finder.findAgain(findBackwards, linksOnly);
- return FilterSearch.fakeBrowser.finder.lastResult;
- },
-
- // Irrelevant for us
- init: function() {},
- setDocShell: function() {},
- setSelectionModeAndRepaint: function() {},
- collapseSelection: function() {}
- },
currentURI: Utils.makeURI("http://example.com/"),
contentWindow:
{
@@ -251,16 +230,7 @@ FilterSearch.fakeBrowser =
{
E("filtersTree").boxObject.scrollByPages(num);
},
- },
-
- addEventListener: function(event, handler, capture)
- {
- E("filtersTree").addEventListener(event, handler, capture);
- },
- removeEventListener: function(event, handler, capture)
- {
- E("filtersTree").addEventListener(event, handler, capture);
- },
+ }
};
window.addEventListener("load", function()
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionactions.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionactions.js
index 222a4a6..091a9f3 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionactions.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionactions.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -236,7 +236,7 @@ var SubscriptionActions =
else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_ALT)
result = this._altMask;
} catch(e) {}
- this.__defineGetter__("_accelMask", function() result);
+ Object.defineProperty(this, "_accelMask", {value: result});
return result;
},
@@ -444,7 +444,7 @@ var TitleEditor =
if (save)
{
newTitle = subscriptionNode.getElementsByClassName("titleEditor")[0].value;
- newTitle = newTitle.replace(/^\s+/, "").replace(/\s+$/, "");
+ newTitle = newTitle.trim();
}
let subscription = Templater.getDataForNode(subscriptionNode).subscription
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionview.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionview.js
index a1673e4..8fc26e5 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionview.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters-subscriptionview.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -87,7 +87,7 @@ ListManager.prototype =
let subscriptions = FilterStorage.subscriptions.filter(this._filter, this);
if (subscriptions.length)
{
- for each (let subscription in subscriptions)
+ for (let subscription of subscriptions)
this.addSubscription(subscription, null);
// Make sure first list item is selected after list initialization
@@ -176,7 +176,7 @@ ListManager.prototype =
{
if (this._scheduledUpdateDisabled == null)
{
- this._scheduledUpdateDisabled = {__proto__: null};
+ this._scheduledUpdateDisabled = Object.create(null);
Utils.runAsync(this.updateDisabled, this);
}
for (let i = 0; i < item.subscriptions.length; i++)
@@ -273,7 +273,7 @@ ListManager.prototype =
{
if (this._scheduledUpdateDisabled == null)
{
- this._scheduledUpdateDisabled = {__proto__: null};
+ this._scheduledUpdateDisabled = Object.create(null);
Utils.runAsync(this.updateDisabled, this);
}
this._scheduledUpdateDisabled[item.url] = true;
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.js
index 8830fdb..29a2e31 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -147,7 +147,7 @@ var Templater =
// Process <if> tags - remove if condition is false, replace by their children
// if it is true
- for each (let node in conditionals)
+ for (let node of conditionals)
{
let fragment = document.createDocumentFragment();
let condition = node.getAttribute("condition");
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.xul
index ce65659..2341cdc 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/filters.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -264,11 +264,6 @@
</richlistbox>
</deck>
- <!--description>
- <checkbox id="acceptableAds" label="&acceptableAds2.label;" oncommand="ListManager.allowAcceptableAds(this.checked);"/>
- <label class="text-link" value="&viewList.label;" onclick="UI.loadInBrowser(Prefs.subscriptions_exceptionsurl);"/>
- <label class="text-link" value="&readMore.label;" onclick="UI.loadDocLink('acceptable_ads');"/>
- </description-->
</tabpanel>
<tabpanel id="filtersTab" orient="vertical" flex="1">
<hbox pack="end">
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.html b/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.html
index 36f5cf7..cb2ec25 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.html
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -20,8 +20,9 @@
<head>
<title class="i18n_firstRun_title"></title>
<meta charset="utf-8">
- <link type="text/css" href="/skin/firstRun.css" rel="stylesheet"/>
- <script type="text/javascript" src="utils.js"></script>
+ <link type="text/css" href="skin/firstRun.css" rel="stylesheet"/>
+ <script type="text/javascript" src="ext/common.js"></script>
+ <script type="text/javascript" src="ext/content.js"></script>
<script type="text/javascript" src="i18n.js"></script>
<script type="text/javascript" src="firstRun.js"></script>
</head>
@@ -29,7 +30,7 @@
<header>
- <div id="logo"></div>
+ <img id="logo">
<h1 id="title-main" class="i18n_firstRun_title"></h1>
</header>
@@ -37,97 +38,98 @@
<section id="filterlistsReinitializedWarning" class="i18n_firstRun_filterlistsReinitializedWarning warning" hidden="true"></section>
<section id="dataCorruptionWarning" class="i18n_firstRun_dataCorruptionWarning warning" hidden="true"></section>
- <section id="acceptable-ads">
- <h2 class="i18n_firstRun_acceptableAdsHeadline"></h2>
- <p id="acceptableAdsExplanation" class="i18n_firstRun_acceptableAdsExplanation"></p>
- </section>
+ <div id="content">
+ <section id="acceptable-ads">
+ <h2 class="i18n_firstRun_acceptableAdsHeadline"></h2>
+ <p id="acceptableAdsExplanation" class="i18n_firstRun_acceptableAdsExplanation"></p>
+ </section>
- <section id="share">
- <h2 id="share-headline" class="i18n_firstRun_share_headline"></h2>
+ <section id="share">
+ <h2 id="share-headline" class="i18n_firstRun_share_headline"></h2>
- <div id="donate-block">
- <a id="donate" class="i18n_firstRun_donate" target="_blank"></a>
- <span id="donate-label" class="i18n_firstRun_donate_label"></span>
- </div>
-
- <div id="share-block">
- <div id="share-general" class="share-buttons">
- <a id="share-facebook" href="https://www.facebook.com/adblockplus" target="_blank" data-script="https://facebook.com/plugins/like.php?">
- </a>
- <a id="share-twitter" href="https://twitter.com/adblockplus" target="_blank" data-script="https://platform.twitter.com/widgets.js">
- </a>
- <a id="share-gplus" href="https://www.google.com/+AdblockPlus" target="_blank" data-script="https://apis.google.com/js/plusone.js">
- </a>
+ <div id="donate-block">
+ <a id="donate" class="i18n_firstRun_donate" target="_blank"></a>
+ <span id="donate-label" class="i18n_firstRun_donate_label"></span>
</div>
- <!-- Chinese social networks -->
- <div id="share-chinese" class="share-buttons">
- <a id="share-renren" href="http://www.renren.com/601651969" target="_blank">
- </a>
- <a id="share-weibo" href="http://e.weibo.com/adblockplus/" target="_blank">
- </a>
+ <div id="share-block">
+ <div id="share-general" class="share-buttons">
+ <a id="share-facebook" href="https://www.facebook.com/adblockplus" target="_blank" data-script="https://facebook.com/plugins/like.php?">
+ </a>
+ <a id="share-twitter" href="https://twitter.com/adblockplus" target="_blank" data-script="https://platform.twitter.com/widgets/">
+ </a>
+ <a id="share-gplus" href="https://www.google.com/+AdblockPlus" target="_blank" data-script="https://apis.google.com/se/0/_/+1/fastbutton?">
+ </a>
+ </div>
+
+ <!-- Chinese social networks -->
+ <div id="share-chinese" class="share-buttons">
+ <a id="share-renren" href="http://www.renren.com/601651969" target="_blank">
+ </a>
+ <a id="share-weibo" href="http://e.weibo.com/adblockplus/" target="_blank">
+ </a>
+ </div>
+ <span class="i18n_firstRun_share"></span>
</div>
- <span class="i18n_firstRun_share"></span>
- </div>
- </section>
-
-
- <section id="can-do-more">
- <h2 class="i18n_firstRun_features"></h2>
-
- <div id="can-do-more-content">
- <ul id="features">
- <li id="feature-malware" class="feature">
- <div class="feature-image feature-malware-image"></div>
- <div class="feature-description">
- <div class="feature-description-textblock">
- <h3 class="i18n_firstRun_feature_malware feature-title"></h3>
- <span class="i18n_firstRun_feature_malware_description"></span>
- </div>
- <div id="toggle-malware" class="toggle">
- <div class="i18n_firstRun_toggle_on toggle-on"></div>
- <div class="toggle-blob"></div>
- <div class="i18n_firstRun_toggle_off toggle-off"></div>
- </div>
- </div>
-
- </li>
- <li id="feature-social" class="feature">
- <div class="feature-image feature-social-image"></div>
- <div class="feature-description">
- <div class="feature-description-textblock">
- <h3 class="i18n_firstRun_feature_social feature-title"></h3>
- <span class="i18n_firstRun_feature_social_description"></span>
- </div>
- <div id="toggle-social" class="toggle">
- <div class="i18n_firstRun_toggle_on toggle-on"></div>
- <div class="toggle-blob"></div>
- <div class="i18n_firstRun_toggle_off toggle-off"></div>
- </div>
- </div>
- </li>
+ </section>
- <li id="feature-tracking" class="feature">
- <div class="feature-image feature-tracking-image"></div>
- <div class="feature-description">
+
+ <section id="can-do-more">
+ <h2 class="i18n_firstRun_features"></h2>
+
+ <div id="can-do-more-content">
+ <ul id="features">
+ <li id="feature-malware" class="feature">
+ <div class="feature-image feature-malware-image"></div>
+ <div class="feature-description">
<div class="feature-description-textblock">
- <h3 class="i18n_firstRun_feature_tracking feature-title"></h3>
- <span class="i18n_firstRun_feature_tracking_description"></span>
+ <h3 class="i18n_firstRun_feature_malware feature-title"></h3>
+ <span class="i18n_firstRun_feature_malware_description"></span>
</div>
- <div id="toggle-tracking" class="toggle">
+ <div id="toggle-malware" class="toggle">
<div class="i18n_firstRun_toggle_on toggle-on"></div>
<div class="toggle-blob"></div>
<div class="i18n_firstRun_toggle_off toggle-off"></div>
</div>
- </div>
- </li>
+ </div>
- </ul>
+ </li>
+ <li id="feature-social" class="feature">
+ <div class="feature-image feature-social-image"></div>
+ <div class="feature-description">
+ <div class="feature-description-textblock">
+ <h3 class="i18n_firstRun_feature_social feature-title"></h3>
+ <span class="i18n_firstRun_feature_social_description"></span>
+ </div>
+ <div id="toggle-social" class="toggle">
+ <div class="i18n_firstRun_toggle_on toggle-on"></div>
+ <div class="toggle-blob"></div>
+ <div class="i18n_firstRun_toggle_off toggle-off"></div>
+ </div>
+ </div>
+ </li>
+
+ <li id="feature-tracking" class="feature">
+ <div class="feature-image feature-tracking-image"></div>
+ <div class="feature-description">
+ <div class="feature-description-textblock">
+ <h3 class="i18n_firstRun_feature_tracking feature-title"></h3>
+ <span class="i18n_firstRun_feature_tracking_description"></span>
+ </div>
+ <div id="toggle-tracking" class="toggle">
+ <div class="i18n_firstRun_toggle_on toggle-on"></div>
+ <div class="toggle-blob"></div>
+ <div class="i18n_firstRun_toggle_off toggle-off"></div>
+ </div>
+ </div>
+ </li>
- </div>
- </section>
+ </ul>
+ </div>
+ </section>
+ </div>
<footer>
<a id="contributors" class="i18n_firstRun_contributor_credits"></a>
@@ -138,4 +140,4 @@
<iframe id="share-popup" scrolling="no"></iframe>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.js
index be2caa6..3a11a2e 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/firstRun.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -19,6 +19,11 @@
(function()
{
+ function E(id)
+ {
+ return document.getElementById(id);
+ }
+
// Load subscriptions for features
var featureSubscriptions = [
{
@@ -41,95 +46,107 @@
}
];
+ function getDocLink(link, callback)
+ {
+ ext.backgroundPage.sendMessage({
+ type: "app.get",
+ what: "doclink",
+ link: link
+ }, callback);
+ }
+
function onDOMLoaded()
{
- var locale = require("utils").Utils.appLocale;
- document.documentElement.setAttribute("lang", locale);
+ // Set up logo image
+ var logo = E("logo");
+ logo.src = "skin/abp-128.png";
+ var errorCallback = function()
+ {
+ logo.removeEventListener("error", errorCallback, false);
+ // We are probably in Chrome/Opera/Safari, the image has a different path.
+ logo.src = "icons/detailed/abp-128.png";
+ };
+ logo.addEventListener("error", errorCallback, false);
// Set up URLs
- var donateLink = E("donate");
- donateLink.href = Utils.getDocLink("donate");
+ getDocLink("donate", function(link)
+ {
+ E("donate").href = link;
+ });
- var contributors = E("contributors");
- contributors.href = Utils.getDocLink("contributors");
+ getDocLink("contributors", function(link)
+ {
+ E("contributors").href = link;
+ });
- setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criteria"), openFilters);
- setLinks("share-headline", Utils.getDocLink("contribute"));
+ getDocLink("acceptable_ads_criteria", function(link)
+ {
+ setLinks("acceptableAdsExplanation", link, openFilters);
+ });
+
+ getDocLink("contribute", function(link)
+ {
+ setLinks("share-headline", link);
+ });
- if (typeof backgroundPage != "undefined")
+ ext.backgroundPage.sendMessage({
+ type: "app.get",
+ what: "issues"
+ }, function(issues)
{
// Show warning if data corruption was detected
- if (backgroundPage.seenDataCorruption)
+ if (issues.seenDataCorruption)
{
E("dataCorruptionWarning").removeAttribute("hidden");
- setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filterstorage"));
+ getDocLink("knownIssuesChrome_filterstorage", function(link)
+ {
+ setLinks("dataCorruptionWarning", link);
+ });
}
// Show warning if filterlists settings were reinitialized
- if (backgroundPage.filterlistsReinitialized)
+ if (issues.filterlistsReinitialized)
{
E("filterlistsReinitializedWarning").removeAttribute("hidden");
setLinks("filterlistsReinitializedWarning", openFilters);
}
- }
- // Show warning if Safari version isn't supported
- var info = require("info");
- if (info.platform == "safari" && (
- Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload breaks websites in Safari 5
- Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions are broken in 6.1 and 7.0
- Services.vc.compare(info.platformVersion, "7.0") == 0
- ))
- E("legacySafariWarning").removeAttribute("hidden");
+ if (issues.legacySafariVersion)
+ E("legacySafariWarning").removeAttribute("hidden");
+ });
// Set up feature buttons linked to subscriptions
- featureSubscriptions.forEach(setToggleSubscriptionButton);
- var filterListener = function(action)
+ featureSubscriptions.forEach(initToggleSubscriptionButton);
+ updateToggleButtons();
+ updateSocialLinks();
+
+ ext.onMessage.addListener(function(message)
{
- if (/^subscription\.(added|removed|disabled)$/.test(action))
+ if (message.type == "subscriptions.listen")
{
- for (var i = 0; i < featureSubscriptions.length; i++)
- {
- var featureSubscription = featureSubscriptions[i];
- updateToggleButton(featureSubscription.feature, isSubscriptionEnabled(featureSubscription));
- }
+ updateToggleButtons();
+ updateSocialLinks();
}
- }
- FilterNotifier.addListener(filterListener);
- window.addEventListener("unload", function(event)
- {
- FilterNotifier.removeListener(filterListener);
- }, false);
-
- initSocialLinks();
- }
-
- function isSubscriptionEnabled(featureSubscription)
- {
- return featureSubscription.url in FilterStorage.knownSubscriptions
- && !Subscription.fromURL(featureSubscription.url).disabled;
+ });
+ ext.backgroundPage.sendMessage({
+ type: "subscriptions.listen",
+ filter: ["added", "removed", "updated", "disabled"]
+ });
}
- function setToggleSubscriptionButton(featureSubscription)
+ function initToggleSubscriptionButton(featureSubscription)
{
var feature = featureSubscription.feature;
var element = E("toggle-" + feature);
- updateToggleButton(feature, isSubscriptionEnabled(featureSubscription));
element.addEventListener("click", function(event)
{
- var subscription = Subscription.fromURL(featureSubscription.url);
- if (isSubscriptionEnabled(featureSubscription))
- FilterStorage.removeSubscription(subscription);
- else
- {
- subscription.disabled = false;
- subscription.title = featureSubscription.title;
- subscription.homepage = featureSubscription.homepage;
- FilterStorage.addSubscription(subscription);
- if (!subscription.lastDownload)
- Synchronizer.execute(subscription);
- }
+ ext.backgroundPage.sendMessage({
+ type: "subscriptions.toggle",
+ url: featureSubscription.url,
+ title: featureSubscription.title,
+ homepage: featureSubscription.homepage
+ });
}, false);
}
@@ -141,8 +158,7 @@
var popupMessageListener = function(event)
{
- var originFilter = Filter.fromText("||adblockplus.org^");
- if (!originFilter.matches(event.origin, "OTHER", null, null))
+ if (!/[.\/]adblockplus\.org$/.test(event.origin))
return;
var width = event.data.width;
@@ -184,25 +200,38 @@
glassPane.className = "visible";
}
- function initSocialLinks()
+ function updateSocialLinks()
{
var networks = ["twitter", "facebook", "gplus"];
networks.forEach(function(network)
{
var link = E("share-" + network);
- link.addEventListener("click", onSocialLinkClick, false);
+ var message = {
+ type: "filters.blocked",
+ url: link.getAttribute("data-script"),
+ requestType: "SCRIPT",
+ docDomain: "adblockplus.org",
+ thirdParty: true
+ };
+ ext.backgroundPage.sendMessage(message, function(blocked)
+ {
+ // Don't open the share page if the sharing script would be blocked
+ if (blocked)
+ link.removeEventListener("click", onSocialLinkClick, false);
+ else
+ link.addEventListener("click", onSocialLinkClick, false);
+ });
});
}
function onSocialLinkClick(event)
{
- // Don't open the share page if the sharing script would be blocked
- var filter = defaultMatcher.matchesAny(event.target.getAttribute("data-script"), "SCRIPT", "adblockplus.org", true);
- if (!(filter instanceof BlockingFilter))
+ event.preventDefault();
+
+ getDocLink(event.target.id, function(link)
{
- event.preventDefault();
- openSharePopup(Utils.getDocLink(event.target.id));
- }
+ openSharePopup(link);
+ });
}
function setLinks(id)
@@ -232,12 +261,26 @@
function openFilters()
{
- if (typeof UI != "undefined")
- UI.openFiltersDialog();
- else
+ ext.backgroundPage.sendMessage({type: "app.open", what: "options"});
+ }
+
+ function updateToggleButtons()
+ {
+ ext.backgroundPage.sendMessage({
+ type: "subscriptions.get",
+ downloadable: true,
+ ignoreDisabled: true
+ }, function(subscriptions)
{
- backgroundPage.openOptions();
- }
+ var known = Object.create(null);
+ for (var i = 0; i < subscriptions.length; i++)
+ known[subscriptions[i].url] = true;
+ for (var i = 0; i < featureSubscriptions.length; i++)
+ {
+ var featureSubscription = featureSubscriptions[i];
+ updateToggleButton(featureSubscription.feature, featureSubscription.url in known);
+ }
+ });
}
function updateToggleButton(feature, isEnabled)
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/flasher.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/flasher.js
index ddb4131..69f4c9e 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/flasher.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/flasher.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/i18n.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/i18n.js
index 8366268..9d380b7 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/i18n.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/i18n.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -15,81 +15,30 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-var i18n;
+// This variable should no longer be necessary once options.js in Chrome
+// accesses ext.i18n directly.
+var i18n = ext.i18n;
-if (typeof ext != "undefined")
- i18n = ext.i18n;
-else if (typeof chrome != "undefined")
- // TODO: This check only exist for backwards compatibility, while the Safari
- // port isn't merged into the adblockpluschrome repo. So this branch should
- // be removed when the Safari port was merged.
- i18n = chrome.i18n;
-else
-{
- // Using Firefox' approach on i18n instead
-
- // Randomize URI to work around bug 719376
- var pageName = location.pathname.replace(/.*\//, '').replace(/\..*?$/, '');
- var stringBundle = Services.strings.createBundle("chrome://adblockplus/locale/" + pageName +
- ".properties?" + Math.random());
-
- function getI18nMessage(key)
+// Getting UI locale cannot be done synchronously on Firefox,
+// requires messaging the background page. For Chrome and Safari,
+// we could get the UI locale here, but would need to duplicate
+// the logic implemented in Utils.appLocale.
+ext.backgroundPage.sendMessage(
{
- return {
- "message": stringBundle.GetStringFromName(key)
- };
- }
-
- i18n = (function()
+ type: "app.get",
+ what: "localeInfo"
+ },
+ function(localeInfo)
{
- function getText(message, args)
- {
- var text = message.message;
- var placeholders = message.placeholders;
-
- if (!args || !placeholders)
- return text;
-
- for (var key in placeholders)
- {
- var content = placeholders[key].content;
- if (!content)
- continue;
-
- var index = parseInt(content.slice(1), 10);
- if (isNaN(index))
- continue;
-
- var replacement = args[index - 1];
- if (typeof replacement === "undefined")
- continue;
-
- text = text.split("$" + key + "$").join(replacement);
- }
- return text;
- }
-
- return {
- getMessage: function(key, args)
- {
- try{
- var message = getI18nMessage(key);
- return getText(message, args);
- }
- catch(e)
- {
- Cu.reportError(e);
- return "Missing translation: " + key;
- }
- }
- };
- })();
-}
+ document.documentElement.lang = localeInfo.locale;
+ document.documentElement.dir = localeInfo.bidiDir;
+ }
+);
// Inserts i18n strings into matching elements. Any inner HTML already in the element is
// parsed as JSON and used as parameters to substitute into placeholders in the i18n
// message.
-i18n.setElementText = function(element, stringName, arguments)
+ext.i18n.setElementText = function(element, stringName, arguments)
{
function processString(str, element)
{
@@ -110,7 +59,7 @@ i18n.setElementText = function(element, stringName, arguments)
while (element.lastChild)
element.removeChild(element.lastChild);
- processString(i18n.getMessage(stringName, arguments), element);
+ processString(ext.i18n.getMessage(stringName, arguments), element);
}
// Loads i18n strings
@@ -129,7 +78,7 @@ function loadI18nStrings()
className = className.animVal;
var stringName = className.split(/\s/)[0].substring(5);
- i18n.setElementText(node, stringName, arguments);
+ ext.i18n.setElementText(node, stringName, arguments);
}
}
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/overlay.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/overlay.xul
index 90b5b9f..62c57e6 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/overlay.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/overlay.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -47,7 +47,6 @@
<!-- Icon's context menu -->
<menupopup id="abp-status-popup" context="">
- <!--menuitem id="abp-status-sendReport" label="&sendReport.label;…" key="abp-key-sendReport" command="abp-command-sendReport"/-->
<menuitem id="abp-status-openbottombar" label="&opensidebar.label;" key="abp-key-sidebar" command="abp-command-sidebar"/>
<menuitem id="abp-status-closebottombar" label="&closesidebar.label;" key="abp-key-sidebar" command="abp-command-sidebar"/>
<menuitem id="abp-status-filters" label="&filters.label;…" key="abp-key-filters" command="abp-command-filters"/>
@@ -59,7 +58,6 @@
<menu id="abp-status-options" label="&options.label;">
<menupopup id="abp-status-options-popup">
<menuitem id="abp-status-frameobjects" label="&objecttabs.label;" type="checkbox" command="abp-command-toggleobjtabs"/>
- <menuitem id="abp-status-slowcollapse" label="&hideplaceholders.label;" type="checkbox" command="abp-command-togglecollapse"/>
<menuitem id="abp-status-savestats" label="&counthits.label;" type="checkbox" command="abp-command-togglesavestats"/>
<menuitem id="abp-status-sync" label="&sync.label;" type="checkbox" command="abp-command-togglesync"/>
<menuseparator id="abp-status-iconSettingsSeparator"/>
@@ -68,26 +66,18 @@
</menupopup>
</menu>
- <hbox class="abp-contributebutton" id="abp-status-contributebutton" pack="center" align="center">
- <!-- noautoclose attribute tells Australis menu that it shouldn't close when
- these are clicked, see https://bugzilla.mozilla.org/show_bug.cgi?id=940693 -->
- <button class="abp-contributebutton-btn" label="&contribute.label;" command="abp-command-contribute" flex="1" noautoclose="true"/>
- <toolbarbutton class="abp-contributebutton-close" command="abp-command-contribute-hide" noautoclose="true"/>
- </hbox>
</menupopup>
<keyset id="abp-keyset"/>
<!-- Dummy oncommand attributes are work-arounds for bug 371900 -->
<commandset id="abp-commandset">
- <command id="abp-command-sendReport" oncommand="//"/>
<command id="abp-command-filters" oncommand="//"/>
<command id="abp-command-settings" oncommand="//"/>
<command id="abp-command-sidebar" oncommand="//"/>
<command id="abp-command-togglesitewhitelist"/>
<command id="abp-command-togglepagewhitelist"/>
<command id="abp-command-toggleobjtabs"/>
- <command id="abp-command-togglecollapse"/>
<command id="abp-command-togglesavestats"/>
<command id="abp-command-togglesync"/>
<command id="abp-command-toggleshowintoolbar"/>
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.js
index 659acdd..a449c2c 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -32,10 +32,16 @@
canvas.parentNode.appendChild(headers[i]);
// Expose properties
- progressBar.__defineGetter__("activeItem", getActiveItem);
- progressBar.__defineSetter__("activeItem", setActiveItem);
- progressBar.__defineGetter__("activeItemComplete", getActiveItemComplete);
- progressBar.__defineSetter__("activeItemComplete", setActiveItemComplete);
+ Object.defineProperty(progressBar, "activeItem",
+ {
+ get: getActiveItem,
+ set: setActiveItem
+ });
+ Object.defineProperty(progressBar, "activeItemComplete",
+ {
+ get: getActiveItemComplete,
+ set: setActiveItemComplete
+ });
isRTL = (window.getComputedStyle(document.documentElement).direction == "rtl");
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.xul
index d940e61..3098d12 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/progressBar.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.js
index 3ccc0e6..c61dbbb 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -189,7 +189,7 @@ let requestsDataSource =
origRequests: [],
requestNotifier: null,
callback: null,
- nodeByKey: {__proto__: null},
+ nodeByKey: Object.create(null),
collectData: function(wnd, windowURI, callback)
{
@@ -636,7 +636,7 @@ let errorsDataSource =
messages = messages.slice(messages.length - 10, messages.length);
// Censor app and profile paths in error messages
- let censored = {__proto__: null};
+ let censored = Object.create(null);
let pathList = [["ProfD", "%PROFILE%"], ["GreD", "%GRE%"], ["CurProcD", "%APP%"]];
for (let i = 0; i < pathList.length; i++)
{
@@ -733,6 +733,14 @@ let subscriptionUpdateDataSource =
type: null,
outdated: null,
needUpdate: null,
+
+ subscriptionFilter: function(s)
+ {
+ if (s instanceof DownloadableSubscription)
+ return subscriptionsDataSource.subscriptionFilter(s);
+ else
+ return false;
+ },
collectData: function(wnd, windowURI, callback)
{
@@ -744,7 +752,7 @@ let subscriptionUpdateDataSource =
this.outdated = [];
this.needUpdate = [];
- let subscriptions = FilterStorage.subscriptions.filter(issuesDataSource.subscriptionFilter);
+ let subscriptions = FilterStorage.subscriptions.filter(this.subscriptionFilter);
for (let i = 0; i < subscriptions.length; i++)
{
let lastSuccess = subscriptions[i].lastSuccess;
@@ -884,8 +892,12 @@ let issuesDataSource =
subscriptionFilter: function(s)
{
- if (s instanceof DownloadableSubscription)
+ if (s instanceof DownloadableSubscription &&
+ s.url != Prefs.subscriptions_exceptionsurl &&
+ s.url != Prefs.subscriptions_antiadblockurl)
+ {
return subscriptionsDataSource.subscriptionFilter(s);
+ }
else
return false;
},
@@ -899,18 +911,18 @@ let issuesDataSource =
{
// Find disabled filters in active subscriptions matching any of the requests
let disabledMatcher = new CombinedMatcher();
- for each (let subscription in FilterStorage.subscriptions)
+ for (let subscription of FilterStorage.subscriptions)
{
if (subscription.disabled)
continue;
- for each (let filter in subscription.filters)
+ for (let filter of subscription.filters)
if (filter instanceof BlockingFilter && filter.disabled)
disabledMatcher.add(filter);
}
- let seenFilters = {__proto__: null};
- for each (let request in requestsDataSource.origRequests)
+ let seenFilters = Object.create(null);
+ for (let request of requestsDataSource.origRequests)
{
if (request.filter)
continue;
@@ -924,18 +936,18 @@ let issuesDataSource =
}
// Find disabled subscriptions with filters matching any of the requests
- let seenSubscriptions = {__proto__: null};
- for each (let subscription in FilterStorage.subscriptions)
+ let seenSubscriptions = Object.create(null);
+ for (let subscription of FilterStorage.subscriptions)
{
if (!subscription.disabled)
continue;
disabledMatcher.clear();
- for each (let filter in subscription.filters)
+ for (let filter of subscription.filters)
if (filter instanceof BlockingFilter)
disabledMatcher.add(filter);
- for each (let request in requestsDataSource.origRequests)
+ for (let request of requestsDataSource.origRequests)
{
if (request.filter)
continue;
@@ -952,7 +964,7 @@ let issuesDataSource =
this.numSubscriptions = FilterStorage.subscriptions.filter(this.subscriptionFilter).length;
this.numAppliedFilters = 0;
- for each (let filter in filtersDataSource.origFilters)
+ for (let filter of filtersDataSource.origFilters)
{
if (filter instanceof WhitelistFilter)
continue;
@@ -984,7 +996,7 @@ let issuesDataSource =
if (this.ownFilters.length && !ownFiltersBox.firstChild)
{
let template = E("issuesOwnFiltersTemplate");
- for each (let filter in this.ownFilters)
+ for (let filter of this.ownFilters)
{
let element = template.cloneNode(true);
element.removeAttribute("id");
@@ -1001,7 +1013,7 @@ let issuesDataSource =
if (this.disabledSubscriptions.length && !disabledSubscriptionsBox.firstChild)
{
let template = E("issuesDisabledSubscriptionsTemplate");
- for each (let subscription in this.disabledSubscriptions)
+ for (let subscription of this.disabledSubscriptions)
{
let element = template.cloneNode(true);
element.removeAttribute("id");
@@ -1018,7 +1030,7 @@ let issuesDataSource =
if (this.disabledFilters.length && !disabledFiltersBox.firstChild)
{
let template = E("issuesDisabledFiltersTemplate");
- for each (let filter in this.disabledFilters)
+ for (let filter of this.disabledFilters)
{
let element = template.cloneNode(true);
element.removeAttribute("id");
@@ -1107,7 +1119,7 @@ let issuesDataSource =
if ("mainSubscriptionURL" in result)
subscriptionResults.push([result.mainSubscriptionURL, result.mainSubscriptionTitle]);
- for each (let [url, title] in subscriptionResults)
+ for (let [url, title] of subscriptionResults)
{
let subscription = Subscription.fromURL(url);
if (!subscription)
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.xul
index 54e0726..491e3b6 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/sendReport.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -213,7 +213,7 @@
<description>&emailComment.label;</description>
<hbox class="topLabel" align="baseline">
<label id="emailLabel" control="email" value="&email.label;"/>
- <textbox id="email" persist="value" flex="1" maxlength="200" oninput="updateEmail();"/>
+ <textbox id="email" type="email" persist="value" flex="1" maxlength="200" oninput="updateEmail();"/>
</hbox>
<checkbox id="anonymousCheckbox" label="&anonymous.label;" oncommand="updateEmail();"/>
<description id="anonymityWarning" visible="false">&anonymity.warning;</description>
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/settings.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/settings.xul
index 4215a38..0dc8317 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/settings.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/settings.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
@@ -29,7 +29,6 @@
</setting>
<setting pref="extensions.adblockplus.enabled" type="bool" inverted="true" title="&disable.label;"/>
<setting pref="extensions.adblockplus.frameobjects" type="bool" title="&objecttabs.label;"/>
- <setting pref="extensions.adblockplus.fastcollapse" type="bool" inverted="true" title="&hideplaceholders.label;"/>
<setting id="adblockplus-savestats" type="bool" title="&counthits.label;"/>
<setting id="adblockplus-sync" type="bool" title="&sync.label;"/>
<setting id="adblockplus-showintoolbar" type="bool" title="&showintoolbar.label;"/>
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.js
index 358aebe..0b49068 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -23,7 +23,7 @@ var mainWin = parent;
// The window handler currently in use
var requestNotifier = null;
-var cacheSession = null;
+var cacheStorage = null;
var noFlash = false;
// Matcher for disabled filters
@@ -85,7 +85,7 @@ function init() {
}
let {getBrowser, addBrowserLocationListener} = require("appSupport");
- window.__defineGetter__("content", function() {return getBrowser(mainWin).contentWindow;});
+ Object.defineProperty(window, "content", { get: () => getBrowser(mainWin).contentWindow });
// Initialize matcher for disabled filters
reloadDisabledFilters();
@@ -155,12 +155,12 @@ function reloadDisabledFiltersInternal()
if (Prefs.enabled)
{
- for each (let subscription in FilterStorage.subscriptions)
+ for (let subscription of FilterStorage.subscriptions)
{
if (subscription.disabled)
continue;
- for each (let filter in subscription.filters)
+ for (let filter of subscription.filters)
if (filter instanceof RegExpFilter && filter.disabled)
disabledMatcher.add(filter);
}
@@ -200,6 +200,7 @@ function handleLocationChange()
if (item)
treeView.addItem(node, item, scanComplete);
});
+ cacheStorage = null;
}
// Fills a box with text splitting it up into multiple lines if necessary
@@ -295,43 +296,67 @@ function fillInTooltip(e) {
var showPreview = Prefs.previewimages && !("tooltip" in item);
showPreview = showPreview && item.typeDescr == "IMAGE";
showPreview = showPreview && (!item.filter || item.filter.disabled || item.filter instanceof WhitelistFilter);
+ E("tooltipPreviewBox").hidden = true;
if (showPreview)
{
- // Check whether image is in cache (stolen from ImgLikeOpera)
- if (!cacheSession)
+ if (!cacheStorage)
{
- var cacheService = Cc["@mozilla.org/network/cache-service;1"].getService(Ci.nsICacheService);
- cacheSession = cacheService.createSession("HTTP", Ci.nsICache.STORE_ANYWHERE, true);
+ let {Services} = Cu.import("resource://gre/modules/Services.jsm", null);
+ // Cache v2 API is enabled by default starting with Gecko 32
+ if (Services.vc.compare(Utils.platformVersion, "32.0a1") >= 0)
+ {
+ let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
+ let loadContext = content.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+ cacheStorage = Services.cache2.diskCacheStorage(LoadContextInfo.fromLoadContext(loadContext, false), false);
+ }
+ else
+ cacheStorage = Services.cache.createSession("HTTP", Ci.nsICache.STORE_ANYWHERE, true);
}
-
- let cacheListener =
+
+ let showTooltipPreview = function ()
{
- onCacheEntryAvailable: function(descriptor, accessGranted, status)
- {
- if (!descriptor)
- return;
-
- descriptor.close();
- // Show preview here since this is asynchronous now
- // and we have a valid descriptor
- E("tooltipPreview").setAttribute("src", item.location);
- E("tooltipPreviewBox").hidden = false;
- },
- onCacheEntryDoomed: function(status)
- {
- }
+ E("tooltipPreview").setAttribute("src", item.location);
+ E("tooltipPreviewBox").hidden = false;
};
try
{
- cacheSession.asyncOpenCacheEntry(item.location, Ci.nsICache.ACCESS_READ, cacheListener);
+ if (Ci.nsICacheStorage && cacheStorage instanceof Ci.nsICacheStorage)
+ {
+ cacheStorage.asyncOpenURI(Utils.makeURI(item.location), "", Ci.nsICacheStorage.OPEN_READONLY, {
+ onCacheEntryCheck: function (entry, appCache)
+ {
+ return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
+ },
+ onCacheEntryAvailable: function (entry, isNew, appCache, status)
+ {
+ if (!isNew)
+ showTooltipPreview();
+ }
+ });
+ }
+ else
+ {
+ cacheStorage.asyncOpenCacheEntry(item.location, Ci.nsICache.ACCESS_READ, {
+ onCacheEntryAvailable: function(descriptor, accessGranted, status)
+ {
+ if (!descriptor)
+ return;
+ descriptor.close();
+ showTooltipPreview();
+ },
+ onCacheEntryDoomed: function(status)
+ {
+ }
+ });
+ }
}
catch (e)
{
Cu.reportError(e);
}
}
-
- E("tooltipPreviewBox").hidden = true;
}
const visual = {
@@ -451,7 +476,7 @@ function handleDblClick(event)
function openInTab(item, /**Event*/ event)
{
let items = (item ? [item] : treeView.getAllSelectedItems());
- for each (let item in items)
+ for (let item of items)
{
if (item && item.typeDescr != "ELEMHIDE")
UI.loadInBrowser(item.location, mainWin, event);
@@ -647,7 +672,7 @@ function getItemSize(item)
if (item.filter && !item.filter.disabled && item.filter instanceof BlockingFilter)
return null;
- for each (let node in item.nodes)
+ for (let node of item.nodes)
{
if (node instanceof HTMLImageElement && (node.naturalWidth || node.naturalHeight))
return [node.naturalWidth, node.naturalHeight];
@@ -777,9 +802,9 @@ var treeView = {
var boolAtoms = ["selected", "dummy", "filter-disabled"];
var atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomService);
this.atoms = {};
- for each (let atom in stringAtoms)
+ for (let atom of stringAtoms)
this.atoms[atom] = atomService.getAtom(atom);
- for each (let atom in boolAtoms)
+ for (let atom of boolAtoms)
{
this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true");
this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false");
@@ -1009,7 +1034,7 @@ var treeView = {
filter: "",
data: null,
allData: [],
- dataMap: {__proto__: null},
+ dataMap: Object.create(null),
sortColumn: null,
sortProc: null,
resortTimeout: null,
@@ -1038,7 +1063,7 @@ var treeView = {
clearData: function(data) {
var oldRows = this.rowCount;
this.allData = [];
- this.dataMap = {__proto__: null};
+ this.dataMap = Object.create(null);
this.refilter();
this.boxObject.rowCountChanged(0, -oldRows);
@@ -1119,7 +1144,7 @@ var treeView = {
updateFilters: function()
{
- for each (let item in this.allData)
+ for (let item of this.allData)
{
if (item.filter instanceof RegExpFilter && item.filter.disabled)
delete item.filter;
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul
index 180b3ec..208389d 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebarDetached.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebarDetached.xul
index b7e117b..6738177 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebarDetached.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebarDetached.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.png
new file mode 100644
index 0000000..f1485e4
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/ajax-loader.gif b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/ajax-loader.gif
new file mode 100644
index 0000000..a642494
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/ajax-loader.gif
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-main.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-main.png
new file mode 100644
index 0000000..464a997
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-main.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-share.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-share.png
new file mode 100644
index 0000000..b572b56
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background-share.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background.png
new file mode 100644
index 0000000..bb19387
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/background.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/donate.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/donate.png
new file mode 100644
index 0000000..3e77b37
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/donate.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/malware.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/malware.png
new file mode 100644
index 0000000..9b51b63
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/malware.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/social.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/social.png
new file mode 100644
index 0000000..a2af1ea
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/social.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/tracking.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/tracking.png
new file mode 100644
index 0000000..a8727a9
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/features/tracking.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/firstRun.css b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/firstRun.css
new file mode 100644
index 0000000..a3c57d8
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/firstRun.css
@@ -0,0 +1,601 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+@font-face {
+ font-family: 'CreteRound';
+ font-style: normal;
+ src: url(fonts/CreteRound-Regular.otf);
+ src: local ('Ø'),
+ /*local ('Ø') forces using no local font called CreteRound*/
+ url(fonts/CreteRound-Regular.otf) format('otf');
+}
+
+@font-face {
+ font-family: 'CreteRound';
+ font-style: italic;
+ src: url(fonts/CreteRound-Italic.otf);
+ src: local ('Ø'),
+ /*local ('Ø') forces using no local font called CreteRound*/
+ url(fonts/CreteRound-Italic.otf) format('otf');
+}
+
+body
+{
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: 15px;
+ line-height: 140%;
+ color: #7f776b;
+ background-color: #f8f6f2;
+ background-image: url(background-main.png);
+ margin: 0;
+ padding: 0;
+}
+
+a, a:link, a:visited
+{
+ color: #5a84b3;
+ text-decoration: underline;
+}
+
+a:hover
+{
+ text-decoration: none;
+}
+
+button
+{
+ cursor: pointer;
+}
+
+ul
+{
+ margin: 0;
+ padding: 0;
+}
+
+li
+{
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+header
+{
+ background-image: url(background.png);
+ background-repeat: repeat-x;
+ width: 100%;
+ padding: 25px 0 0 0;
+}
+
+header h1
+{
+ font-size: 24px;
+ font-weight: normal;
+ color: #57ab5b;
+ text-align: center;
+ margin: 21px auto;
+ padding: 16px 0 14px 0;
+ border: 1px #57ab5b;
+ border-style: dashed none;
+ /* border parallel fix - 957px is the value
+ * closest to 960px(page width) which makes
+ * the dashed border parallel
+ */
+ max-width: 957px;
+}
+
+h1,h2,h3
+{
+ font-family: CreteRound, Helvetica, Arial, sans-serif;
+}
+
+h2
+{
+ font-size: 26px;
+ font-weight: lighter;
+ color: #968d81;
+ line-height: 28px;
+ text-align: center;
+ margin: 0;
+ padding: 0;
+}
+
+h3
+{
+ font-size: 22px;
+ color: #7F776B;
+ font-weight: normal;
+ margin: 0 0 10px 0;
+ padding: 0;
+ line-height: 24px;
+}
+
+h4
+{
+ font-size: 15px;
+ color: #7f776b;
+ font-weight: normal;
+ text-align: center;
+ margin: 0;
+ padding: 0;
+}
+
+section
+{
+ margin: 0 auto;
+ margin-bottom: 30px;
+ max-width: 760px;
+ background-image: url(background.png);
+ padding: 40px 100px;
+}
+
+section > p
+{
+ margin: 15px 0 0 0;
+}
+
+#logo
+{
+ margin: 0 auto;
+ height: 128px;
+ width: 128px;
+ display: block;
+}
+
+#can-do-more
+{
+ max-width: 960px;
+ padding: 40px 0px 0px 0px;
+ border-bottom: 4px solid #968D81;
+}
+
+#can-do-more > h2
+{
+ margin: 0 100px;
+}
+
+.feature-malware-image
+{
+ background-image: url(features/malware.png);
+ background-repeat: no-repeat;
+}
+
+.feature-social-image
+{
+ background-image: url(features/social.png);
+ background-repeat: no-repeat;
+}
+
+.feature-tracking-image
+{
+ background-image: url(features/tracking.png);
+ background-repeat: no-repeat;
+}
+
+#can-do-more-content
+{
+ margin: 30px 100px 20px 100px;
+}
+
+#can-do-more #features
+{
+ border-spacing: 10px;
+ margin: 0px;
+ padding: 0px;
+}
+
+#can-do-more .feature:not([hidden])
+{
+ display: block;
+ list-style-type: none;
+ padding: 30px 0;
+ padding-bottom: 20px;
+ border-top: 1px dashed #c0bebb;
+}
+
+#can-do-more .feature-image, #can-do-more .feature-description
+{
+ display: inline-block;
+ *display: inline; /* IE6 inline-block fix */
+ *zoom: 1;
+ vertical-align: top;
+}
+
+#can-do-more .feature-description
+{
+ margin: 0px 0px 0 20px;
+ width: 625px;
+ max-width: 85%;
+}
+
+#can-do-more .feature-description-textblock
+{
+ width: 480px;
+ max-width: 100%;
+ margin: 0 40px 0 0;
+ display: inline-block;
+}
+
+#can-do-more .feature-description-textblock > span
+{
+ margin: 15px 0 0 0;
+}
+
+#can-do-more .feature-image
+{
+ width: 59px;
+ height: 59px;
+ margin: 8px 0 10px 20px;
+}
+
+#share
+{
+ background-image: url(background-share.png);
+ padding: 50px 100px 40px 100px;
+ max-width: 760px;
+ text-align: center;
+ font-family: CreteRound, Helvetica, Arial, sans-serif;
+}
+
+#share h2
+{
+ color: #fff;
+ margin: 0 0 30px 0;
+}
+
+#share h2 > a
+{
+ color: #fff;
+}
+
+#share h2 > a:hover
+{
+ color: #2e5075;
+}
+
+#share span
+{
+ color: #bed1e6;
+ text-align: center;
+ line-height: 34px;
+ font-size: 22px;
+ display: block;
+}
+
+#donate:hover, .share-buttons a:hover
+{
+ box-shadow: 0px 0px 0px 2px #8ca7c4;
+ border-radius: 30px;
+}
+
+#donate-block span, #share-block span
+{
+ margin: 10px 20px 0px 20px;
+}
+
+#donate-block, #share-block
+{
+ min-width: 250px;
+ display: inline-block;
+ vertical-align: top;
+ padding: 5px 0 5px 0;
+ border: 1px dashed #37506d;
+ border-style: none dashed;
+}
+
+#donate-block
+{
+ width: 50%;
+}
+
+#share-block
+{
+ width: 49%;
+
+ -webkit-border-start-style: none;
+ -moz-border-start-style: none;
+}
+
+.share-buttons
+{
+ margin: 6px 0 0 0;
+ cursor: pointer;
+ vertical-align: top;
+ /* because inline block creates
+ * space if not captured with
+ * font-size and line-height 0px
+ */
+ font-size: 0px;
+ line-height: 0px;
+}
+
+.share-buttons > a
+{
+ width: 50px;
+ height: 50px;
+ margin: 0 8px;
+ text-decoration: none;
+ display: inline-block;
+}
+
+#share-general,
+#share-chinese:lang(zh)
+{
+ display: block;
+}
+
+#share-general:lang(zh),
+#share-chinese
+{
+ display: none;
+}
+
+#share-chinese > a
+{
+ border-bottom: 2px solid transparent;
+}
+
+#share-chinese > a:hover
+{
+ box-shadow: none;
+ border-radius: 0;
+ border-bottom: 2px solid #8CA7C4;
+}
+
+#share-facebook
+{
+ background-image: url(social/facebook.png);
+ background-repeat: no-repeat;
+}
+
+#share-twitter
+{
+ background-image: url(social/twitter.png);
+ background-repeat: no-repeat;
+}
+
+#share-gplus
+{
+ background-image: url(social/googleplus.png);
+ background-repeat: no-repeat;
+}
+
+#share-renren
+{
+ background-image: url(social/renren.png);
+ background-repeat: no-repeat;
+}
+
+#share-weibo
+{
+ background-image: url(social/weibo.png);
+ background-repeat: no-repeat;
+}
+
+.warning
+{
+ font-size: 160%;
+ border: 3px dashed red;
+ text-align: center;
+ line-height: 1.3em;
+}
+
+#social ul
+{
+ list-style: none;
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+}
+
+#social:hover h1
+{
+ opacity: 0;
+}
+
+#social ul:hover li {
+ opacity: 0.3;
+}
+
+#social ul li
+{
+ display: inline-block;
+ margin: 0px 5px;
+ -webkit-transition: opacity .5s ease, bottom .3s ease;
+ transition: opacity .5s ease, bottom .3s ease;
+ position: relative;
+ bottom: -30px;
+}
+
+#social ul li:hover
+{
+ opacity: 1.0;
+ bottom: 0px;
+}
+
+.share-button
+{
+ display: inline-block;
+ width: 82px;
+ height: 82px;
+}
+
+#glass-pane, #share-popup
+{
+ visibility: hidden;
+ opacity: 0;
+ -webkit-transition-property: opacity;
+ transition-property: opacity;
+}
+
+#glass-pane
+{
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background: rgba(0, 0, 0, 0.5) url(ajax-loader.gif) no-repeat 50% 50%;
+ z-index: 101;
+ -webkit-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+
+#share-popup
+{
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ border: none;
+ -webkit-transition-delay: 0.1s;
+ transition-delay: 0.1s;
+}
+
+#glass-pane.visible, #share-popup.visible
+{
+ visibility: visible;
+ opacity: 1;
+}
+
+#share-popup.visible
+{
+ -webkit-transition-duration: 0.15s;
+ transition-duration: 0.15s;
+}
+
+/* Change order of the blocks for French */
+#content:lang(fr)
+{
+ display: table;
+ margin: auto;
+ caption-side: bottom;
+}
+
+#share:lang(fr)
+{
+ display: table-caption;
+}
+
+.toggle
+{
+ cursor: pointer;
+ position: relative;
+ display: inline-block;
+ vertical-align: top;
+ height: 22px;
+ margin: 32px 0px 7px 0px;
+ border-radius: 9999px;
+ border: 1px solid #999;
+ overflow: hidden;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+.toggle:hover
+{
+ box-shadow: 0px 0px 3px 0px #968d81;
+}
+
+.toggle:active
+{
+ cursor: wait;
+}
+
+.toggle-on, .toggle-off
+{
+ min-width: 42px;
+ height: 100%;
+ font-size: 11px;
+ font-weight: 500;
+ text-align: center;
+ line-height: 23px;
+ border-radius: 9999px;
+}
+
+.toggle-on
+{
+ padding: 0px 30px 0px 10px;
+ color: rgba(255,255,255, 0.8);
+ text-shadow: 1px 1px rgba(0,0,0,0.2);
+ box-shadow: inset 2px 2px 6px rgba(0,0,0,0.2);
+ background: rgb(69,163,31);
+}
+
+.toggle-off
+{
+ padding: 0px 10px 0px 30px;
+ color: rgba(0,0,0,0.6);
+ text-shadow: 1px 1px rgba(255,255,255,0.2);
+ background: #cfcfcf;
+ background: -moz-linear-gradient(top, #cfcfcf 0%, #f5f5f5 100%);
+ background: -webkit-linear-gradient(top, #cfcfcf 0%,#f5f5f5 100%);
+ background: linear-gradient(to bottom, #cfcfcf 0%,#f5f5f5 100%);
+}
+
+.toggle-blob
+{
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ height: 100%;
+ width: 22px;
+ border-radius: 50px;
+ background: #cfcfcf;
+ background: -moz-linear-gradient(bottom, #cfcfcf 0%, #f5f5f5 100%);
+ background: -webkit-linear-gradient(bottom, #cfcfcf 0%,#f5f5f5 100%);
+ background: linear-gradient(to top, #cfcfcf 0%,#f5f5f5 100%);
+ box-shadow: 1px 1px 2px #888;
+}
+
+.off .toggle-on
+{
+ margin-top: -22px;
+}
+
+.off .toggle-blob
+{
+ left: 0px;
+ right: auto;
+}
+
+#donate
+{
+ height: 21px;
+ display: inline-block;
+ margin: 15px 0px 2px 0px;
+ font-size: 16px;
+ color: #003366;
+ cursor: pointer;
+ font-weight: bold;
+ padding: 5px 18px;
+ text-decoration: none;
+ border-radius: 20px;
+ border: 1px solid #FF9933;
+ overflow: hidden;
+ font-family: arial, sans-serif;
+ background-image: url(donate.png);
+ background-repeat: repeat-x;
+}
+
+footer
+{
+ margin: 0 auto 30px;
+ max-width: 960px;
+ text-align: center;
+}
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Italic.otf b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Italic.otf
new file mode 100644
index 0000000..169bced
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Italic.otf
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Regular.otf b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Regular.otf
new file mode 100644
index 0000000..d951855
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/fonts/CreteRound-Regular.otf
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/facebook.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/facebook.png
new file mode 100644
index 0000000..f45c417
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/facebook.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/googleplus.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/googleplus.png
new file mode 100644
index 0000000..53e6819
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/googleplus.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/renren.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/renren.png
new file mode 100644
index 0000000..e9af994
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/renren.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/twitter.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/twitter.png
new file mode 100644
index 0000000..fec913a
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/twitter.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/weibo.png b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/weibo.png
new file mode 100644
index 0000000..176a628
--- /dev/null
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/skin/social/weibo.png
Binary files differ
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.js
index 3fdcc18..b9129ea 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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
@@ -239,7 +239,7 @@ function validateURL(url)
{
if (!url)
return null;
- url = url.replace(/^\s+/, "").replace(/\s+$/, "");
+ url = url.trim();
// Is this a file path?
try {
@@ -266,7 +266,7 @@ function addSubscription()
return false;
}
- let title = E("title").value.replace(/^\s+/, "").replace(/\s+$/, "");
+ let title = E("title").value.trim();
if (!title)
title = url;
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.xul b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.xul
index 17f1854..f2e1e44 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.xul
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptionSelection.xul
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!--
- - This file is part of Adblock Plus <http://adblockplus.org/>,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - This file is part of Adblock Plus <https://adblockplus.org/>,
+ - Copyright (C) 2006-2015 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
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptions.xml b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptions.xml
index 6a05d5e..f6727b2 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptions.xml
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/subscriptions.xml
@@ -2,7 +2,7 @@
<!--
- This file is part of the Adblock Plus web scripts,
- - Copyright (C) 2006-2014 Eyeo GmbH
+ - Copyright (C) 2006-2015 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
@@ -45,7 +45,7 @@
<subscription title="EasyList Czech and Slovak+EasyList"
specialization="čeština, slovenčina"
url="https://easylist-downloads.adblockplus.org/easylistczechslovak+easylist.txt"
- homepage="http://adblocksk.tk/"
+ homepage="http://adblock.sk/"
prefixes="cs,sk"
author="tomasko126"/>
<subscription title="EasyList Dutch+EasyList"
@@ -108,10 +108,4 @@
homepage="https://code.google.com/p/ruadlist/"
prefixes="ru,uk"
author="Lain_13"/>
- <subscription title="Wiltteri+EasyList"
- specialization="suomi"
- url="https://easylist-downloads.adblockplus.org/wiltteri+easylist.txt"
- homepage="http://wiltteri.net/"
- prefixes="fi"
- author="None"/>
</subscriptions> \ No newline at end of file
diff --git a/data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js b/data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js
index 49f6e7f..171fd60 100644
--- a/data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js
+++ b/data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 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