diff --git a/docs/log-analyzer/index.bak.html b/docs/log-analyzer/index.bak.html
deleted file mode 100644
index 4515c70..0000000
--- a/docs/log-analyzer/index.bak.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- Crapfixer Log Analyzer
-
-
-
- ๐ง Crapfixer Log Analyzer
-
- To get started, please follow these simple steps:
-
- - Run the analysis in your Crapfixer app and export or copy the full log from the results window.
- - Come back here and paste the entire log into the textbox below.
- - Click the ๐ Analyze button to see a detailed breakdown of issues, registry keys, and plugin files.
-
-
-
-
-
-
-
-
-
diff --git a/docs/log-analyzer/index.html b/docs/log-analyzer/index.html
index 651217c..1936a97 100644
--- a/docs/log-analyzer/index.html
+++ b/docs/log-analyzer/index.html
@@ -141,96 +141,8 @@
-
-
+
+
diff --git a/docs/log-analyzer/js/main.js b/docs/log-analyzer/js/main.js
new file mode 100644
index 0000000..58618fa
--- /dev/null
+++ b/docs/log-analyzer/js/main.js
@@ -0,0 +1,86 @@
+// read text from clipboard
+async function pasteResult() {
+ try {
+ const text = await navigator.clipboard.readText();
+ if (!text) {
+ alert("Clipboard is empty");
+ return;
+ }
+ document.getElementById("logInput").value = text;
+ analyzeLog(); // direkt analysieren
+ } catch (err) {
+ alert("No access to clipboard " + err);
+ }
+}
+
+// Analyze the pasted log and extract issues, registry keys, and plugin info
+function analyzeLog() {
+ const log = document.getElementById("logInput").value;
+ const output = document.getElementById("output");
+ const lines = log.split("\n");
+
+ const issues = lines.filter((line) => line.startsWith("โ"));
+ const regKeys = lines.filter((line) => line.includes("HKEY_") || line.includes("โค"));
+ const plugins = lines.filter((line) => line.match(/Plugin ready: .*\.ps1/i));
+
+ output.innerHTML = `
+ ๐งช Found ${issues.length} issues
+ ${issues.map((i) => `
${i}
`).join("")}
+
+ ๐ Registry Keys
+ ${regKeys.map((k) => `
${k}
`).join("")}
+
+ ๐ฆ Loaded Plugins
+ ${plugins.map((p) => `
${p}
`).join("")}
+ `;
+}
+
+// Save screenshot of the output section
+function captureResult() {
+ html2canvas(document.getElementById("output")).then((canvas) => {
+ const link = document.createElement("a");
+ link.download = "CrapFixer-results.png";
+ link.href = canvas.toDataURL();
+ link.click();
+ });
+}
+
+// Native share (for mobile browsers)
+function shareResult() {
+ const text = document.getElementById("output").innerText;
+ if (navigator.share) {
+ navigator
+ .share({
+ title: "CrapFixer Analysis Results",
+ text: text,
+ })
+ .catch((err) => console.log("Share failed:", err));
+ } else {
+ alert("Sharing is not supported by your browser.");
+ }
+}
+
+// Share the result as an image on Twitter/X
+function shareOnTwitter() {
+ const outputEl = document.getElementById("output");
+ if (!outputEl.innerText.trim()) return alert("No results to share yet.");
+
+ // Create screenshot from result div
+ html2canvas(outputEl).then((canvas) => {
+ const dataUrl = canvas.toDataURL("image/png");
+
+ // Convert image to base64 string (can't upload directly to Twitter)
+ // Instead, show preview and user uploads manually via prompt
+ const win = window.open();
+ win.document.write(`๐ท Screenshot ready for X / Twitter
`);
+ win.document.write(
+ `Right-click the image below and save it to upload on Twitter manually.
`
+ );
+ win.document.write(
+ `
`
+ );
+ win.document.write(
+ `โก๏ธ Click here to post on X
`
+ );
+ });
+}