birchill / 10ten-ja-reader

A browser extension to translate Japanese by hovering over words.
https://addons.mozilla.org/firefox/addon/10ten-ja-reader/
GNU General Public License v3.0
573 stars 41 forks source link

Ability for Rikaichamp to analyze Yomichan text #108

Open MarcusAseth opened 4 years ago

MarcusAseth commented 4 years ago

I have loaded 2 japanese dictionaries into Yomichan so that when I hover onto a kanji compound, it brings up the Japanese definition for the compound, image below: Capture

Now, Yomichan doesn't allow for "self-scanning" its own content, so it would be awesome if Rikaichamp could step in and be able to work with the text inside of Yomichan pop-up box. Yomichan pop-up box is also static (you need to click somewhere outside to make it disappear) therefore it basically lend itself for this usage :) Being able to bring up a japanese definition trough Yomichan and scan it with Rikaichamp would be the perfect combination for many intermediate users :)

toasted-nutbread commented 4 years ago

FYI: https://github.com/FooSoft/yomichan/pull/185

MarcusAseth commented 4 years ago

That's awesome @toasted-nutbread , thanks! :) Though personally I believe is still one step below what I suggested above in terms of speed, for that particular context. Reason being, yomi-chan recursive tabs need to be manually closed by the user (by clicking outside I assume, or similar mean) while rikai-champ simply allow to scan the text on the fly passing from a word to the next just moving the mouse, no button clicks involved, so for a japanese definition like the one in my image above (and also keeping in mind the japanese dictionary contains many many several lines longs words definitions), the two plugins/extensions combination together would be faster to use. So I'm convinced this rikai-champ feature still have some valid reasons to be made :)

toasted-nutbread commented 4 years ago

yomi-chan recursive tabs need to be manually closed by the user (by clicking outside I assume, or similar mean)

FYI, Yomichan now supports assigning settings profiles based on popup level, so I think you could accomplish what you're describing using that feature in combination with the other scanning options.

https://github.com/FooSoft/yomichan/pull/218

MarcusAseth commented 4 years ago

Glad to hear that, though I checked the link and couldn't understand for my life how it works or how I should use it to achieve my goal xD (I'm not that smart after all :S )

toasted-nutbread commented 4 years ago

If I understand correctly, you would just need to set up a second profile which runs when the popup level is greater than 0. See image at the end.

For this second profile (called "Nested" in the image), you would want to change Scan delay under the Scanning Options heading to 0, and change the Scan modifier key to None. This will make hovered text appear without delay when hovering, without requiring keyboard input.

Finally, you would want to make sure the Maximum number of additional popups option under the Popup Content Scanning Options heading is at least 1. Then it should work as you describe. If not, you may want to open an issue on https://github.com/FooSoft/yomichan/issues.


image