2025-05-10 13:46:41 +02:00
<!DOCTYPE html>
2025-05-10 13:53:38 +02:00
< html lang = "en" >
2025-05-10 13:46:41 +02:00
< head >
2025-05-10 13:53:38 +02:00
< meta charset = "UTF-8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
2025-05-10 13:46:41 +02:00
< title > Crapfixer Update Check</ title >
2025-05-10 13:53:38 +02:00
< style >
body {
font-family : 'Segoe UI' , Tahoma , Geneva , Verdana , sans-serif ;
background-color : #f4f6f8 ;
color : #333 ;
padding : 2 rem ;
max-width : 600 px ;
margin : auto ;
}
h1 {
color : #2c3e50 ;
}
# status {
background : #fff ;
padding : 1 rem ;
border-radius : 8 px ;
box-shadow : 0 2 px 5 px rgba ( 0 , 0 , 0 , 0.1 );
margin-top : 1 rem ;
}
a {
color : #0077cc ;
text-decoration : none ;
}
a : hover {
text-decoration : underline ;
}
. donate {
margin-top : 3 rem ;
padding : 1 rem ;
background-color : #e8f5e9 ;
border-left : 5 px solid #4caf50 ;
border-radius : 5 px ;
}
. donate strong {
display : block ;
margin-bottom : 0.5 rem ;
}
. donate a {
margin-right : 1 rem ;
display : inline-block ;
}
2025-05-10 14:22:53 +02:00
. project-follow {
margin-top : 1 rem ;
text-align : center ;
}
. project-follow a {
padding : 10 px 20 px ;
2025-05-10 14:24:57 +02:00
background-color : #24292f ; /* GitHub Dark Blue */
2025-05-10 14:22:53 +02:00
color : white ;
border-radius : 5 px ;
text-decoration : none ;
font-size : 16 px ;
}
. project-follow a : hover {
2025-05-10 14:24:57 +02:00
background-color : #0366d6 ; /* GitHub Blue */
2025-05-10 14:22:53 +02:00
}
2025-05-10 13:53:38 +02:00
</ style >
2025-05-10 13:46:41 +02:00
</ head >
< body >
< h1 > 🔍 Crapfixer Update Check</ h1 >
2025-05-10 13:53:38 +02:00
< p id = "status" > Checking version...</ p >
< div class = "donate" >
< strong > 💖 Support Crapfixer</ strong >
2025-05-10 14:26:33 +02:00
Every donation helps me provide more updates.
2025-05-10 13:53:38 +02:00
- Thanks, Belim 🙏
< br >< br >
2025-05-10 14:25:50 +02:00
< a href = "https://www.paypal.com/donate/?hosted_button_id=M9DW4VNKH9ECQ" target = "_blank" > 💸 Donate via PayPal</ a >
< a href = "https://ko-fi.com/builtbybel" target = "_blank" > ☕ Buy me a Ko-fi</ a >
2025-05-10 14:22:53 +02:00
</ div >
< div class = "project-follow" >
2025-05-10 14:24:57 +02:00
< a href = "https://github.com/builtbybel/Crapfixer" target = "_blank" > 🐙 Follow the Project on GitHub</ a >
2025-05-10 13:53:38 +02:00
</ div >
2025-05-10 13:46:41 +02:00
< script >
2025-05-10 14:15:08 +02:00
const latestVersion = "0.55.160" ;
2025-05-10 13:46:41 +02:00
function compareVersions ( v1 , v2 ) {
const a = v1 . split ( '.' ). map ( Number );
const b = v2 . split ( '.' ). map ( Number );
for ( let i = 0 ; i < Math . max ( a . length , b . length ); i ++ ) {
if (( a [ i ] || 0 ) < ( b [ i ] || 0 )) return - 1 ;
if (( a [ i ] || 0 ) > ( b [ i ] || 0 )) return 1 ;
}
return 0 ;
}
const params = new URLSearchParams ( window . location . search );
const userVersion = params . get ( "version" );
const status = document . getElementById ( "status" );
if ( ! userVersion ) {
2025-05-10 13:53:38 +02:00
status . innerText = "❓ No version found. Please open this page from the Crapfixer app." ;
2025-05-10 13:46:41 +02:00
} else {
const result = compareVersions ( userVersion , latestVersion );
2025-05-10 14:22:53 +02:00
if ( result < 0 ) {
status . innerHTML = `⚠️ Your version ( ${ userVersion } ) is outdated.<br><strong>Latest version:</strong> ${ latestVersion } <br><a href="https://github.com/builtbybel/Crapfixer/releases">⬇️ Download here</a>` ;
} else if ( result === 0 ) {
status . innerHTML = `✅ Your version ( ${ userVersion } ) is up to date.` ;
} else {
status . innerHTML = `✅ Your version ( ${ userVersion } ) is newer than the official release ( ${ latestVersion } ).<br><em>Note: You may be using a development build.</em>` ;
}
2025-05-10 13:46:41 +02:00
}
</ script >
</ body >
</ html >