From 70ecdf2add2b72390a43e998f0cf008eca71f88b Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Fri, 12 Jan 2024 07:58:14 +0000 Subject: [PATCH] helpers: Remove dead bootstrap tabs code. --- web/src/billing/helpers.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/web/src/billing/helpers.ts b/web/src/billing/helpers.ts index 7717e493d3..d49b4557d2 100644 --- a/web/src/billing/helpers.ts +++ b/web/src/billing/helpers.ts @@ -148,28 +148,6 @@ export function update_discount_details( $("#sponsorship-discount-details").text(discount_notice); } -let current_page: string; - -function handle_hashchange(): void { - $(`#${CSS.escape(current_page)}-tabs.nav a[href="${CSS.escape(location.hash)}"]`).tab("show"); - $("html").scrollTop(0); -} - -export function set_tab(page: string): void { - const hash = location.hash; - if (hash) { - $(`#${CSS.escape(page)}-tabs.nav a[href="${CSS.escape(hash)}"]`).tab("show"); - $("html").scrollTop(0); - } - - $(`#${CSS.escape(page)}-tabs.nav-tabs a`).on("click", function () { - location.hash = this.hash; - }); - - current_page = page; - window.addEventListener("hashchange", handle_hashchange); -} - export function is_valid_input(elem: JQuery): boolean { return elem[0].checkValidity(); }