Mokuro is now finished with all files. If I understand correctly, I now have to get my .png files into html in order to open them in Chrome and using Yomichan for reading them.
The thing is…I don’t know how to do that. Sorry for my noob questions…
EDIT: Nevermind…I found the HTML file.
EDIT 2: @Phryne while I can now open the Manga in html and the OCR is working fine, I can’t get Yomichan to work. I have tested Yomichan on other websites and it works fine. Only on the Manga it just won’t do it’s magic. Any recommendations?
Let me try to find a post from this thread, I had the same problem and there is a setting in Mokuro you need to activate so you allow it to works on file that are from your computer (and not directly from the web)
You are so close now!
Hm…
Can you show a screenshot of how the setting you’ve changed looks for you? And which browser are you using? I could try to look on how it looks for me.
Also you can always try to close and restart the browser just in case.
Thank you for your kind help. I tried all of that with no result.
I just downloaded Firefox, installed Yomichan and opend the HTML…no issues on Firefox. Now I can read my Manga
Still works for me! Just tested now using Chrome.
I can try and help troubleshooting. Which browser do you use? Which book are you trying it on? Only works for manga with Vertical reading as far as I know.
//Change download options to save without asking.
//Put vertical mode on and fix the window size.
//Paste the Javascript code into the console, then press Enter.
//If blank images are being saved, change the "delayTime" variable before to a larger number, such as 3000 for three seconds.
//Wait for volume to complete saving.
// Use the volume name in the file name when downloading. If the volume name includes a character not supported by your filesystem, you can manually enter something here.
const volumeName = document.title
// Delay time in miliseconds. If you get blank images, increase this number and try again. The higher the number, the slower the volume will take to fully download.
const delayTime = 5000
// Do not modify code beyond this line unless you know what you are doing.
// Function for delaying code for a set amount of time.
const delay = ms => new Promise(res => setTimeout(res, ms))
// Track which images have already been downloaded. This prevents downloading the same image multiple times.
const downloadedPages = []
// Download a single image from a canvas.
function DownloadPage(canvas) {
if (downloadedPages.includes(canvas.parentElement.id)) {
return
}
const fileName = `${volumeName} Page ${canvas.parentElement.id.replace('wideScreen', '').padStart(4, '0')}.png`
const image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream")
const downloadLink = document.createElement("a")
downloadLink.href = image
downloadLink.download = fileName
downloadLink.click()
// Remember that this image has been downloaded.
downloadedPages.push(canvas.parentElement.id)
}
// Determine how many pages are expected.
const pageCount = document.querySelector('#pageSliderCounter').textContent.split('/')[1]
// Loops through canvases until all expected images have downloaded.
while (downloadedPages.length < pageCount) {
// Grab all available canvases.
const canvases = document.querySelectorAll("canvas.default")
// Track how many images are downloaded this iteration.
let downloadedImageCount = 0
for (let canvas of canvases) {
canvas.scrollIntoView()
if (downloadedPages.includes(canvas.parentElement.id)) {
continue
}
// Wait for image to load.
await delay(delayTime);
DownloadPage(canvas)
downloadedImageCount += 1
}
// If no images were downloaded, then likely all images are downloaded, and the loop can be exited. This situation shouldn't occur, but is here just in case.
if (0 == downloadedImageCount) {
console.log("Downloading complete!")
break
}
}
Do you do something else when it runs? I think I’ve had problems where it would stop too and it seems to be happening if I was starting to use another program or changed the window in focus, so usually when I run it then I don’t use the computer while it runs until its done. It has worked for all pages every since
No, I usually just stare at the screen until its done haha. It worked well so far, but I’m having an issue today (and it’s happening to all the manga - even the ones I previously downloaded).
I tried the code again and now it’s only downloading 1 or 2 pages before the same message pops up. Does it have something to do with cache or maybe should I try re-startting the system? I can’t figure out what’s wrong this time