[epiphany/pgriffis/web-extension/runtime-send-message: 8/15] WebExtensions: Support <all_urls> in allow lists
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/pgriffis/web-extension/runtime-send-message: 8/15] WebExtensions: Support <all_urls> in allow lists
- Date: Thu, 2 Jun 2022 20:32:48 +0000 (UTC)
commit e7fdb5ab0fa30b3b5b3e3948d1c7655d78f31a4e
Author: Patrick Griffis <pgriffis igalia com>
Date: Thu Jun 2 06:40:40 2022 -0500
WebExtensions: Support <all_urls> in allow lists
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1122>
src/webextension/ephy-web-extension.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/webextension/ephy-web-extension.c b/src/webextension/ephy-web-extension.c
index 7d2496c7c..189279737 100644
--- a/src/webextension/ephy-web-extension.c
+++ b/src/webextension/ephy-web-extension.c
@@ -387,8 +387,15 @@ web_extension_add_allow_list (JsonArray *array,
gpointer user_data)
{
WebExtensionContentScript *content_script = user_data;
+ const char *match = json_node_get_string (element_node);
- g_ptr_array_add (content_script->allow_list, g_strdup (json_node_get_string (element_node)));
+ if (g_strcmp0 (match, "<all_urls>") == 0) {
+ g_ptr_array_add (content_script->allow_list, g_strdup ("https://*/*"));
+ g_ptr_array_add (content_script->allow_list, g_strdup ("http://*/*"));
+ return;
+ }
+
+ g_ptr_array_add (content_script->allow_list, g_strdup (match));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]