mokuro icon indicating copy to clipboard operation
mokuro copied to clipboard

[REQUEST] Character counter

Open saxoncameron opened this issue 2 years ago • 8 comments

Much like some people like to track the number of characters read when reading a VN (e.g. via a texthooker page with a character counter), it'd be cool to have something similar here in the top part of the UI that tracks the number of characters as you read.

AFAIK there's nothing like that out there for manga, so that'd be a unique feature that this tool would enable.

saxoncameron avatar May 04 '22 00:05 saxoncameron

Pasted_Image_8_5_2022__2_39_pm

For those interested, I unofficially bootstrapped this feature for myself along with a couple others via bookmarklets.

  1. mokuro-char-counter.js adds a little bar to the top-right which tracks total characters/pages read (pictured)
  2. mokuro-arrow-navi.js lets you use the left/right arrow keys to navigate pages
  3. mokuro-pan-scroll.js changes scroll behaviour from zoom to vertical scroll. Zoom changed to alt+scroll

How to use:

  1. Go to https://mrcoles.com/bookmarklet/
  2. Depending on which of the above features you want, copy/paste that files contents into the text box there
  3. Hit Convert to bookmarklet button
  4. Click and drag the generated blue link into your browser toolbar
  5. Whenever you open up a mokuro-generated html file, hit the bookmarklet button to enable (must be done every time)
  • also works for non-local mokuro files, like the demo here: https://kha-white.github.io/manga-demo/#

(Download link removed, scroll to bottom for newest version)

saxoncameron avatar May 08 '22 04:05 saxoncameron

As discussed with the author, this would be a nice thing to officially integrate into the manga reader UI in future, but this is a functional workaround in the meantime.

saxoncameron avatar May 08 '22 04:05 saxoncameron

mokuro-character-counter version 1.3.0 has the following changes/fixes:

  • [FEATURE] Reading timer starts/stops automatically based on whether the tab or window is focused/visible.
  • [FEATURE] Reading timer is now coloured green when active, red when stopped.
  • [STYLE] Character counter UI now appears above manga canvas, not below.
  • [CHORE] Timer "stop" button renamed to "pause".
  • [STYLE] Character count UI no longer overlaps with top menu on smaller viewports.
  • [FIX] Character p/h number will no longer ever have decimals.

mokuro 1 3 0

(Download link removed, scroll to bottom for newest version)

saxoncameron avatar May 11 '22 02:05 saxoncameron

Some minor fixes for the mokuro-char-counter bookmarklet - thanks for the reports :slight_smile: v1.3.1

  • [FIX] Characters p/h no longer equal '∞' when reading timer surpasses 1 hour. :man_facepalming:
  • [FIX] Document visibility listener for reading timer auto play/pause now also checks for focus too.
  • [FIX] Timer auto-play no longer triggers if the timer was paused.

Image

(Download link removed, scroll to bottom for newest version)

saxoncameron avatar May 12 '22 10:05 saxoncameron

FYI a couple more tweaks/fixes to the mokuro character counter UI bookmarklets

Screen Shot 2022-05-23 at 2 28 07 pm

mokuro-char-counter v1.4.0

  • [CHORE] Character p/h initially displays "(wait 1m)" for increased functional clarity.
  • [FIX] The reliability of the timer auto-play reliability has again been improved.
  • [FEATURE] When turning to an unread page, if the reading timer is paused, it is automatically resumed.
  • [FEATURE] Added hotkeys for reading timer: (s)tart, (p)ause, (r)eset.

Latest download link

Mokuro bookmarklets.zip

saxoncameron avatar May 23 '22 04:05 saxoncameron

FYI a couple more tweaks/fixes to the mokuro character counter UI bookmarklets

Screen Shot 2022-05-23 at 2 28 07 pm

mokuro-char-counter v1.4.0

  • [CHORE] Character p/h initially displays "(wait 1m)" for increased functional clarity.
  • [FIX] The reliability of the timer auto-play reliability has again been improved.
  • [FEATURE] When turning to an unread page, if the reading timer is paused, it is automatically resumed.
  • [FEATURE] Added hotkeys for reading timer: (s)tart, (p)ause, (r)eset.

Latest download link

Mokuro bookmarklets.zip

Timer stops when yomichan is opened.

SirGram avatar May 07 '23 18:05 SirGram

Just wanted to say love the character counter and and arrow nav enhancements. Having some nice success using it as a tampermonkey script matching pretty generously on 'file://**/*.html' Could be an alternative distribution method to consider until fully integrated

OhMesch avatar Nov 14 '23 16:11 OhMesch

Pasted_Image_8_5_2022__2_39_pm

For those interested, I unofficially bootstrapped this feature for myself along with a couple others via bookmarklets.

1. `mokuro-char-counter.js` adds a little bar to the top-right which tracks total characters/pages read (pictured)

2. `mokuro-arrow-navi.js` lets you use the left/right arrow keys to navigate pages

3. `mokuro-pan-scroll.js` changes scroll behaviour from zoom to vertical scroll. Zoom changed to alt+scroll

How to use:

1. Go to https://mrcoles.com/bookmarklet/

MrColes bookmarklet creator didn't work for me. Had success using https://www.yourjs.com/bookmarklet/ instead. Looks like they generate different code.

cedarhillgoods avatar Mar 30 '24 18:03 cedarhillgoods