From e17cb4e48ae0d691f92d78ca01efc98213eb9b77 Mon Sep 17 00:00:00 2001 From: papush Date: Sun, 29 Aug 2021 14:36:42 +0200 Subject: add a tooltip and fix the labels --- chrome/js/browserOverlay.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'chrome/js/browserOverlay.js') diff --git a/chrome/js/browserOverlay.js b/chrome/js/browserOverlay.js index 2767d7b..d833ccf 100644 --- a/chrome/js/browserOverlay.js +++ b/chrome/js/browserOverlay.js @@ -93,8 +93,14 @@ var RedirectorOverlay = { } else if (event.button == RIGHT) { this.openSettings(); } - } + }, + updateTooltip: function(event) { + AddonManager.getAddonByID("url-rewriter@papush", (addon) => { + let label = event.target.getElementsByClassName("redirector-tooltip-version")[0]; + label.setAttribute("value", "URL Rewriter " + addon.version); + }); + } }; window.addEventListener("load", function(event) { RedirectorOverlay.onLoad(event); }, false); window.addEventListener("unload", function(event) { RedirectorOverlay.onUnload(event); }, false); -- cgit v1.2.3-70-g09d2