From 812ddc8a1c0bb6d1913922c057a4bb0621001614 Mon Sep 17 00:00:00 2001 From: Jacob Chvatal Date: Thu, 28 Nov 2024 00:14:13 +0100 Subject: [PATCH] start and stop all attacks with same button --- dist/shared.js | 4 ++-- dist/web/demo-attacker.js | 8 ++++++-- src/shared.ts | 4 ++-- src/web/demo-attacker.ts | 10 +++++++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dist/shared.js b/dist/shared.js index 4be4cbc..6def63d 100644 --- a/dist/shared.js +++ b/dist/shared.js @@ -18,11 +18,11 @@ export const titleIcons = { funny: [ { title: "System32 Deletion Progress", - icon: "favicons/windows.ico", + icon: "favicons/onlyfans.ico", }, { title: "Your Boss Behind You!", - icon: "favicons/warning.ico", + icon: "favicons/gmail.ico", }, ], }; diff --git a/dist/web/demo-attacker.js b/dist/web/demo-attacker.js index df059c1..0a10a5d 100644 --- a/dist/web/demo-attacker.js +++ b/dist/web/demo-attacker.js @@ -43,11 +43,15 @@ export class DemoAttacker extends TabAttacker { button.addEventListener("click", () => { if (this.isCurrentlyAttacking()) { this.stopAttack(); - button.textContent = "Start Attack"; + document.querySelectorAll('[id^="toggleAttack-"]').forEach(btn => { + btn.textContent = "Start Attack"; + }); } else { this.startAttack(); - button.textContent = "Stop Attack"; + document.querySelectorAll('[id^="toggleAttack-"]').forEach(btn => { + btn.textContent = "Stop Attack"; + }); } }); }); diff --git a/src/shared.ts b/src/shared.ts index c097d11..45b60dc 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -21,11 +21,11 @@ export const titleIcons: Record = { funny: [ { title: "System32 Deletion Progress", - icon: "favicons/windows.ico", + icon: "favicons/onlyfans.ico", }, { title: "Your Boss Behind You!", - icon: "favicons/warning.ico", + icon: "favicons/gmail.ico", }, ], }; diff --git a/src/web/demo-attacker.ts b/src/web/demo-attacker.ts index 2be8b06..548a826 100644 --- a/src/web/demo-attacker.ts +++ b/src/web/demo-attacker.ts @@ -44,14 +44,18 @@ export class DemoAttacker extends TabAttacker { * Sets up event listeners for attack buttons */ private setupAttackButtons(): void { - document.querySelectorAll('[id^="toggleAttack-"]').forEach((button) => { + document.querySelectorAll('[id^="toggleAttack-"]').forEach((button) => { button.addEventListener("click", () => { if (this.isCurrentlyAttacking()) { this.stopAttack(); - button.textContent = "Start Attack"; + document.querySelectorAll('[id^="toggleAttack-"]').forEach(btn => { + btn.textContent = "Start Attack"; + }); } else { this.startAttack(); - button.textContent = "Stop Attack"; + document.querySelectorAll('[id^="toggleAttack-"]').forEach(btn => { + btn.textContent = "Stop Attack"; + }); } }); });