2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
11 function adblockplus_settings (buffer, uri_string) {
12 Components.utils.import("chrome://adblockplus-modules/content/Utils.jsm");
15 frame = buffer.top_frame;
16 Utils.openSettingsDialog(frame, uri_string);
18 interactive("adblockplus-settings",
19 "Show the Adblock Plus settings dialog.",
20 function (I) { adblockplus_settings(I.buffer); });
23 interactive("adblockplus-add",
24 "Add a pattern to Adblock Plus.",
26 Components.utils.import("chrome://adblockplus-modules/content/Public.jsm");
27 var element = yield read_browser_object(I);
28 var spec = load_spec(element);
29 var pattern = yield I.minibuffer.read_url(
31 $initial_value = load_spec_uri_string(spec),
33 AdblockPlus.addPatterns([load_spec_uri_string(pattern)]);
34 I.buffer.web_navigation.reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
36 $browser_object = browser_object_images,
39 provide("adblockplus");