Index: background.js |
diff --git a/background.js b/background.js |
index fbfb7166751946e15b0dee1268fedc9fbf3551da..3e2eb08be89145c56ce79fe3ad3d676b8a4655dd 100644 |
--- a/background.js |
+++ b/background.js |
@@ -15,46 +15,13 @@ |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
-with(require("filterClasses")) |
-{ |
- this.RegExpFilter = RegExpFilter; |
- this.WhitelistFilter = WhitelistFilter; |
-} |
-var FilterStorage = require("filterStorage").FilterStorage; |
-var SpecialSubscription = require("subscriptionClasses").SpecialSubscription; |
+var RegExpFilter = require("filterClasses").RegExpFilter; |
var ElemHide = require("elemHide").ElemHide; |
var checkWhitelisted = require("whitelisting").checkWhitelisted; |
var extractHostFromFrame = require("url").extractHostFromFrame; |
var port = require("messaging").port; |
var devtools = require("devtools"); |
-// This is a hack to speedup loading of the options page on Safari. |
-// Once we replaced the background page proxy with message passing |
-// this global function should removed. |
-function getUserFilters() |
-{ |
- var filters = []; |
- var exceptions = []; |
- |
- for (var i = 0; i < FilterStorage.subscriptions.length; i++) |
- { |
- var subscription = FilterStorage.subscriptions[i]; |
- if (!(subscription instanceof SpecialSubscription)) |
- continue; |
- |
- for (var j = 0; j < subscription.filters.length; j++) |
- { |
- var filter = subscription.filters[j]; |
- if (filter instanceof WhitelistFilter && /^@@\|\|([^\/:]+)\^\$document$/.test(filter.text)) |
- exceptions.push(RegExp.$1); |
- else |
- filters.push(filter.text); |
- } |
- } |
- |
- return {filters: filters, exceptions: exceptions}; |
-} |
- |
port.on("get-selectors", function(msg, sender) |
{ |
var selectors; |