From 2aa5a00559d057fa71670bd74aada8659e657c34 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:22:03 +0800 Subject: [PATCH] add function similar to read.js to read image --- scripts/GUI/browser.icon.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/GUI/browser.icon.js diff --git a/scripts/GUI/browser.icon.js b/scripts/GUI/browser.icon.js new file mode 100644 index 0000000..d514ee8 --- /dev/null +++ b/scripts/GUI/browser.icon.js @@ -0,0 +1,11 @@ +class BrowserIcon { + /* Change the extension icon. + + @param {string} path The path to the icon. + */ + static set(path) { + chrome.browserAction.setIcon({"path": path}); + }; +}; + +export {BrowserIcon as default}; \ No newline at end of file