aboutsummaryrefslogtreecommitdiff
path: root/content/content.js
diff options
context:
space:
mode:
Diffstat (limited to 'content/content.js')
-rw-r--r--content/content.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/content/content.js b/content/content.js
index ef2ee39..c492d53 100644
--- a/content/content.js
+++ b/content/content.js
@@ -42,6 +42,7 @@
*/
#IMPORT content/repo_query_cacher.js
+#IMPORT content/haketilo_apis.js
#FROM common/browser.js IMPORT browser
#FROM common/misc.js IMPORT is_privileged_url
@@ -132,7 +133,14 @@ async function main() {
resolve_page_info(Object.assign(page_info, script_response));
return;
} else {
- for (const script_contents of script_response.files) {
+ haketilo_apis.start();
+
+ const version = browser.runtime.getManifest().version;
+ const scripts = [
+ `window.haketilo_version = ${JSON.stringify(version)};`,
+ ...script_response.files
+ ];
+ for (const script_contents of scripts) {
const html_ns = "http://www.w3.org/1999/xhtml";
const script = document.createElementNS(html_ns, "script");