[epiphany/pgriffis/web-extension/browserinfo: 28/28] WebExtensions: Add more data to runtime.getBrowserInfo()




commit cc18c2e89acd6cbec02fcb6ae4ceda043410a558
Author: Patrick Griffis <pgriffis igalia com>
Date:   Wed Jun 8 13:17:20 2022 -0500

    WebExtensions: Add more data to runtime.getBrowserInfo()
    
    It is useful to have the version numbers and 'Epiphany' is a more
    simple name.

 meson.build                    | 1 +
 src/webextension/api/runtime.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 05b0ebfc5..4d93ab82b 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@ else
 endif
 conf.set('EPHY_MICRO_VERSION', 0)
 
+conf.set_quoted('EPHY_VERSION', meson.project_version())
 conf.set_quoted('VERSION', '@VCS_TAG@')
 
 gsb_api_key = get_option('gsb_api_key')
diff --git a/src/webextension/api/runtime.c b/src/webextension/api/runtime.c
index fee77464f..3d1760cf8 100644
--- a/src/webextension/api/runtime.c
+++ b/src/webextension/api/runtime.c
@@ -39,7 +39,11 @@ runtime_handler_get_browser_info (EphyWebExtension  *self,
 
   json_builder_begin_object (builder);
   json_builder_set_member_name (builder, "name");
-  json_builder_add_string_value (builder, "GNOME Web (Epiphany)");
+  json_builder_add_string_value (builder, "Epiphany");
+  json_builder_set_member_name (builder, "version");
+  json_builder_add_string_value (builder, EPHY_VERSION);
+  json_builder_set_member_name (builder, "vendor");
+  json_builder_add_string_value (builder, "GNOME");
   json_builder_end_object (builder);
 
   root = json_builder_get_root (builder);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]