All checks were successful
Build & Test WASM / build-and-test (push) Successful in 1m41s
159 lines
7.4 KiB
HTML
159 lines
7.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>KoboPatch Web UI</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<header class="hero">
|
|
<h1>KoboPatch <span class="hero-accent">Web UI</span></h1>
|
|
<p class="subtitle">Custom patches for your Kobo e-reader</p>
|
|
</header>
|
|
|
|
<!-- Step indicator -->
|
|
<nav id="step-nav" class="step-nav" hidden>
|
|
<ol>
|
|
<li data-step="1" class="active">Device</li>
|
|
<li data-step="2">Patches</li>
|
|
<li data-step="3">Build</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<!-- Step 1a: Connect device (automatic, Chromium only) -->
|
|
<section id="step-connect" class="step" hidden>
|
|
<p>
|
|
Connect your Kobo e-reader via USB. It should appear as a removable drive.
|
|
Then click the button below and select the root of the Kobo drive.
|
|
</p>
|
|
<button id="btn-connect" class="primary">Select Kobo Drive</button>
|
|
<p class="fallback-hint">
|
|
Don't want to use Chrome?
|
|
<a href="#" id="btn-manual-from-auto">Select your firmware version manually</a> instead.
|
|
</p>
|
|
</section>
|
|
|
|
<!-- Step 1b (manual): Select device model + firmware -->
|
|
<section id="step-manual" class="step" hidden>
|
|
<p id="manual-chrome-hint" class="info-banner" hidden>
|
|
Tip: if you use Chrome or Edge, this tool can auto-detect your device
|
|
and write patched files directly to it. Even easier, but sadly requires a Chromium based browser.
|
|
</p>
|
|
<p>Select your Kobo model and firmware version.</p>
|
|
<select id="manual-version">
|
|
<option value="">-- Select firmware version --</option>
|
|
</select>
|
|
<select id="manual-model" hidden>
|
|
<option value="">-- Select your Kobo model --</option>
|
|
</select>
|
|
<button id="btn-manual-confirm" class="primary" disabled>Continue ›</button>
|
|
</section>
|
|
|
|
<!-- Step 1c: Device detected (auto mode info card) -->
|
|
<section id="step-device" class="step" hidden>
|
|
<div id="device-info" class="info-card">
|
|
<div class="info-row">
|
|
<span class="label">Model</span>
|
|
<span id="device-model" class="value">--</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span class="label">Serial</span>
|
|
<span id="device-serial" class="value">--</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span class="label">Firmware</span>
|
|
<span id="device-firmware" class="value">--</span>
|
|
</div>
|
|
</div>
|
|
<div id="device-status"></div>
|
|
<div class="step-actions">
|
|
<button id="btn-device-next" class="primary">Configure Patches ›</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Step 2: Configure patches -->
|
|
<section id="step-patches" class="step" hidden>
|
|
<p>Enable or disable patches below. Patches in the same group are mutually exclusive.</p>
|
|
<div id="patch-container" class="patch-container-scroll"></div>
|
|
<div class="step-actions">
|
|
<button id="btn-patches-back" class="secondary">‹ Back</button>
|
|
<button id="btn-patches-next" class="primary" disabled>Continue ›</button>
|
|
</div>
|
|
<p id="patch-count-hint" class="fallback-hint"></p>
|
|
</section>
|
|
|
|
<!-- Step 3: Review & Build -->
|
|
<section id="step-firmware" class="step" hidden>
|
|
<p id="firmware-auto-info">
|
|
Firmware <strong id="firmware-version-label"></strong> for
|
|
<strong id="firmware-device-label"></strong> will be downloaded
|
|
automatically from Kobo's servers and will be patched after the download completes:<br>
|
|
<code id="firmware-download-url"></code><br>
|
|
<span id="firmware-verify-notice">
|
|
You can verify if this URL matches your Kobo's model on
|
|
<a href="https://help.kobo.com/hc/en-us/articles/35059171032727" target="_blank">Kobo's support page</a>. The most important bit is that "koboXX" matches, for example "kobo13" for Kobo Libra Color.
|
|
</span>
|
|
</p>
|
|
<!--
|
|
<p id="firmware-manual-info" hidden>
|
|
No automatic download available for your device.
|
|
Please select the firmware zip file manually.
|
|
You can download it from
|
|
<a href="https://pgaskin.net/KoboStuff/kobofirmware.html" target="_blank">pgaskin.net</a>.
|
|
Make sure it matches firmware version <strong id="firmware-version-label-manual"></strong>.
|
|
</p>
|
|
<input type="file" id="firmware-input" accept=".zip" hidden>
|
|
-->
|
|
<div class="step-actions">
|
|
<button id="btn-build-back" class="secondary">‹ Back</button>
|
|
<button id="btn-build" class="primary">Build Patched Firmware</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Step 4: Building -->
|
|
<section id="step-building" class="step" hidden>
|
|
<div class="build-header">
|
|
<div class="spinner"></div>
|
|
<p id="build-progress">Starting...</p>
|
|
</div>
|
|
<pre id="build-log" class="build-log"></pre>
|
|
</section>
|
|
|
|
<!-- Step 5: Done -->
|
|
<section id="step-done" class="step" hidden>
|
|
<div id="build-status" class="info-banner"></div>
|
|
<pre id="done-log" class="build-log done-log"></pre>
|
|
<div id="build-actions">
|
|
<button id="btn-write" class="primary">Write to Kobo</button>
|
|
<button id="btn-download" class="secondary">Download KoboRoot.tgz</button>
|
|
</div>
|
|
<p class="fallback-hint" id="download-hint">
|
|
Place the downloaded <strong>KoboRoot.tgz</strong> in the <strong>.kobo</strong> directory
|
|
on your Kobo's USB drive, then safely eject and reboot the device.
|
|
</p>
|
|
<p class="hint" hidden id="write-success">
|
|
KoboRoot.tgz has been written to your Kobo.
|
|
Safely eject the device and reboot it to apply the patches.
|
|
</p>
|
|
</section>
|
|
|
|
<!-- Error state -->
|
|
<section id="step-error" class="step" hidden>
|
|
<h2>Something went wrong</h2>
|
|
<p id="error-message" class="error"></p>
|
|
<pre id="error-log" class="error-log" hidden></pre>
|
|
<button id="btn-retry" class="secondary">Start Over</button>
|
|
</section>
|
|
</main>
|
|
|
|
<!-- wasm_exec.js loaded by patch-worker.js inside the Web Worker -->
|
|
<script src="kobo-device.js"></script>
|
|
<script src="kobopatch.js"></script>
|
|
<script src="patch-ui.js"></script>
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|