From 05e71708c9c52fd1cbcdb1f129971fbddeedca82 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 03:29:54 +0000 Subject: [PATCH] style: format code with ClangFormat, dotnet-format, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and swift-format This commit fixes the style issues introduced in d05613e according to the output from ClangFormat, dotnet-format, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and swift-format. Details: None --- index.html | 79 +++++++++++++++---------------- js/sentry.js | 8 ++-- tools/calculator.html | 85 +++++++++++++++++---------------- tools/calculator.js | 15 +++--- tools/clock.html | 49 ++++++++++--------- tools/converter.html | 77 +++++++++++++++--------------- tools/converter.js | 20 ++++---- tools/countdown.html | 107 ++++++++++++++++++++++-------------------- tools/password.html | 83 ++++++++++++++++++-------------- tools/password.js | 8 ++-- tools/qr.html | 67 +++++++++++++------------- tools/qr.js | 6 +-- tools/timestamp.html | 73 +++++++++++++++------------- 13 files changed, 354 insertions(+), 323 deletions(-) diff --git a/index.html b/index.html index b16e92af..19519357 100644 --- a/index.html +++ b/index.html @@ -1,45 +1,44 @@ - + - - - - All-in-One Tools - - - -
-

All-in-One Tools

-

A collection of useful tools, all in one place.

-
+ + + + All-in-One Tools + + + +
+

All-in-One Tools

+

A collection of useful tools, all in one place.

+
-
-
-

Unit Converter

-

Convert between common units (length, weight, temperature).

- Open -
-
-

Calculator

-

Perform quick calculations.

- Open -
-
-

Password Generator

-

Create strong and secure passwords.

- Open -
-
-

QR Code Generator

-

Turn text or links into QR codes.

- Open -
+
+
+

Unit Converter

+

Convert between common units (length, weight, temperature).

+ Open +
+
+

Calculator

+

Perform quick calculations.

+ Open +
+
+

Password Generator

+

Create strong and secure passwords.

+ Open +
+
+

QR Code Generator

+

Turn text or links into QR codes.

