From e84470571aab3b385bfab5c6736bddabdd63ef3e Mon Sep 17 00:00:00 2001 From: Jimmy Vo Date: Wed, 19 Mar 2025 14:18:35 -0400 Subject: [PATCH] Add exit functionality for onclick. --- .../content/phishing-detection-browser.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/browser/src/phishing-detection/content/phishing-detection-browser.service.ts b/apps/browser/src/phishing-detection/content/phishing-detection-browser.service.ts index 714f3e3f9b2..724515f4ed6 100644 --- a/apps/browser/src/phishing-detection/content/phishing-detection-browser.service.ts +++ b/apps/browser/src/phishing-detection/content/phishing-detection-browser.service.ts @@ -27,6 +27,12 @@ export class PhishingDetectionBrowserService { exitButton.id = "change-exit"; exitButton.classList.add("primary"); exitButton.textContent = "Exit the page"; + exitButton.onclick = () => { + const barEl = document.getElementById(phishingDivId); + if (barEl != null) { + barEl.parentElement.removeChild(barEl); + } + }; wrapper.appendChild(messageElement); wrapper.appendChild(exitButton);