Mokuro: Read Japanese manga with selectable text inside a browser

Seems as if I need some more assistance :see_no_evil:

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?

1 Like

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! :smiley:

1 Like

Here it is Mokuro: Read Japanese manga with selectable text inside a browser - #33 by ChristopherFritz

1 Like

Unfortunately, this still doesn’t solve my problem :melting_face:

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.

I allowed the URL access, just as mentioned in the post you shared:

My Scan-Settings look like ths

I’m using Chrome

And you mention that the OCR works fine, the text becomes selectable when you hover it, like in the screenshot in my post? Mokuro: Read Japanese manga with selectable text inside a browser - #32 by Akashelia

Yes, looks exactly like that

But when I hit the Shift key, Yomichan won’t act as expected.

Okay, I have no clue, but maybe I found someone having the same issue and a possible fix: Reddit - Dive into anything

1 Like

Nope, unfortunately no change at all

Some more ideas: Reddit - Dive into anything
Restart chrome, make sure that there are dictionaries installed, try on different words

1 Like

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 :nerd_face:

2 Likes

!!!
Happy for you! Enjoy :star_struck:

1 Like

The BookWalker-Screenshot-Simulator doesn’t work anymore? :eyes: This is what it shows (sorry if this is something basic, I have no idea what it says lol)

image

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.

Thank you! I use Chrome too and I’m trying it on ロジカとラッカセイ volume 2! Also have the reading mode as Vertical

Just tired it on はなものがたり volume 1 and it still doesn’t work.

Just tried it too on that one and it works.
My steps:

The code

//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
    }

}


followed the steps and it worked for 10 pages, and then the same text popped up:

think I might have to download 10 pages at a time now??

image

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 :thinking: