diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2017-09-01 16:35:50 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2017-09-01 16:35:50 -0400 |
commit | e8730f68798f173bd4d1c2f9b7ce02985e3fd771 (patch) | |
tree | 711132ed84ef8ae9e0621de5436a6818a5fa1e12 /data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js | |
parent | edde38bbb0e0afb9b8a78c002996c758fb6023b6 (diff) |
SpyBlock updated to 2.9.1
Diffstat (limited to 'data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js')
-rw-r--r-- | data/extensions/spyblock@gnu.org/chrome/content/ui/utils.js | 28 |
1 files changed, 24 insertions, 4 deletions
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 171fd60..5f8d515 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 <https://adblockplus.org/>, - * Copyright (C) 2006-2015 Eyeo GmbH + * Copyright (C) 2006-2017 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 @@ -35,10 +35,11 @@ function require(/**String*/ module) var {Policy} = require("contentPolicy"); var {Filter, InvalidFilter, CommentFilter, ActiveFilter, RegExpFilter, - BlockingFilter, WhitelistFilter, ElemHideBase, ElemHideFilter, ElemHideException} = require("filterClasses"); + BlockingFilter, WhitelistFilter, ElemHideBase, ElemHideFilter, + ElemHideException, ElemHideEmulationFilter} = require("filterClasses"); var {FilterNotifier} = require("filterNotifier"); -var {FilterStorage, PrivateBrowsing} = require("filterStorage"); -var {IO} = require("io"); +var {FilterStorage} = require("filterStorage"); +var {IO} = require("legacyIO"); var {defaultMatcher, Matcher, CombinedMatcher} = require("matcher"); var {Prefs} = require("prefs"); var {RequestNotifier} = require("requestNotifier"); @@ -57,6 +58,25 @@ function E(id) } /** + * Determines subscription's title as it should be displayed in the UI. + * @return {String} + * subscription's title or an appropriate default title if none present + */ +function getSubscriptionTitle(/**Subscription*/ subscription) +{ + if (subscription.title) + return subscription.title; + + if (subscription instanceof DownloadableSubscription) + return subscription.url; + + if (subscription instanceof SpecialSubscription && subscription.defaults) + return Utils.getString(subscription.defaults + "Group_title"); + + return Utils.getString("newGroup_title"); +} + +/** * Split up all labels into the label and access key portions. */ document.addEventListener("DOMContentLoaded", function splitAllLabelsHandler() |