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(); }