2025-05-15 18:06:15 +02:00
<!DOCTYPE html>
< html lang = "en" >
2025-05-18 00:26:00 +10:00
< head >
< meta charset = "UTF-8" />
< title > Crapfixer Log Analyzer</ title >
< style >
/* ---------- Basic Styles ---------- */
body {
font-family : "Courier New" , Courier , monospace ;
margin : 0 ;
background : #f0f0f0 ;
color : #333 ;
}
header {
background : #4d4d4d ;
color : white ;
padding : 1 rem ;
display : flex ;
justify-content : space-between ;
align-items : center ;
}
header h1 {
margin : 0 ;
font-size : 1.5 rem ;
}
/* ---------- Top-right Links ---------- */
. actions a {
color : white ;
margin-left : 1 rem ;
text-decoration : none ;
font-size : 0.9 rem ;
background : #444 ;
padding : 0.3 rem 0.6 rem ;
border-radius : 4 px ;
transition : background 0.3 s ;
}
. actions a : hover {
background : #666 ;
}
/* ---------- Layout ---------- */
main {
padding : 2 rem ;
max-width : 800 px ;
margin : auto ;
}
textarea {
width : 100 % ;
height : 200 px ;
font-family : monospace ;
padding : 1 rem ;
border : 1 px solid #ccc ;
background : #fff ;
border-radius : 5 px ;
resize : vertical ;
}
button {
margin-top : 1 rem ;
padding : 0.5 rem 1 rem ;
font-size : 1 rem ;
border : none ;
background : #1565c0 ;
color : white ;
cursor : pointer ;
border-radius : 4 px ;
margin-right : 0.5 rem ;
}
button : hover {
background : #0d47a1 ;
}
/* ---------- Results Section ---------- */
. result {
background : white ;
border : 1 px solid #ddd ;
padding : 1 rem ;
margin-top : 2 rem ;
border-radius : 5 px ;
}
. issue {
color : #c62828 ;
margin-bottom : 0.5 rem ;
}
. key {
color : #37474f ;
font-family : monospace ;
}
. plugin {
color : #1565c0 ;
margin-bottom : 0.3 rem ;
}
. btn-group {
margin-top : 1 rem ;
}
</ style >
</ head >
< body >
<!-- ---------- HEADER SECTION ---------- -->
< header >
< h1 > 🧠 Crapfixer Log Analyzer</ h1 >
< div class = "actions" >
< a href = "https://github.com/builtbybel/Crapfixer" target = "_blank" > GitHub</ a >
< a href = "https://www.paypal.com/donate/?hosted_button_id=M9DW4VNKH9ECQ" target = "_blank"
> PayPal</ a
>
< a href = "https://ko-fi.com/builtbybel" target = "_blank" > Ko-fi</ a >
</ div >
</ header >
<!-- ---------- MAIN CONTENT ---------- -->
< main >
< p >< strong > How it works:</ strong ></ p >
< ol >
< li > Run the analysis in Crapfixer and < strong > copy the full log</ strong > .</ li >
< li > Paste it into the box below.</ li >
< li > Click < strong > Analyze</ strong > to get results.</ li >
</ ol >
<!-- ---------- LOG INPUT ---------- -->
< textarea id = "logInput" placeholder = "Drop your Crapfixer log here..." ></ textarea >
<!-- ---------- BUTTONS ---------- -->
< div class = "btn-group" >
2025-05-17 21:34:05 +02:00
< button onclick = "pasteResult()" > 📋 Paste log from clipboard</ button >
2025-05-18 00:26:00 +10:00
< button onclick = "analyzeLog()" > 🔍 Analyze</ button >
< button onclick = "captureResult()" > 📸 Take Screenshot</ button >
< button onclick = "shareResult()" > 📤 Share</ button >
< button onclick = "shareOnTwitter()" > 🐦 Share on X</ button >
</ div >
<!-- ---------- OUTPUT AREA ---------- -->
< div class = "result" id = "output" ></ div >
</ main >
<!-- ---------- JAVASCRIPT SECTION ---------- -->
< script >
2025-05-17 20:46:47 +02:00
2025-05-17 21:22:40 +02:00
// read text from clipboard
2025-05-17 21:44:08 +02:00
async function pasteResult () {
2025-05-17 21:22:40 +02:00
try {
const text = await navigator . clipboard . readText ();
if ( ! text ) {
alert ( "Clipboard is emoty" );
return ;
}
document . getElementById ( "logInput" ). value = text ;
analyzeLog (); // !analyze directly!
} catch ( err ) {
alert ( "No access to clipboard " + err );
2025-05-17 20:43:28 +02:00
}
2025-05-17 21:22:40 +02:00
}
2025-05-18 00:26:00 +10:00
// 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 = `
2025-05-16 11:48:58 +02:00
<h3>🧪 Found ${ issues . length } issues</h3>
2025-05-18 00:26:00 +10:00
<div> ${ issues . map (( i ) => `<div class="issue"> ${ i } </div>` ). join ( "" ) } </div>
2025-05-15 18:06:15 +02:00
<hr>
<h3>🗂 Registry Keys</h3>
2025-05-18 00:26:00 +10:00
<div> ${ regKeys . map (( k ) => `<div class="key"> ${ k } </div>` ). join ( "" ) } </div>
2025-05-15 19:02:43 +02:00
<hr>
<h3>📦 Loaded Plugins</h3>
2025-05-18 00:26:00 +10:00
<div> ${ plugins . map (( p ) => `<div class="plugin"> ${ p } </div>` ). join ( "" ) } </div>
2025-05-15 18:06:15 +02:00
` ;
2025-05-18 00:26:00 +10:00
}
// 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 ( `<h2>📷 Screenshot ready for X / Twitter</h2>` );
win . document . write (
`<p>Right-click the image below and save it to upload on Twitter manually.</p>`
);
win . document . write (
`<img src=" ${ dataUrl } " style="max-width:100%;border:1px solid #ccc;" />`
);
win . document . write (
`<p><a href="https://twitter.com/intent/tweet?text=Check%20out%20my%20Crapfixer%20analysis!&hashtags=crapfixer,loganalyzer" target="_blank">➡️ Click here to post on X</a></p>`
);
});
}
</ script >
<!-- ---------- HTML2CANVAS LIBRARY FOR SCREENSHOTS ---------- -->
< script src = "https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js" ></ script >
</ body >
2025-05-15 18:06:15 +02:00
</ html >