diff --git a/src/ts/browser-action.ts b/src/ts/browser-action.ts index 7a6bb6d..09e1ad8 100644 --- a/src/ts/browser-action.ts +++ b/src/ts/browser-action.ts @@ -9,10 +9,15 @@ const MAIN_TEMPLATE: twig.Template = twig.twig({href: MAIN_TEMPLATE_URI, async: document.addEventListener("DOMContentLoaded", () => { tabs.getWindows((windows: chrome.windows.Window[]) => { document.querySelector("body").innerHTML = String(MAIN_TEMPLATE.render({windows})); - registerTabClickListeners(); + registerTabClickListeners; }); }); +/** + * registerTabClickListeners registers click listeners to switch tabs. + * + * @returns {void} + */ function registerTabClickListeners(): void { let tabElements = document.getElementsByClassName("tab"); [].forEach.call(tabElements, (element) => {