+ Open +
+
-
- - - + + \ No newline at end of file + diff --git a/js/sentry.js b/js/sentry.js index be32b331..d88f165b 100644 --- a/js/sentry.js +++ b/js/sentry.js @@ -3,12 +3,12 @@ Sentry.init({ Sentry.browserTracingIntegration(), Sentry.replayIntegration(), ], - tracesSampleRate: 1.0, // Performance monitoring - replaysSessionSampleRate: 0.1, // Record 10% of sessions - replaysOnErrorSampleRate: 1.0, // Always record on error + tracesSampleRate: 1.0, // Performance monitoring + replaysSessionSampleRate: 0.1, // Record 10% of sessions + replaysOnErrorSampleRate: 1.0, // Always record on error }); // Test error (remove after verification) setTimeout(() => { myUndefinedFunction(); -}, 2000); \ No newline at end of file +}, 2000); diff --git a/tools/calculator.html b/tools/calculator.html index fdc0fe3f..cb506a82 100644 --- a/tools/calculator.html +++ b/tools/calculator.html @@ -1,50 +1,53 @@ - + - - - - Calculator - - - - -
-

Calculator

- ← Back -
+ + + + Calculator + + + + +
+

Calculator

+ ← Back +
-
-
0
-
- - - - +
+
0
+
+ + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - -
-
+ + + +
+
- - + + - - \ No newline at end of file + + diff --git a/tools/calculator.js b/tools/calculator.js index 38b8b139..8f0f77e8 100644 --- a/tools/calculator.js +++ b/tools/calculator.js @@ -3,19 +3,17 @@ const buttons = document.querySelectorAll(".calc-buttons button"); let current = ""; -buttons.forEach(btn => { +buttons.forEach((btn) => { btn.addEventListener("click", () => { const value = btn.textContent; if (value === "C") { current = ""; screen.textContent = "0"; - } - else if (value === "←") { + } else if (value === "←") { current = current.slice(0, -1); screen.textContent = current || "0"; - } - else if (value === "=") { + } else if (value === "=") { try { current = eval(current).toString(); screen.textContent = current; @@ -23,8 +21,7 @@ buttons.forEach(btn => { screen.textContent = "Error"; current = ""; } - } - else { + } else { current += value; screen.textContent = current; } @@ -36,11 +33,11 @@ function calculateExpression(expression) { const result = eval(expression); Sentry.captureMessage("Calculation performed", { level: "info", - extra: { expression: expression, result: result } + extra: { expression, result }, }); return result; } catch (error) { Sentry.captureException(error); // error tracking return "Error"; } -} \ No newline at end of file +} diff --git a/tools/clock.html b/tools/clock.html index 1ff7e46e..3feb3a60 100644 --- a/tools/clock.html +++ b/tools/clock.html @@ -1,29 +1,32 @@ - + - - - - Live Clock - - - -
-

🕒 Live Clock

-

See the current date and time in real time.

-
+ + + + Live Clock + + + +
+

🕒 Live Clock

+

See the current date and time in real time.

+
-
-
--:--:--
-
Loading date...
-
+
+
--:--:--
+
Loading date...
+
- + - - + + - - \ No newline at end of file + + diff --git a/tools/converter.html b/tools/converter.html index a50c1375..5c8a6efe 100644 --- a/tools/converter.html +++ b/tools/converter.html @@ -1,45 +1,48 @@ - + - - - - Unit Converter - - - - -
-

Unit Converter

- ← Back -
+ + + + Unit Converter + + + + +
+

Unit Converter

+ ← Back +
-
-
- - -
+
+
+ + +
-
- - -
+
+ + +
-
- -
+
+ +
-
-

Result: -

-
-
+
+

Result: -

+
+
- - + + - - \ No newline at end of file + + diff --git a/tools/converter.js b/tools/converter.js index 5eaa9b58..d5d11725 100644 --- a/tools/converter.js +++ b/tools/converter.js @@ -17,21 +17,23 @@ convertBtn.addEventListener("click", () => { switch (type) { case "length": // meters <-> kilometers - result = value >= 1000 - ? `${(value / 1000).toFixed(2)} km` - : `${(value * 1000).toFixed(2)} m`; + result = + value >= 1000 + ? `${(value / 1000).toFixed(2)} km` + : `${(value * 1000).toFixed(2)} m`; break; case "weight": // kilograms <-> grams - result = value >= 1 - ? `${(value * 1000).toFixed(2)} g` - : `${(value / 1000).toFixed(2)} kg`; + result = + value >= 1 + ? `${(value * 1000).toFixed(2)} g` + : `${(value / 1000).toFixed(2)} kg`; break; case "temperature": // Celsius <-> Fahrenheit - result = `${value} °C = ${(value * 9/5 + 32).toFixed(2)} °F`; + result = `${value} °C = ${((value * 9) / 5 + 32).toFixed(2)} °F`; break; default: @@ -50,6 +52,6 @@ document.getElementById("convertBtn").addEventListener("click", () => { Sentry.captureMessage("Unit conversion", { level: "info", - extra: { from: from, to: to, value: value } + extra: { from, to, value }, }); -}); \ No newline at end of file +}); diff --git a/tools/countdown.html b/tools/countdown.html index 3c901280..9132dd52 100644 --- a/tools/countdown.html +++ b/tools/countdown.html @@ -1,64 +1,67 @@ - + - - - - Countdown Timer - - - -
-

⏱ Countdown Timer

-

Set a target date/time and watch the live countdown.

-
+ + + + Countdown Timer + + + +
+

⏱ Countdown Timer

+

Set a target date/time and watch the live countdown.

+
-
-
- - +
+
+ + -
- - - -
+
+ + + +
-
- - - +
+ + + +
-
-
-
- -- - Days -
-
- -- - Hours -
-
- -- - Minutes -
-
- -- - Seconds +
+
+ -- + Days +
+
+ -- + Hours +
+
+ -- + Minutes +
+
+ -- + Seconds +
-
-
No countdown running
-
+
No countdown running
+
- + - - + + - - \ No newline at end of file + + diff --git a/tools/password.html b/tools/password.html index 364d2e3c..e287382c 100644 --- a/tools/password.html +++ b/tools/password.html @@ -1,44 +1,55 @@ - + - - - - Password Generator - - - - -
-

Password Generator

- ← Back -
+ + + + Password Generator + + + + +
+

Password Generator

+ ← Back +
-
-
- - -
+
+
+ + +
-
-
-
-
- -
+
+
+
+
+ +
-
- -
+
+ +
-
- - -
-
+
+ + +
+
- - + + - - \ No newline at end of file + + diff --git a/tools/password.js b/tools/password.js index 609137b3..7f5927b7 100644 --- a/tools/password.js +++ b/tools/password.js @@ -52,16 +52,16 @@ document.getElementById("generateBtn").addEventListener("click", () => { Sentry.captureMessage("Password generated", { level: "info", extra: { - length: length, + length, lowercase: document.getElementById("lowercase").checked, uppercase: document.getElementById("uppercase").checked, numbers: document.getElementById("numbers").checked, - symbols: document.getElementById("symbols").checked - } + symbols: document.getElementById("symbols").checked, + }, }); }); document.getElementById("copyBtn").addEventListener("click", () => { navigator.clipboard.writeText(document.getElementById("result").value); Sentry.captureMessage("Password copied", { level: "info" }); -}); \ No newline at end of file +}); diff --git a/tools/qr.html b/tools/qr.html index 0411c51e..e5a5a48e 100644 --- a/tools/qr.html +++ b/tools/qr.html @@ -1,40 +1,43 @@ - + - - - - QR Code Generator - - - - - - -
-

QR Code Generator

- ← Back -
+ + + + QR Code Generator + + + + + + +
+

QR Code Generator

+ ← Back +
-
-
- - -
+
+
+ + +
-
- -
+
+ +
-
+
-
- -
-
+
+ +
+
- - + + - - \ No newline at end of file + + diff --git a/tools/qr.js b/tools/qr.js index e346a764..ab92a5a5 100644 --- a/tools/qr.js +++ b/tools/qr.js @@ -17,7 +17,7 @@ generateBtn.addEventListener("click", () => { // Generate new QR qr = new QRCode(qrCodeContainer, { - text: text, + text, width: 200, height: 200, colorDark: "#000000", @@ -59,10 +59,10 @@ document.getElementById("generateBtn").addEventListener("click", () => { Sentry.captureMessage("QR code generated", { level: "info", - extra: { inputLength: text.length } + extra: { inputLength: text.length }, }); }); document.getElementById("downloadBtn").addEventListener("click", () => { Sentry.captureMessage("QR code downloaded", { level: "info" }); -}); \ No newline at end of file +}); diff --git a/tools/timestamp.html b/tools/timestamp.html index 33949151..c3c51768 100644 --- a/tools/timestamp.html +++ b/tools/timestamp.html @@ -1,40 +1,47 @@ - + - - - - Timestamp Converter - - - -
-

⏳ Timestamp Converter

-

Convert between UNIX timestamps and human-readable dates.

-
+ + + + Timestamp Converter + + + +
+

⏳ Timestamp Converter

+

Convert between UNIX timestamps and human-readable dates.

+
-
-
-

Timestamp ➝ Date

- - -

Result: --

-
+
+
+

Timestamp ➝ Date

+ + +

Result: --

+
-
-

Date ➝ Timestamp

- - -

Result: --

-
-
+
+

Date ➝ Timestamp

+ + +

Result: --

+
+
- + - - + + - - \ No newline at end of file + +