[Pkg-mozext-commits] [adblock-plus] 35/74: Issue 1526 - Implement new options page design for Chrome/Opera/Safari (general implementation)
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 12:07:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit c797d952fb40ccef6bc10e6ae404ed0fe110bc22
Author: Manvel Saroyan <manvel at adblockplus.org>
Date: Mon Jun 15 13:32:04 2015 +0200
Issue 1526 - Implement new options page design for Chrome/Opera/Safari (general implementation)
---
locale/en-US/options.json | 266 ++++++++++++++
options.html | 313 +++++++++++++++++
options.js | 657 ++++++++++++++++++++++++++++++++++
skin/options-sprite.png | Bin 0 -> 2850 bytes
skin/options.css | 876 ++++++++++++++++++++++++++++++++++++++++++++++
subscriptions.xml | 151 ++++++++
6 files changed, 2263 insertions(+)
diff --git a/locale/en-US/options.json b/locale/en-US/options.json
new file mode 100644
index 0000000..f840d74
--- /dev/null
+++ b/locale/en-US/options.json
@@ -0,0 +1,266 @@
+{
+ "options_page_title": {
+ "description": "Options page title",
+ "message": "Adblock Plus Options"
+ },
+ "options_page_header_1": {
+ "description": "Page title in navigation sidebar",
+ "message": "Options"
+ },
+ "options_page_header_2": {
+ "description": "Name of extension in navigation sidebar",
+ "message": "Adblock <strong>Plus</strong>"
+ },
+ "options_tab_general": {
+ "description": "Name in sidebar for General tab",
+ "message": "General"
+ },
+ "options_tab_advanced": {
+ "description": "Name in sidebar for Advanced tab",
+ "message": "Advanced"
+ },
+ "options_tab_help": {
+ "description": "Name in sidebar for Help tab",
+ "message": "Help"
+ },
+ "options_version": {
+ "description": "Version label in navigation sidebar",
+ "message": "Version"
+ },
+ "options_tab_share": {
+ "description": "Share button in navigation sidebar",
+ "message": "Share"
+ },
+ "options_tab_donate": {
+ "description": "Donate button in navigation sidebar",
+ "message": "Donate"
+ },
+ "options_readMore": {
+ "description": "Read more element that shows tooltip with description",
+ "message": "read more"
+ },
+ "options_blocking_title": {
+ "description": "Blocking section name in General tab",
+ "message": "Blocking"
+ },
+ "options_language_title": {
+ "description": "Option name in General tab",
+ "message": "<strong>Adblocking</strong> for websites in..."
+ },
+ "options_language_add": {
+ "description": "Add other language button in General Tab",
+ "message": "add other website languages"
+ },
+ "options_furtherBlocking_title": {
+ "description": "Option name in General tab",
+ "message": "Further blocking options"
+ },
+ "options_popular": {
+ "description": "Popular label in further blocking options table",
+ "message": "popular"
+ },
+ "options_furtherBlocking_add": {
+ "description": "Button name for adding other blocking list in General tab",
+ "message": "add other blocking list"
+ },
+ "options_exceptions_title": {
+ "description": "Exceptions section name in General tab",
+ "message": "Exceptions"
+ },
+ "options_acceptableAds_title": {
+ "description": "Acceptable ads option name in General tab",
+ "message": "Acceptable ads"
+ },
+ "options_acceptableAds_description": {
+ "description": "Acceptable ads descriptive name in General tab",
+ "message": "Allow some non-intrusive advertising"
+ },
+ "options_whitelisted_title": {
+ "description": "Whitelisting option name in General tab",
+ "message": "Whitelisted websites"
+ },
+ "options_button_add": {
+ "description": "Add button label",
+ "message": "add"
+ },
+ "options_button_cancel": {
+ "description": "Cancel button label",
+ "message": "cancel"
+ },
+ "options_tweaks_title": {
+ "description": "Tweaks section name in Advanced tab",
+ "message": "Tweaks"
+ },
+ "options_tweaks_blockElement": {
+ "description": "Show block Element option in Advanced tab",
+ "message": "Show <a>Block Element</a> right-click menu item"
+ },
+ "options_blockingList_title": {
+ "description": "Blocking list section title in Advanced tab",
+ "message": "Blocking list"
+ },
+ "options_tab_overview": {
+ "description": "Tab name in Advanced tab",
+ "message": "Overview"
+ },
+ "options_tab_ownList": {
+ "description": "Tab name in Advanced tab",
+ "message": "Edit or create own blocking list"
+ },
+ "options_tableCol_name": {
+ "description": "Name of column of subscription list table in Advanced tab",
+ "message": "Name"
+ },
+ "options_tableCol_description": {
+ "description": "Name of column of subscription list table in Advanced tab",
+ "message": "Description"
+ },
+ "options_tableCol_date": {
+ "description": "Name of column of subscription list table in Advanced tab",
+ "message": "Date"
+ },
+ "options_blockingList_add": {
+ "description": "Import button in Advanced tab",
+ "message": "add/import other blocking list"
+ },
+ "options_blockingList_update": {
+ "description": "Update button in Advanced tab",
+ "message": "Update all blocking lists"
+ },
+ "options_blockingRules": {
+ "description": "Own blicking list header in Advanced tab",
+ "message": "Blocking rules"
+ },
+ "options_blockingRules_edit": {
+ "description": "Edit rules button in Advanced tab",
+ "message": "edit rules"
+ },
+ "options_faq_title": {
+ "description": "FAQ section name in Help tab and link label in same section",
+ "message": "Frequently asked questions"
+ },
+ "options_faq_description": {
+ "description": "FAQ section description in Help tab",
+ "message": "You only need to refresh your blocking list in \"Advanced\" very often, but there are also other known problems."
+ },
+ "options_forum_title": {
+ "description": "Forum section name in Help tab",
+ "message": "Forum"
+ },
+ "options_forum_description": {
+ "description": "Forum section description in Help tab",
+ "message": "If the frequently asked questions helped you can reach us in our forum."
+ },
+ "options_forum_link": {
+ "description": "Forum section link in Help tab",
+ "message": "Adblock Plus support forum"
+ },
+ "options_media_title": {
+ "description": "Social media Section name in Help tab",
+ "message": "Social media"
+ },
+ "options_media_description": {
+ "description": "Social media section description in Help tab",
+ "message": "If there are major problems with Adblock Plus which affects all of our users, we tell you in our social media channels."
+ },
+ "options_dialog_customlist_title": {
+ "description": "Title of custom list modal dialog",
+ "message": "Add other blocking list"
+ },
+ "options_close": {
+ "description": "Close modal button",
+ "message": "close"
+ },
+ "options_dialog_customlist_subscription_title": {
+ "description": "Add customlist modal import hint message",
+ "message": "Via URL/Link"
+ },
+ "options_dialog_customlist_import": {
+ "description": "Button in add custom subscription modal dialog",
+ "message": "import blocking list with this URL"
+ },
+ "options_dialog_edit_own_list": {
+ "description": "Edit own blocking list section name in custom subscription modal dialog",
+ "message": "edit own blocking list"
+ },
+ "options_dialog_create_own_list": {
+ "description": "Button in custom subscription modal dialog",
+ "message": "create own blocking rules"
+ },
+ "options_dialog_language_title": {
+ "description": "Button in gerenal tab",
+ "message": "Add other website language"
+ },
+ "options_dialog_language_find": {
+ "description": "Placeholder text in add language modal dialog",
+ "message": "Find language"
+ },
+ "options_dialog_language_added": {
+ "description": "Table headline in add language modal dialog",
+ "message": "Added languages"
+ },
+ "options_dialog_language_other": {
+ "description": "Table headline in add language modal dialog",
+ "message": "Other languages"
+ },
+ "options_language_en": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "English"
+ },
+ "options_language_id": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Indonesian"
+ },
+ "options_language_bg": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Bulgarian"
+ },
+ "options_language_zh": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Chinese"
+ },
+ "options_language_cs_sk": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Czech and Slovak"
+ },
+ "options_language_nl": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Dutch"
+ },
+ "options_language_de": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "German"
+ },
+ "options_language_he": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Hebrew"
+ },
+ "options_language_it": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Italian"
+ },
+ "options_language_lt": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Lithuanian"
+ },
+ "options_language_lv": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Latvian"
+ },
+ "options_language_ar": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Arabic"
+ },
+ "options_language_fr": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "French"
+ },
+ "options_language_ro": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Romanian"
+ },
+ "options_language_ru_uk": {
+ "description": "Language name shown in add language modal dialog",
+ "message": "Russian and Ukrainian"
+ }
+}
\ No newline at end of file
diff --git a/options.html b/options.html
new file mode 100644
index 0000000..b7b8874
--- /dev/null
+++ b/options.html
@@ -0,0 +1,313 @@
+<!DOCTYPE html>
+<!--
+ - 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/>.
+ -->
+
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title class="i18n_options_page_title"></title>
+ <link rel="stylesheet" href="skin/options.css">
+ <style id="search-style"></style>
+ <script src="ext/common.js"></script>
+ <script src="ext/content.js"></script>
+ <script src="i18n.js"></script>
+ <script src="options.js"></script>
+ </head>
+ <body data-tab="general">
+ <!-- Navigation sidebar -->
+ <div id="nav-sidebar">
+ <div id="fixed-sidebar" class="fixed">
+ <div id="page-title">
+ <p class="i18n_options_page_header_1"></p>
+ <h1 class="i18n_options_page_header_2"></h1>
+ </div>
+ <ul id="main-navigation-tabs" class="tabs vertical">
+ <li id="tab-general" data-show="general" class="active">
+ <span class="i18n_options_tab_general"></span>
+ <span class="icon"></span>
+ </li>
+ <li id="tab-advanced" data-show="advanced">
+ <span class="i18n_options_tab_advanced"></span>
+ <span class="icon"></span>
+ </li>
+ <li id="tab-help" data-show="help">
+ <span class="i18n_options_tab_help"></span>
+ <span class="icon"></span>
+ </li>
+ </ul>
+ <p class="nav-link">
+ <span class="i18n_options_version"></span> <span id="abp-version"></span>
+ </p>
+ <ul class="tabs vertical bottom">
+ <li id="tab-share">
+ <span class="i18n_options_tab_share"></span><span class="icon"></span>
+ </li>
+ <li id="tab-donate">
+ <span class="i18n_options_tab_donate"></span><span class="icon"></span>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="tab-content">
+ <div id="content-wrapper">
+ <div id="dialog-background"></div>
+
+ <!-- General tab content -->
+ <div id="content-general">
+ <div>
+ <h1 class="i18n_options_blocking_title"></h1>
+ <div class="flex-container">
+ <div id="blocking-languages">
+ <p class="option-name">
+ <span class="i18n_options_language_title"></span>
+ <a class="i18n_options_readMore tooltip" target="_blank"></a>
+ </p>
+ <ul id="blocking-languages-table" class="table list">
+ <template>
+ <input type="checkbox" class="control" />
+ <span class="display"></span>
+ </template>
+ </ul>
+ <div class="controls">
+ <button id="add-website-language">
+ <span class="icon icon-add"></span>
+ <span class="i18n_options_language_add"></span>
+ </button>
+ </div>
+ </div>
+ <div id="further-blocking">
+ <p class="option-name">
+ <strong class="i18n_options_furtherBlocking_title"></strong>
+ <a class="i18n_options_readMore tooltip" target="_blank"></a>
+ </p>
+ <div id="custom-wrapper">
+ <ul id="recommend-list-table" class="table list">
+ <template>
+ <input type="checkbox" class=control />
+ <span class="display"></span>
+ <span class="popular"></span>
+ </template>
+ </ul>
+ <ul id="custom-list-table" class="table list">
+ <template>
+ <input type="checkbox" class="control" />
+ <span class="display"></span>
+ </template>
+ </ul>
+ </div>
+ <div class="controls">
+ <button id="add-blocking-list">
+ <span class="icon icon-add"></span>
+ <span class="i18n_options_furtherBlocking_add"><span>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div>
+ <h1 class="i18n_options_exceptions_title"></h1>
+ <div class="flex-container">
+ <div id="acceptable-ads">
+ <p class="option-name">
+ <strong class="i18n_options_acceptableAds_title"></strong>
+ <a class="i18n_options_readMore tooltip" target="_blank"></a>
+ </p>
+ <ul id="acceptableads-table" class="table list">
+ <template>
+ <input type="checkbox" class="control" />
+ <span class="display"></span>
+ </template>
+ </ul>
+ </div>
+ <div id="whitelisting">
+ <p class="option-name">
+ <strong class="i18n_options_whitelisted_title"></strong>
+ <a class="i18n_options_readMore tooltip" target="_blank"></a>
+ </p>
+ <ul id="whitelisting-table" class="table list">
+ <template>
+ <button class="delete control"></button>
+ <span class="display"></span>
+ </template>
+ </ul>
+ <div class="controls">
+ <div>
+ <span id="whitelisting-add-icon" class="icon icon-add"></span>
+ <input type="text" id="whitelisting-textbox" />
+ <span id="whitelisting-enter-icon" class="icon icon-enter"></span>
+ </div>
+ <div>
+ <button id="whitelisting-add-button" class="button-add">
+ +<span class="i18n_options_button_add"></span>
+ </button>
+ <span></span>
+ <button id="whitelisting-cancel-button" class="i18n_options_button_cancel cancel-button"></button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Advanced tab content -->
+ <div id="content-advanced">
+ <div>
+ <h1><span class="i18n_options_tweaks_title"></span><a class="i18n_options_readMore tooltip" href="#"></a></h1>
+ <ul class="table" style="width: auto;">
+ <li>
+ <input type="checkbox" id="easylist"/><span id="block-element-explanation" class="i18n_options_tweaks_blockElement"></span></li>
+ </ul>
+ </div>
+ <div>
+ <h1><span class="i18n_options_blockingList_title"></span><a class="i18n_options_readMore tooltip" href="#" target="_blank"></a></h1>
+ <ul id="blocking-list-tabs" class="tabs horizontal">
+ <li class="i18n_options_tab_overview active" data-show="blocking-list-overview"></li><li class="i18n_options_tab_ownList" data-show="blocking-list-own"></li>
+ </ul>
+ <div id="blocking-list">
+ <div id="blocking-list-overview">
+ <ul class="table cols" style="width: auto;">
+ <li class="col-name"><span class="i18n_options_tableCol_name"></span><span class="i18n_options_tableCol_description"></span><span class="i18n_options_tableCol_date"></span></li>
+ <li><input type="checkbox" id="easylist"/><span>Easylist</span><span>Adblocking english sites</span><span>15 March 14 - 10:31</span></li>
+ <li><input type="checkbox" id="easylist+de"/><span>Easylist Germany + Easylist</span><span>Adblocking english + german sites</span><span>15 March 14 - 10:31</span></li>
+ <li><input type="checkbox" id="annoyance-fb"/><span>Facebook annoyance blocker</span><span>Blocks Facebook annoyances</span><span>15 March 14 - 10:31</span></li>
+ <li><input type="checkbox" id="annoyance-youtube"/><span>Facebook annoyance blocker</span><span>Blocks Facebook annoyances</span><span>15 March 14 - 10:31</span></li>
+ <li><input type="checkbox" id="own-list"/><span>Own blocking list</span><span>Your own blocking list</span><span><a href="#">edit your blocking list</a></span></li>
+ </ul>
+ <div class="controls">
+ <button>
+ <span class="icon icon-add"></span><span class="i18n_options_blockingList_add"></span>
+ </button>
+ <button>
+ <span class="icon icon-update"></span><span class="i18n_options_blockingList_update"></span>
+ </button>
+ </div>
+ </div>
+ <div id="blocking-list-own">
+ <p class="i18n_options_blockingRules"></p>
+ <ul class="table list">
+ <li><span>zap2it.com##.zc-station-position</span></li>
+ <li><span>downturk.net##.zippo</span></li>
+ <li><span>yahoo.com##.y708-promo-middle</span></li>
+ <li><span>reflector.com##.yahooboss</span></li>
+ <li><span>yardbarker.com##.yard_leader</span></li>
+ <li><span>espn.co.uk##.will_hill</span></li>
+ <li><span>listverse.com##.wiki</span></li>
+ <li><span>planet5d.com##.wp-image-1573</span></li>
+ <li><span>buzzinn.net##.wpn_finner</span></li>
+ <li><span>talkers.com##.wpss_slideshow</span></li>
+ </ul>
+ <div class="controls" style="margin: 0px;">
+ <input type="text" placeholder="add your blocking rule here"/>
+ <div class="input-control">
+ <span class="input-separator"></span>
+ <span class="i18n_options_button_add input-button-text"></span>
+ <span class="icon icon-enter-blue"></span>
+ </div>
+ </div>
+ <div class="controls">
+ <button>
+ <span class="icon icon-edit"></span>
+ <span class="i18n_options_blockingRules_edit"></span>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Help tab content -->
+ <div id="content-help">
+ <h1 class="i18n_options_faq_title"></h1>
+ <p class="i18n_options_faq_description"></p>
+ <p>
+ <a class="i18n_options_faq_title" href="#" target="_blank"></a>
+ </p>
+ <h1 class="i18n_options_forum_title"></h1>
+ <p class="i18n_options_forum_description"></p>
+ <p>
+ <a class="i18n_options_forum_link" href="#" target="_blank"></a>
+ </p>
+ <h1 class="i18n_options_media_title"></h1>
+ <p class="i18n_options_media_description"></p>
+ <p>
+ <a href="#" target="_blank">Twitter</a>
+ <a href="#" target="_blank">Facebook</a>
+ <a href="#" target="_blank">Google+</a>
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <!-- Dialog -->
+ <div id="dialog">
+ <header>
+ <span id="dialog-title">
+ <span id="dialog-title-customlist" class="i18n_options_dialog_customlist_title"></span>
+ <span id="dialog-title-language" class="i18n_options_dialog_language_title"></span>
+ </span>
+ <button id="dialog-close" class="i18n_options_close"></button>
+ </header>
+ <div id="dialog-body" class="content">
+ <!-- Add other website language: Dialog -->
+ <div id="dialog-content-language" class="dialog-content">
+ <div class="dialog-content-block">
+ <h3 class="i18n_options_dialog_language_added"></h3>
+ <ul id="blocking-languages-dialog-table" class="table list">
+ <template>
+ <span class="display"></span>
+ </template>
+ </ul>
+ </div>
+ <div id="other-language" class="dialog-content-block">
+ <h3 class="i18n_options_dialog_language_other"></h3>
+ <div>
+ <input type="search" id="find-language" />
+ </div>
+ <ul id="all-lang-table" class="table list">
+ <template>
+ <button class="button-add control">
+ +<span></span>
+ </button>
+ <span class="display"></span>
+ </template>
+ </ul>
+ </div>
+ </div>
+ <!-- Add other blocking list: Dialog -->
+ <div id="dialog-content-customlist" class="dialog-content">
+ <div class="dialog-content-block">
+ <h3 class="i18n_options_dialog_customlist_subscription_title"></h3>
+ <div>
+ <input id="blockingList-textbox" type="text" placeholder="www.example.com/blockinglist.txt" />
+ </div>
+ <div id="import-blockingList-button" class="button-wrapper">
+ <span class="icon icon-arrow"></span>
+ <span class="i18n_options_dialog_customlist_import"></span>
+ </div>
+ </div>
+ <div class="dialog-content-block">
+ <h3 class="i18n_options_dialog_edit_own_list"></h3>
+ <div id="edit-ownBlockingList-button" class="button-wrapper">
+ <span class="icon icon-arrow"></span>
+ <span class="i18n_options_dialog_create_own_list"></span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/options.js b/options.js
new file mode 100644
index 0000000..76b7a5e
--- /dev/null
+++ b/options.js
@@ -0,0 +1,657 @@
+/*
+ * 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/>.
+ */
+
+"use strict";
+
+(function()
+{
+ var subscriptionsMap = Object.create(null);
+ var recommendationsMap = Object.create(null);
+ var filtersMap = Object.create(null);
+ var collections = Object.create(null);
+
+ function Collection(details)
+ {
+ this.details = details;
+ this.items = [];
+ }
+
+ Collection.prototype.addItems = function()
+ {
+ var length = Array.prototype.push.apply(this.items, arguments);
+ if (length == 0)
+ return;
+
+ this.items.sort(function(a, b)
+ {
+ var aValue = (a.title || a.url || a.text).toLowerCase();
+ var bValue = (b.title || b.url || a.text).toLowerCase();
+ return aValue.localeCompare(bValue);
+ });
+
+ for (var j = 0; j < this.details.length; j++)
+ {
+ var table = E(this.details[j].id);
+ var template = table.querySelector("template");
+ for (var i = 0; i < arguments.length; i++)
+ {
+ var item = arguments[i];
+ var text = item.title || item.url || item.text;
+ var listItem = document.createElement("li");
+ listItem.appendChild(document.importNode(template.content, true));
+ listItem.dataset.access = item.url || item.text;
+ listItem.querySelector(".display").textContent = text;
+ if (text)
+ listItem.dataset.search = text.toLowerCase();
+
+ var control = listItem.querySelector(".control");
+ if (control)
+ {
+ control.addEventListener("click", this.details[j].onClick, false);
+ control.checked = item.disabled == false;
+ }
+
+ if (table.hasChildNodes())
+ table.insertBefore(listItem, table.childNodes[this.items.indexOf(item)]);
+ else
+ table.appendChild(listItem);
+ }
+ }
+ return length;
+ };
+
+ Collection.prototype.removeItem = function(item)
+ {
+ var index = this.items.indexOf(item);
+ if (index == -1)
+ return;
+
+ this.items.splice(index, 1);
+ var access = (item.url || item.text).replace(/'/g, "\\'");
+ for (var i = 0; i < this.details.length; i++)
+ {
+ var table = E(this.details[i].id);
+ var element = table.querySelector("[data-access='" + access + "']");
+ element.parentElement.removeChild(element);
+ }
+ };
+
+ Collection.prototype.clearAll = function()
+ {
+ for (var i = 0; i < this.details.length; i++)
+ {
+ var table = E(this.details[i].id);
+ var template = table.querySelector("template");
+ table.innerHTML = "";
+ table.appendChild(template);
+ }
+ this.items.length = 0;
+ };
+
+ function onToggleSubscriptionClick(e)
+ {
+ e.preventDefault();
+ var subscriptionUrl = e.target.parentNode.dataset.access;
+ if (!e.target.checked)
+ removeSubscription(subscriptionUrl);
+ else
+ addEnableSubscription(subscriptionUrl);
+ }
+
+ function onAddLanguageSubscriptionClick(e)
+ {
+ e.preventDefault();
+ var url = this.parentNode.dataset.access;
+ addEnableSubscription(url);
+ }
+
+ function onRemoveFilterClick()
+ {
+ var filter = this.parentNode.dataset.access;
+ removeFilter(filter);
+ }
+
+ collections.popular = new Collection(
+ [
+ {
+ id: "recommend-list-table",
+ onClick: onToggleSubscriptionClick
+ }
+ ]);
+ collections.langs = new Collection(
+ [
+ {
+ id: "blocking-languages-table",
+ onClick: onToggleSubscriptionClick
+ },
+ {
+ id: "blocking-languages-dialog-table"
+ }
+ ]);
+ collections.allLangs = new Collection(
+ [
+ {
+ id: "all-lang-table",
+ onClick: onAddLanguageSubscriptionClick
+ }
+ ]);
+ collections.acceptableAds = new Collection(
+ [
+ {
+ id: "acceptableads-table",
+ onClick: onToggleSubscriptionClick
+ }
+ ]);
+ collections.custom = new Collection(
+ [
+ {
+ id: "custom-list-table",
+ onClick: onToggleSubscriptionClick
+ }
+ ]);
+ collections.whitelist = new Collection(
+ [
+ {
+ id: "whitelisting-table",
+ onClick: onRemoveFilterClick
+ }
+ ]);
+
+ function updateSubscription(subscription)
+ {
+ var subscriptionUrl = subscription.url;
+ var knownSubscription = subscriptionsMap[subscriptionUrl];
+ if (knownSubscription)
+ knownSubscription.disabled = subscription.disabled;
+ else
+ {
+ getAcceptableAdsURL(function(acceptableAdsUrl)
+ {
+ function onObjectChanged()
+ {
+ var access = (subscriptionUrl || subscription.text).replace(/'/g, "\\'");
+ var elements = document.querySelectorAll("[data-access='" + access + "']");
+ for (var i = 0; i < elements.length; i++)
+ {
+ var element = elements[i];
+ var control = element.querySelector(".control");
+ if (control.localName == "input")
+ control.checked = subscription.disabled == false;
+ if (subscriptionUrl in recommendationsMap)
+ {
+ var recommendation = recommendationsMap[subscriptionUrl];
+ if (recommendation.isAdsType)
+ {
+ if (subscription.disabled == false)
+ {
+ collections.allLangs.removeItem(subscription);
+ collections.langs.addItems(subscription);
+ }
+ else
+ {
+ collections.allLangs.addItems(subscription);
+ collections.langs.removeItem(subscription);
+ }
+ }
+ }
+ }
+ }
+
+ if (!Object.observe)
+ {
+ // Currently only "disabled" property of subscription used for observation
+ // but with Advanced tab implementation we should also add more properties.
+ ["disabled"].forEach(function(property)
+ {
+ subscription["$" + property] = subscription[property];
+ Object.defineProperty(subscription, property,
+ {
+ get: function()
+ {
+ return this["$" + property];
+ },
+ set: function(value)
+ {
+ this["$" + property] = value;
+ onObjectChanged();
+ }
+ });
+ });
+ }
+ else
+ {
+ Object.observe(subscription, onObjectChanged);
+ }
+
+ var collection = null;
+ if (subscriptionUrl in recommendationsMap)
+ {
+ var recommendation = recommendationsMap[subscriptionUrl];
+ if (recommendation.isPopular)
+ collection = collections.popular;
+ else if (recommendation.isAdsType && subscription.disabled == false)
+ collection = collections.langs;
+ else
+ collection = collections.allLangs;
+ }
+ else if (subscriptionUrl == acceptableAdsUrl)
+ collection = collections.acceptableAds;
+ else
+ collection = collections.custom;
+
+ collection.addItems(subscription);
+ subscriptionsMap[subscriptionUrl] = subscription;
+ });
+ }
+ }
+
+ function updateFilter(filter)
+ {
+ var match = filter.text.match(/^@@\|\|([^\/:]+)\^\$document$/);
+ if (match && !filtersMap[filter.text])
+ {
+ filter.title = match[1];
+ collections.whitelist.addItems(filter);
+ filtersMap[filter.text] = filter
+ }
+ else
+ {
+ // TODO: add `filters[i].text` to list of custom filters
+ }
+ }
+
+ function loadRecommendations()
+ {
+ var request = new XMLHttpRequest();
+ request.open("GET", "subscriptions.xml", false);
+ request.addEventListener("load", function()
+ {
+ var list = document.getElementById("subscriptionSelector");
+ var docElem = request.responseXML.documentElement;
+ var elements = docElem.getElementsByTagName("subscription");
+ for (var i = 0; i < elements.length; i++)
+ {
+ var element = elements[i];
+ var subscription = Object.create(null);
+ subscription.title = element.getAttribute("title");
+ subscription.url = element.getAttribute("url");
+ subscription.disabled = null;
+ subscription.downloadStatus = null;
+ subscription.homepage = null;
+ subscription.lastSuccess = null;
+ var recommendation = Object.create(null);
+ recommendation.isAdsType = false;
+ recommendation.isPopular = false;
+ var prefix = element.getAttribute("prefixes");
+ if (prefix)
+ {
+ var prefix = element.getAttribute("prefixes").replace(/,/g, "_");
+ subscription.title = ext.i18n.getMessage("options_language_" + prefix);
+ recommendation.isAdsType = true;
+ }
+ else
+ subscription.title = element.getAttribute("specialization");
+
+ if (element.getAttribute("popular"))
+ recommendation.isPopular = true;
+
+ recommendationsMap[subscription.url] = recommendation;
+ updateSubscription(subscription);
+ }
+ }, false);
+ request.send(null);
+ }
+
+ function onDOMLoaded()
+ {
+ var recommendationTemplate = document.querySelector("#recommend-list-table template");
+ var popularText = ext.i18n.getMessage("options_popular");
+ recommendationTemplate.content.querySelector(".popular").textContent = popularText;
+ var languagesTemplate = document.querySelector("#all-lang-table template");
+ var buttonText = ext.i18n.getMessage("options_button_add");
+ languagesTemplate.content.querySelector(".button-add span").textContent = buttonText;
+
+ updateShareLink();
+ populateLists();
+
+ var tabList = document.querySelectorAll("#main-navigation-tabs li");
+ for (var i = 0; i < tabList.length; i++)
+ {
+ tabList[i].addEventListener("click", function(e)
+ {
+ document.body.dataset.tab = e.currentTarget.dataset.show;
+ }, false);
+ }
+
+ function onFindLanguageKeyUp()
+ {
+ var searchStyle = E("search-style");
+ if (!this.value)
+ searchStyle.innerHTML = "";
+ else
+ searchStyle.innerHTML = "#all-lang-table li:not([data-search*=\"" + this.value.toLowerCase() + "\"]) { display: none; }";
+ }
+
+ // Update version number in navigation sidebar
+ ext.backgroundPage.sendMessage(
+ {
+ method: "app.get",
+ what: "addonVersion"
+ },
+ function(addonVersion)
+ {
+ E("abp-version").textContent = addonVersion;
+ });
+
+ var placeholderValue = ext.i18n.getMessage("options_dialog_language_find");
+ E("find-language").setAttribute("placeholder", placeholderValue);
+ E("add-blocking-list").addEventListener("click", function()
+ {
+ openDialog("customlist");
+ }, false);
+ E("add-website-language").addEventListener("click", function()
+ {
+ openDialog("language");
+ }, false);
+ E("dialog-close").addEventListener("click", function()
+ {
+ delete document.body.dataset.dialog;
+ }, false);
+ E("edit-ownBlockingList-button").addEventListener("click", editCustomFilters, false);
+ E("find-language").addEventListener("keyup", onFindLanguageKeyUp, false);
+ E("whitelisting").addEventListener("click", function(e)
+ {
+ var id = e.target.id;
+ if (id == "whitelisting-add-icon" || id == "whitelisting-enter-icon")
+ addWhitelistedDomain();
+ else if (id == "whitelisting-cancel-button")
+ E("whitelisting-textbox").value = "";
+ }, false);
+ E("whitelisting-add-button").addEventListener("click", addWhitelistedDomain, false);
+ E("whitelisting-textbox").addEventListener("keypress", function(e)
+ {
+ // e.keyCode has been deprecated so we attempt to use e.key
+ // keyCode "13" corresponds to "Enter"
+ if ((e.key && e.key == "Enter") || (!e.key && e.keyCode == 13))
+ addWhitelistedDomain();
+ }, false);
+ E("import-blockingList-button").addEventListener("click", function()
+ {
+ var url = E("blockingList-textbox").value;
+ addEnableSubscription(url);
+ delete document.body.dataset.dialog;
+ }, false);
+ }
+
+ function openDialog(name)
+ {
+ document.body.dataset.dialog = name;
+ }
+
+ function populateLists()
+ {
+ subscriptionsMap = Object.create(null);
+ filtersMap = Object.create(null);
+ recommendationsMap = Object.create(null);
+
+ // Empty collections and lists
+ for (var property in collections)
+ collections[property].clearAll();
+
+ ext.backgroundPage.sendMessage(
+ {
+ type: "subscriptions.get",
+ special: true
+ },
+ function(subscriptions)
+ {
+ // Load filters
+ for (var i = 0; i < subscriptions.length; i++)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "filters.get",
+ subscriptionUrl: subscriptions[i].url
+ },
+ function(filters)
+ {
+ for (var i = 0; i < filters.length; i++)
+ updateFilter(filters[i]);
+ });
+ }
+ });
+ loadRecommendations();
+ getAcceptableAdsURL(function(acceptableAdsUrl)
+ {
+ var subscription = Object.create(null);
+ subscription.url = acceptableAdsUrl;
+ subscription.disabled = true;
+ subscription.title = ext.i18n.getMessage("options_acceptableAds_description");
+ updateSubscription(subscription);
+
+ // Load user subscriptions
+ ext.backgroundPage.sendMessage(
+ {
+ type: "subscriptions.get",
+ downloadable: true
+ },
+ function(subscriptions)
+ {
+ for (var i = 0; i < subscriptions.length; i++)
+ onSubscriptionMessage("added", subscriptions[i]);
+ });
+ });
+ }
+
+ function addWhitelistedDomain()
+ {
+ var domain = E("whitelisting-textbox");
+ if (domain.value)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "filters.add",
+ text: "@@||" + domain.value.toLowerCase() + "^$document"
+ });
+ }
+
+ domain.value = "";
+ }
+
+ function editCustomFilters()
+ {
+ //TODO: NYI
+ }
+
+ function getAcceptableAdsURL(callback)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "prefs.get",
+ key: "subscriptions_exceptionsurl"
+ },
+ function(value)
+ {
+ getAcceptableAdsURL = function(callback)
+ {
+ callback(value);
+ }
+ getAcceptableAdsURL(callback);
+ });
+ }
+
+ function addEnableSubscription(url, title, homepage)
+ {
+ var messageType = null;
+ var knownSubscription = subscriptionsMap[url];
+ if (knownSubscription && knownSubscription.disabled == true)
+ messageType = "subscriptions.toggle"
+ else
+ messageType = "subscriptions.add"
+
+ var message = {
+ type: messageType,
+ url: url
+ };
+ if (title)
+ message.title = title;
+ if (homepage)
+ message.homepage = homepage;
+
+ ext.backgroundPage.sendMessage(message);
+ }
+
+ function removeSubscription(url)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "subscriptions.remove",
+ url: url
+ });
+ }
+
+ function removeFilter(filter)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "filters.remove",
+ text: filter
+ });
+ }
+
+ function onFilterMessage(action, filter)
+ {
+ switch (action)
+ {
+ case "added":
+ updateFilter(filter);
+ updateShareLink();
+ break;
+ case "loaded":
+ populateLists();
+ break;
+ case "removed":
+ var knownFilter = filtersMap[filter.text];
+ collections.whitelist.removeItem(knownFilter);
+ delete filtersMap[filter.text];
+ updateShareLink();
+ break;
+ }
+ }
+
+ function onSubscriptionMessage(action, subscription)
+ {
+ switch (action)
+ {
+ case "added":
+ case "disabled":
+ updateSubscription(subscription);
+ updateShareLink();
+ break;
+ case "homepage":
+ // TODO: NYI
+ break;
+ case "removed":
+ getAcceptableAdsURL(function(acceptableAdsUrl)
+ {
+ if (subscription.url == acceptableAdsUrl)
+ {
+ subscription.disabled = true;
+ updateSubscription(subscription);
+ }
+ else
+ {
+ var knownSubscription = subscriptionsMap[subscription.url];
+ if (subscription.url in recommendationsMap)
+ knownSubscription.disabled = true;
+ else
+ {
+ collections.custom.removeItem(knownSubscription);
+ delete subscriptionsMap[subscription.url];
+ }
+ }
+ updateShareLink();
+ });
+ break;
+ case "title":
+ // TODO: NYI
+ break;
+ }
+ }
+
+ function showAddSubscriptionDialog(subscription)
+ {
+ E("blockingList-textbox").value = subscription.url;
+ openDialog("customlist");
+ }
+
+ function updateShareLink()
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "filters.blocked",
+ url: "https://platform.twitter.com/widgets/",
+ requestType: "SCRIPT",
+ docDomain: "adblockplus.org",
+ thirdParty: true
+ },
+ function(blocked)
+ {
+ // TODO: modify "share" link accordingly
+ });
+ }
+
+ function E(id)
+ {
+ return document.getElementById(id);
+ }
+
+ ext.onMessage.addListener(function(message)
+ {
+ switch (message.type)
+ {
+ case "app.listen":
+ if (message.action == "addSubscription")
+ showAddSubscriptionDialog(message.args[0]);
+ break;
+ case "filters.listen":
+ onFilterMessage(message.action, message.args[0]);
+ break;
+ case "subscriptions.listen":
+ onSubscriptionMessage(message.action, message.args[0]);
+ break;
+ }
+ });
+
+ ext.backgroundPage.sendMessage(
+ {
+ type: "app.listen",
+ filter: ["addSubscription"]
+ });
+ ext.backgroundPage.sendMessage(
+ {
+ type: "filters.listen",
+ filter: ["added", "loaded", "removed"]
+ });
+ ext.backgroundPage.sendMessage(
+ {
+ type: "subscriptions.listen",
+ filter: ["added", "disabled", "homepage", "removed", "title"]
+ });
+
+ window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
+})();
diff --git a/skin/options-sprite.png b/skin/options-sprite.png
new file mode 100755
index 0000000..a43eb29
Binary files /dev/null and b/skin/options-sprite.png differ
diff --git a/skin/options.css b/skin/options.css
new file mode 100644
index 0000000..989ab04
--- /dev/null
+++ b/skin/options.css
@@ -0,0 +1,876 @@
+/*
+ * 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/>.
+ */
+
+body
+{
+ background-color: #F5F5F5;
+ display: flex;
+ font-family: "Source Sans Pro", sans-serif;
+ font-size: 14px;
+ white-space: nowrap;
+}
+
+h1
+{
+ font-size: 24px;
+ font-weight: 100;
+}
+
+h2
+{
+ font-size: 16px;
+ font-weight: 500;
+}
+
+p
+{
+ font-weight: 100;
+}
+
+hr
+{
+ background-color: #CDCDCD;
+ border: 0px;
+ height: 1px;
+ margin: 0px;
+}
+
+input[type="search"]::-webkit-search-cancel-button
+{
+ display: none;
+}
+
+.option-name
+{
+ display: flex;
+}
+
+.option-name > *
+{
+ -moz-margin-end: 6px;
+ -webkit-margin-end: 6px;
+}
+
+#nav-sidebar
+{
+ position: relative;
+ padding: 0px 0px 16px 0px;
+ -moz-padding-start: 10px;
+ -webkit-padding-start: 10px;
+ min-width: 198px;
+}
+
+#nav-sidebar .fixed
+{
+ height: 100%;
+ position: fixed;
+}
+
+#page-title
+{
+ -webkit-margin-start: 10px;
+ -moz-margin-start: 10px;
+}
+
+#page-title p
+{
+ margin: 0px;
+ padding: 40px 0px 0px 0px;
+ font-size: 16px;
+}
+
+#page-title h1
+{
+ margin: 0px;
+ padding: 8px 0px 16px 0px;
+}
+
+.flex-container
+{
+ display: flex;
+ flex-flow: row wrap;
+}
+
+.tabs li
+{
+ cursor: pointer;
+ display: flex;
+}
+
+.tabs li span:first-child
+{
+ flex: 1;
+}
+
+.tabs.vertical
+{
+ list-style: none;
+ margin: 0px;
+ position: relative;
+ padding: 0px;
+ width: 198px;
+}
+
+.tabs.vertical li
+{
+ border-color: #CDCDCD;
+ border-style: solid;
+ border-width: 1px 0px 0px 0px;
+ font-size: 16px;
+ font-weight: 100;
+ padding: 16px 0px;
+ -moz-padding-end: 20px;
+ -webkit-padding-end: 20px;
+ -moz-padding-start: 11px;
+ -webkit-padding-start: 11px;
+}
+
+body[data-tab="general"] #tab-general + li,
+body[data-tab="advanced"] #tab-advanced + li,
+body[data-tab="help"] #tab-help + li
+{
+ border-width: 0px;
+}
+
+#tab-help,
+body[data-tab="advanced"] #tab-advanced + li
+{
+ border-bottom-width: 1px;
+}
+
+body[data-tab="general"] #tab-general,
+body[data-tab="advanced"] #tab-advanced,
+body[data-tab="help"] #tab-help
+{
+ background-color: #FFFFFF;
+ border-radius: 3px 0px 0px 3px;
+ border-width: 1px;
+ -moz-border-end: 0px;
+ -webkit-border-end: 0px;
+ font-weight: 900;
+ -moz-margin-end: -1px;
+ -webkit-margin-end: -1px;
+ -moz-padding-start: 10px;
+ -webkit-padding-start: 10px;
+ position: relative;
+}
+
+.tabs.vertical.bottom
+{
+ bottom: 0px;
+ position: absolute;
+}
+
+.tabs.vertical.bottom li:first-child
+{
+ border-top: 0px;
+}
+
+.tabs.vertical .icon
+{
+ margin: 2px 0px 0px 0px;
+}
+
+#tab-general .icon
+{
+ background-position: -15px -17px;
+ height: 16px;
+ width: 16px;
+}
+
+#tab-advanced .icon
+{
+ background-position: -45px -18px;
+ height: 16px;
+ width: 16px;
+}
+
+#tab-help .icon
+{
+ background-position: 0px -17px;
+ height: 16px;
+ width: 16px;
+}
+
+#tab-share .icon
+{
+ background-position: -60px -17px;
+ height: 16px;
+ width: 16px;
+}
+
+#tab-donate .icon
+{
+ background-position: -30px -17px;
+ height: 16px;
+ width: 16px;
+}
+
+#tab-content
+{
+ background-color: #FFFFFF;
+ border: 1px solid #CDCDCD;
+ border-radius: 8px;
+ padding: 0px 60px 40px 60px;
+ width: 960px;
+}
+
+#tab-content h1
+{
+ border-bottom: 1px solid #CDCDCD;
+ margin: 0px;
+ padding: 40px 0px 16px 0px;
+}
+
+.nav-link
+{
+ -moz-margin-start: 12px;
+ -webkit-margin-start: 12px;
+ color: #3A7BA6;
+}
+
+#content-wrapper
+{
+ position: relative;
+}
+
+#content-wrapper > div
+{
+ display: none;
+}
+
+body[data-tab="general"] #content-general,
+body[data-tab="advanced"] #content-advanced,
+body[data-tab="help"] #content-help
+{
+ display: block;
+}
+
+div.button
+{
+ cursor: pointer;
+ display: flex;
+}
+
+.table
+{
+ list-style: none;
+ margin: 0px;
+ padding: 0px;
+ position: relative;
+ width: 400px;
+}
+
+.table li
+{
+ display: flex;
+ padding: 14px 0px;
+ -webkit-padding-start: 16px;
+ -moz-padding-start: 16px;
+}
+
+.table.list li .display
+{
+ flex: 1;
+}
+
+.table.list li:nth-child(odd)
+{
+ background-color: #F5F5F5;
+}
+
+.table.cols li:nth-child(even)
+{
+ background-color: #F5F5F5;
+}
+
+.table label
+{
+ vertical-align: top;
+}
+
+.table.cols span
+{
+ display: inline-block;
+ width: 30%;
+}
+
+.table.cols .col-name
+{
+ border-bottom: 1px solid #CDCDCD;
+}
+
+.table.cols .col-name span
+{
+ display: inline-block;
+ width: 30%;
+}
+
+.table.cols .col-name span:first-child
+{
+ -webkit-padding-start: 38px;
+ -moz-padding-start: 38px;
+}
+
+.table::-webkit-scrollbar,
+#custom-wrapper::-webkit-scrollbar
+{
+ -webkit-padding-end: 10px;
+ width: 5px;
+}
+
+.table::-webkit-scrollbar-thumb,
+#custom-wrapper::-webkit-scrollbar-thumb
+{
+ background-color: #CDCDCD;
+ border-radius: 5px;
+ padding: 0px 40px;
+}
+
+.table::-webkit-scrollbar-thumb:hover,
+#custom-wrapper::-webkit-scrollbar-thumb:hover
+{
+ background-color: #A1A1A1;
+}
+
+.table input[type="checkbox"]
+{
+ margin-top: 0px;
+ -moz-margin-end: 20px;
+ -webkit-margin-end: 20px;
+ padding: 0px 0px 0px 0px;
+ visibility: hidden;
+}
+
+.table input[type="checkbox"]::before
+{
+ content: "";
+ background-position: -51px 0px;
+ height: 18px;
+ width: 18px;
+ visibility: visible;
+}
+
+.table input[type="checkbox"]:checked::before
+{
+ content: "";
+ background-position: -68px 0px;
+ height: 18px;
+ padding: 0px;
+ width: 18px;
+ visibility: visible;
+}
+
+.table button.delete
+{
+ background-color: transparent;
+ background-position: -9px -32px;
+ border: 0px;
+ height: 10px;
+ margin-top: 5px;
+ -moz-margin-end: 20px;
+ -webkit-margin-end: 20px;
+ padding: 0px;
+ cursor: pointer;
+ width: 10px;
+}
+
+.table .popular
+{
+ color: #1E8728;
+ font-size: 12px;
+ -moz-padding-end: 12px;
+ -webkit-padding-end: 12px;
+}
+
+.tabs.horizontal
+{
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+.tabs.horizontal li
+{
+ border-bottom: 1px solid #A1A1A1;
+ display: inline-block;
+ color: #3A7BA6;
+ padding: 10px 0px 11px 0px;
+ text-align: center;
+ width: 50%;
+}
+
+.tabs.horizontal li.active
+{
+ border-bottom: 2px solid #1E8728;
+ color: black;
+ font-weight: bold;
+ padding-bottom: 10px;
+}
+
+.icon, .table input[type="checkbox"]::before, .table button.delete,
+#content-help a::before, #dialog-close::before
+{
+ background-image: url(options-sprite.png);
+ display: inline-block;
+}
+
+.icon-add
+{
+ background-position: -0px -0px;
+ cursor: pointer;
+ height: 18px;
+ width: 18px;
+}
+
+.icon-update
+{
+ background-position: -34px -0px;
+ cursor: pointer;
+ height: 18px;
+ width: 18px;
+}
+
+.icon-edit
+{
+ background-position: -17px -0px;
+ cursor: pointer;
+ height: 18px;
+ width: 18px;
+}
+
+.icon-arrow,
+#content-help a::before
+{
+ background-position: 0px -42px;
+ content: "";
+ cursor: pointer;
+ height: 11px;
+ vertical-align: middle;
+ width: 7px;
+}
+
+.controls
+{
+ border-top: 1px solid #CDCDCD;
+ padding-top: 8px;
+ -moz-padding-start: 16px;
+ -webkit-padding-start: 16px;
+ position: relative;
+}
+
+.controls > div
+{
+ display: flex;
+}
+
+.controls button,
+#dialog-close
+{
+ background: none;
+ border: none;
+ cursor: pointer;
+ display: block;
+ padding: 0;
+}
+
+.controls button span:not(.icon)
+{
+ color: #3A7BA6;
+ display: inline-block;
+ -moz-margin-start: 15px;
+ -webkit-margin-start: 15px;
+ padding-top: 1px;
+ vertical-align: top;
+}
+
+/*
+ General tab content
+*/
+
+#blocking-languages,
+#acceptable-ads
+{
+ -moz-padding-end: 40px;
+ -webkit-padding-end: 40px;
+}
+
+#custom-wrapper
+{
+ width: 400px;
+ height: 290px;
+ overflow: auto;
+}
+
+#custom-wrapper .table
+{
+ width: 100%;
+}
+
+#whitelisting .controls
+{
+ -moz-padding-start: 12px;
+ -webkit-padding-start: 12px;
+}
+
+#whitelisting .controls input[type="text"]
+{
+ border: 0px;
+ border-bottom: 1px solid #A1A1A1;
+ -moz-padding-end: 25px;
+ -webkit-padding-end: 25px;
+ -moz-margin-start: 14px;
+ -webkit-margin-start: 14px;
+ outline: 0px;
+ padding-bottom: 5px;
+ vertical-align: text-bottom;
+ width: 330px;
+}
+
+#whitelisting .controls .button-add span
+{
+ -moz-margin-start: 5px;
+ -webkit-margin-start: 5px;
+}
+
+#whitelisting .button-add
+{
+ -moz-margin-start: 32px;
+ -webkit-margin-start: 32px;
+}
+
+#whitelisting-add-button + span
+{
+ flex: 1;
+}
+
+.icon-enter
+{
+ background-position: -18px -85px;
+ cursor: pointer;
+ height: 10px;
+ position: absolute;
+ top: 10px;
+ -moz-margin-start: -20px;
+ -webkit-margin-start: -20px;
+ width: 10px;
+}
+
+.button-add, .cancel-button
+{
+ background-color: transparent;
+ border: 0px;
+ color: #3A7BA6;
+ cursor: pointer;
+}
+
+/*
+ Advanced tab content
+*/
+
+#blocking-list-own .table
+{
+ height: 290px;
+ overflow: auto;
+ width: auto;
+}
+
+#blocking-list-own .controls
+{
+ display: flex;
+ padding: 0px;
+ border: none;
+}
+
+#blocking-list-own input[type="text"],
+#blocking-list-own input[type="text"]:focus
+{
+ border: 0px;
+ border-bottom: 1px solid;
+ border-top: 1px solid;
+ border-color: #1E8728;
+ box-sizing: border-box;
+ height: 25px;
+ outline: 0px;
+ -moz-padding-start: 10px;
+ -webkit-padding-start: 10px;
+ width: 100%;
+}
+
+.icon-enter-blue
+{
+ background-position: -28px -85px;
+ cursor: pointer;
+ height: 10px;
+ margin: 0px 0px -2px 2px;
+ width: 10px;
+}
+
+#blocking-list-own .input-control
+{
+ position: absolute;
+ -webkit-margin-start: -50px;
+ -moz-margin-start: -50px;
+ bottom: 5px;
+}
+
+#blocking-list-own .input-separator
+{
+ display: inline-block;
+ -moz-border-end: 1px solid #CDCDCD;
+ -webkit-border-end: 1px solid #CDCDCD;
+ height: 15px;
+ margin: 0px 4px -4px 0px;
+ width: 1px;
+}
+
+#blocking-list-own .input-button-text
+{
+ font-size: 12px;
+}
+
+.tooltip, #block-element-explanation a
+{
+ border-bottom: dotted 2px;
+ color: #3A7BA6;
+ font-size: 12px;
+ text-decoration: none;
+}
+
+#content-advanced .tooltip
+{
+ -moz-margin-start: 8px;
+ -webkit-margin-start: 8px;
+}
+
+#block-element-explanation a
+{
+ color: black;
+ border-bottom-color: #3A7BA6;
+ font-weight: bold;
+ -moz-padding-start: 0px;
+ -webkit-padding-start: 0px;
+}
+
+/*
+ Help tab content
+*/
+
+#content-help
+{
+ counter-reset: section;
+}
+
+#content-help h1::before
+{
+ counter-increment: section;
+ content: counter(section) ". ";
+}
+
+#content-help a
+{
+ color: #3A7BA6;
+ display: inline-block;
+ text-decoration: none;
+ -moz-margin-end: 16px;
+ -webkit-margin-end: 16px;
+ vertical-align: top;
+}
+
+#content-help a::before
+{
+ -moz-margin-end: 6px;
+ -webkit-margin-end: 6px;
+}
+
+/*
+ Dialog
+*/
+
+#dialog-background
+{
+ display: none;
+ background-color: white;
+ position: absolute;
+ opacity: 0.7;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+ left: 0px;
+ z-index: 2;
+}
+
+body[data-dialog] #dialog-background
+{
+ display: block;
+}
+
+#dialog
+{
+ background-color: #FFFFFF;
+ border: 2px solid #4D9D4B;
+ border-radius: 3px;
+ display: none;
+ margin: auto;
+ position:absolute;
+ top:100px;
+ left: 0px;
+ right: 0px;
+ z-index: 2;
+ width: 400px;
+}
+
+#dialog header
+{
+ background-color: #4D9D4B;
+ display: flex;
+ height: 25px;
+ padding: 10px;
+}
+
+#dialog-close
+{
+ -moz-border-start: 1px solid #25612B;
+ -webkit-border-start: 1px solid #25612B;
+ color: #0F660F;
+ display: inline-block;
+ height: 20px;
+ font-size: 15px;
+ -moz-padding-start: 10px;
+ -webkit-padding-start: 10px;
+}
+
+#dialog-close::before
+{
+ background-position: -9px -32px;
+ content: "";
+ cursor: pointer;
+ height: 12px;
+ width: 12px;
+ vertical-align: middle;
+ -moz-margin-end: 6px;
+ -webkit-margin-end: 6px;
+}
+
+#dialog #dialog-body
+{
+ margin: 4px 24px;
+}
+
+#dialog h3
+{
+ font-size: 14px;
+ margin: 0px;
+}
+
+#dialog input[type="text"],
+#dialog input[type="search"]
+{
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ font-size: 16px;
+ margin-top: 10px;
+ padding: 5px;
+ width: 100%;
+}
+
+#dialog .table
+{
+ width: 100%;
+}
+
+#dialog #other-language .table
+{
+ height: 200px;
+ overflow: auto;
+}
+
+#dialog .section:not(:first-child)
+{
+ margin-top: 24px;
+}
+
+#dialog-title
+{
+ -moz-margin-start: 16px;
+ -webkit-margin-start: 16px;
+ flex: 1;
+ font-size: 16px;
+ color: #FFFFFF;
+}
+
+#dialog-title > span
+{
+ display: none;
+}
+
+body[data-dialog="customlist"] #dialog-title-customlist,
+body[data-dialog="language"] #dialog-title-language
+{
+ display: inline;
+}
+
+#dialog-body .dialog-content-block
+{
+ padding: 12px 0px;
+}
+
+#dialog-body .dialog-content
+{
+ display: none;
+}
+
+#dialog .button-wrapper
+{
+ background-color: #F5F5F5;
+ margin-top: 8px;
+ padding: 10px 16px;
+ cursor: pointer;
+ width: auto;
+}
+
+#dialog .button-wrapper span:not(.icon)
+{
+ color: #3A7BA6;
+ display: inline-block;
+ -moz-margin-start: 15px;
+ -webkit-margin-start: 15px;
+ vertical-align: top;
+}
+
+body[data-dialog="customlist"] #dialog-content-customlist,
+body[data-dialog="language"] #dialog-content-language,
+body[data-dialog] #dialog
+{
+ display: block;
+}
+
+#other-language .button-add
+{
+ -webkit-border-end: 1px solid #CDCDCD;
+ -moz-border-end: 1px solid #CDCDCD;
+ -webkit-padding-end: 10px;
+ -moz-padding-end: 10px;
+ -webkit-padding-start: 0px;
+ -moz-padding-start: 0px;
+}
+
+#other-language .display
+{
+ -webkit-margin-start: 10px;
+ -moz-margin-start: 10px;
+}
diff --git a/subscriptions.xml b/subscriptions.xml
new file mode 100644
index 0000000..eff4c40
--- /dev/null
+++ b/subscriptions.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+
+<!--
+ - This file is part of the Adblock Plus web scripts,
+ - 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/>.
+ -->
+
+<!--
+ Bundling current file in adblockplusui repository is just a temprorary
+ solution until #2677 is fixed
+ -->
+
+<subscriptions>
+ <subscription title="EasyList"
+ specialization="English"
+ url="https://easylist-downloads.adblockplus.org/easylist.txt"
+ homepage="https://easylist.adblockplus.org/"
+ prefixes="en"
+ author="fanboy, MonztA, Famlam, Khrin"/>
+ <subscription title="ABPindo+EasyList"
+ specialization="Bahasa Indonesia"
+ url="https://easylist-downloads.adblockplus.org/abpindo+easylist.txt"
+ homepage="http://abpindo.blogspot.com/"
+ prefixes="id"
+ author="heradhis"/>
+ <subscription title="Bulgarian list+EasyList"
+ specialization="български"
+ url="https://easylist-downloads.adblockplus.org/bulgarian_list+easylist.txt"
+ homepage="http://stanev.org/abp/"
+ prefixes="bg"
+ author="Александър Станев"/>
+ <subscription title="EasyList China+EasyList"
+ specialization="中文"
+ url="https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt"
+ homepage="http://abpchina.org/forum/"
+ prefixes="zh"
+ author="John, Li, Jiefei"/>
+ <subscription title="EasyList Czech and Slovak+EasyList"
+ specialization="čeština, slovenčina"
+ url="https://easylist-downloads.adblockplus.org/easylistczechslovak+easylist.txt"
+ homepage="http://adblock.sk/"
+ prefixes="cs,sk"
+ author="tomasko126"/>
+ <subscription title="EasyList Dutch+EasyList"
+ specialization="Nederlands"
+ url="https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt"
+ homepage="https://easylist.adblockplus.org/"
+ prefixes="nl"
+ author="Famlam"/>
+ <subscription title="EasyList Germany+EasyList"
+ specialization="Deutsch"
+ url="https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt"
+ homepage="https://easylist.adblockplus.org/"
+ prefixes="de"
+ author="MonztA, Famlam"/>
+ <subscription title="EasyList Hebrew+EasyList"
+ specialization="עברית"
+ url="https://easylist-downloads.adblockplus.org/israellist+easylist.txt"
+ homepage="https://github.com/AdBlockPlusIsrael/EasyListHebrew"
+ prefixes="he"
+ author="BsT"/>
+ <subscription title="EasyList Italy+EasyList"
+ specialization="italiano"
+ url="https://easylist-downloads.adblockplus.org/easylistitaly+easylist.txt"
+ homepage="https://easylist.adblockplus.org/"
+ prefixes="it"
+ author="Khrin"/>
+ <subscription title="EasyList Lithuania+EasyList"
+ specialization="lietuvių kalba"
+ url="https://easylist-downloads.adblockplus.org/easylistlithuania+easylist.txt"
+ homepage="http://margevicius.lt/"
+ prefixes="lt"
+ author="Algimantas Margevičius"/>
+ <subscription title="Latvian List+EasyList"
+ specialization="latviešu valoda"
+ url="https://easylist-downloads.adblockplus.org/latvianlist+easylist.txt"
+ homepage="http://latvian-list.site11.com/"
+ prefixes="lv"
+ author="anonymous74100"/>
+ <subscription title="Liste AR+Liste FR+EasyList"
+ specialization="العربية"
+ url="https://easylist-downloads.adblockplus.org/liste_ar+liste_fr+easylist.txt"
+ homepage="https://code.google.com/p/liste-ar-adblock/"
+ prefixes="ar"
+ author="smed79"/>
+ <subscription title="Liste FR+EasyList"
+ specialization="français"
+ url="https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt"
+ homepage="http://adblock-listefr.com/"
+ prefixes="fr"
+ author="Lian, Crits, smed79"/>
+ <subscription title="ROList+EasyList"
+ specialization="românesc"
+ url="https://easylist-downloads.adblockplus.org/rolist+easylist.txt"
+ homepage="http://www.zoso.ro/rolist"
+ prefixes="ro"
+ author="MenetZ, Zoso"/>
+ <subscription title="RuAdList+EasyList"
+ specialization="русский, українська"
+ url="https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt"
+ homepage="https://code.google.com/p/ruadlist/"
+ prefixes="ru,uk"
+ author="Lain_13"/>
+ <subscription title="EasyPrivacy"
+ specialization="Disable Tracking"
+ url="https://easylist-downloads.adblockplus.org/easyprivacy.txt"
+ homepage="https://easylist.adblockplus.org/"
+ popular="true"/>
+ <subscription title="malware"
+ specialization="Disable Malware Websites"
+ url="https://easylist-downloads.adblockplus.org/malwaredomains_full.txt"
+ homepage="http://malwaredomains.com/?page_id=2"
+ popular="true"/>
+ <subscription title="fanboy"
+ specialization="Disable Social media buttons"
+ url="https://easylist-downloads.adblockplus.org/fanboy-social.txt"
+ homepage="https://easylist.adblockplus.org/"
+ popular="true"/>
+ <subscription title="facebook annoyances blocker"
+ specialization="Facebook annoyance"
+ url="https://easylist-downloads.adblockplus.org/fb_annoyances_full.txt"
+ homepage="http://facebook.adblockplus.me/"
+ popular="true"/>
+ <subscription title="Pure Video Experience"
+ specialization="Youtube annoyance"
+ url="https://easylist-downloads.adblockplus.org/yt_annoyances_full.txt"
+ homepage="http://youtube.adblockplus.me/"
+ popular="true"/>
+ <subscription title="Prebake - Filter Obtrusive Cookie Notices"
+ specialization="Prebake"
+ url="https://raw.githubusercontent.com/liamja/Prebake/master/obtrusive.txt"
+ homepage="http://liamja.github.io/Prebake/"
+ popular="true"/>
+ <subscription title="Spam404"
+ specialization="Spam404"
+ url="https://spam404bl.com/spam404scamlist.txt"
+ homepage="http://www.spam404.com/"
+ popular="true"/>
+</subscriptions>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list