max-kamps / jpd-breader Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
This causes furigana to float in gaps between the kanji
The hovering works fine, but a lot of times you need more information on a word, so yomichan is still needed. Making it easier to use both would be awesome.
Edit: I guess this could be the same problem as preventing links to be clicked from the other issue?
Came across 合理的な判断 being changed to exclude the な.
Currently, redundant words are somewhat confusing. In particular, reviewing them does nothing (it does add a review, but jpdb ignores it.)
It would be nice if hovering redundant words would show the non-redundant versions of that card, and reviewing them counted towards those instead.
Investigate how cards with multiple non-redundant versions should work.
Possibly in the browser popup? Integrate with toasts too.
Also related to #21
Current blockers:
DOMParser
in background service workers
Currently, the settings page transmits any settings changes to the background page. The background page is then responsible for saving them.
I recently realized that this is unnecessary - the settings page can access the local storage directly, since it has the same domain as the background page.
This change should simplify settings.ts and background.ts a lot.
Possibly dependent on #9
Using shell features for the build script is extremely brittle and non-portable. I am only able to test the code on Linux, and do not want to accidentally break it for Windows users.
Porting the current build commands in package.json
to a JavaScript build script instead would be much appreciated.
Also have the extent of the mining context be displayed just as a transient highlight on the text
(suggestion by Kaz)
Currently, the only way to see that your sentence is too long is by submitting it and getting an error message.
It would be nicer if there was client-side validation inside the modal dialog, highlighting the box in red and telling you the text is too long.
I'm only noticing this with verbs, but they'll often get deconjugated. ございません becomes ござる, なった becoming なる. This only happens in ttu so far with the extension, the text itself shows up normally in any other reader without the extension. It doesn't happen with all verbs, but enough that it became noticeable.
Would be great if there was an option to disable furigana for known words.
An option for disabling it for all words would also be a nice addition to that.
When traveling and reading on my surface I had multiple occasions when I lost internet and it would spam like 20 of those error popups. Would be neat to either have the option to disable them for x amount of time, or display them somewhere else.
Previous issue with な being removed between words was fixed, but now な gets removed after a word but before ellipses. Examples in discord. 呑気な・・・・・・。changed to 呑気・・・・・・。Edit: This is happening in ttu, vertical text.
I'd like to map the jpdb-reader pop-up button to a side mouse button for convenient access but can't find any instructions on how to do this. Is this feature available, and if so, how can I achieve this? If not, please consider adding it for improved user experience. Thanks!
When selecting all (ctrl+a) then parsing, the following classes parse despite not being selected causing extreme mis-parses:
Ideally, only the following classes should be parsed:
Satori Reader probably needs some sort of parsing similar to Mokuro as including the shouldParse() function found in other scripts does not work if any furigana is present on page load or within tooltips.
The first few chapters of every story does not require login and is free:
Satori Reader, Hole in the Wall Episode 1
Thanks.
Might be related to the all: revert
style. Maybe figure out a better way to isolate it from page styles.
I've tested both Wikipedia and ttsu, I've tried different words and different review grades. I've relogged into jpdb.
The cards do get added to my deck, I just can't review them.
As I was writing this, I decided to test it with (ungoogled) chromium. Works fine. Issue is only on Firefox, for me.
It's very possible that one of the many tweaks I've made to my Firefox settings is causing problems.
I tested this on both firefox and chrome. Used 0.4 release.
Steps to reproduce: (horizontal text, continuous mode, hide furigana on, and style toggle. Doesn't seem to happen for vertical) Open a book, scroll down quite a bit while waiting for the extension to color words, after that copy a sentence just to make sure you can ctrl + f. Bookmark it exactly on the top of the screen to get the exact character count. Check the count. Close the book and open it again.
What happens on both browsers is, my bookmark is off, at least a page down, and the character count is less than before. The more you scroll, and therefore use the extension, the more off the character count and bookmark will be.
I read that the bookmark uses the character count, so that's why I titled it this way.
Tested this several times. I got it off by 5k characters once.
The only thing I noticed is that the extension seems to add a bigger space from when I just open the book/new page and when text gets colored, which could be causing this. Here's an example just in case this is on my end, https://imgur.com/a/b3iShe3
If I disable the extension and repeat the process it works flawlessly, I get the exact same character count as before, and the bookmark is correct as well, so I don't think it's a problem with ttu.
Related to #45, but should be possible to work around that. In particular, maybe add a check to every content script? Potentially when it connects to the backend?
Clicking on parse without entering your API key causes the extension to repeatedly try and parse one sentence over and over and show the corresponding error.
This happens on Edge on Windows. (No other combinations have been tested)
Reader.ttsu.app
Error: Failed assertion: expected object to not be null/undefined
Chrome
This is right after adding the word to a deck and trying to set it to 'something'
The tabs
permission is very broad, and is reported as "Access all your data on all websites" by browsers.
This really shouldn't be necessary. Currently, the parse buttons in the browser popup are the only place this is used.
As the title says it, add support for the novel section of itzuranekko like for the ttsu app.
Right now when you try selecting all the text to parse, you either get: text too long, Error: Cannot read properties of undefined (reading 'parentNode'), or I remember getting something about reaching end of document.
If I try to open the html file in a mokuro folder I get "Error: Cannot read properties of null (reading 'data')" every time I turn the page and nothing gets parsed.
If I open the html file when it is not in a mokuro folder and then press "parse currently open tab", I get "Error: Failed to fetch".
How do I parse mokuro pages?
Currently, when trying to open the popup from text inside an iframe, the popup does not appear. Instead, the popup is created in the parent document where it may not be visible.
Allowing the popup to be displayed within iframes is necessary for an asbplayer integration to work, as asbplayer subtitles are displayed within the same iframe as the video element it's bound to.
EDIT:
On testing again it looks like the popup does appear inside of iframes. However, on certain sites when the popup will not display when the video is in fullscreen mode. This is the case on e.g. Crunchyroll. asbplayer has to work around a similar issue when placing subtitle DOM on top of fullscreen videos. To do this it searches up the DOM tree until it finds the correct element to place subtitle DOM into, where "correct" means that the subtitle text is clickable.
The UI works fine in most cases, but there are some things I think it can improve user experience as well fix some bugs related. Here are some ideas:
If I come up with more ideas, I'll add them here. Let me know what you think, and I could even start working on these changes.
On Firefox: browser.scripting.registerContentScripts
or browser.contentScripts.register
On Chrome: chrome.scripting.registerContentScripts
(MV3 only)
Blocked by #43 on Chrome
Hotkeys always operate on the currently hovered word, even when the popup is open for another word. This is confusing to users.
It would be good if there was some indication which word the hotkey affected.
Solutions:
https://github.com/themoeway/local-audio-yomichan
This is the request: http://localhost:5050/?term={term}&reading={reading}
http://localhost:5050/?term=読む&reading=よむ
{"type": "audioSourceList", "audioSources": [{"name": "NHK16 \u30e8\uff3c\u30e0 [1]", "url": "http://localhost:5050/nhk16/audio\\20180221161451.opus"}, {"name": "SMK8 \u30e8\uff3c\u30e0 [1]", "url": "http://localhost:5050/shinmeikai8/media\\02284.opus"}, {"name": "Forvo (strawberrybrown)", "url": "http://localhost:5050/forvo/strawberrybrown\\\u8aad\u3080.opus"}, {"name": "Jpod101", "url": "http://localhost:5050/jpod/media\\673785119865334efce0a41a63550279.opus"}, {"name": "Jpod101", "url": "http://localhost:5050/jpod/media\\dbdca39f13f68e37ae492a2ce83d372b.opus"}]}
It would be good if there was a global queue of paragraphs. Then the dispatcher could pick however many paragraphs fit into the length limit at a time, and send them in one request.
Setting the show popup hotkey to none should always show the popup on hover.
Not sure what does and doesn't work on mobile right now.
I would imagine the following might not work:
When trying to scroll in the popup window it instead zooms out on mokuro. Also when trying to use the mouse to drag the scrollbar it closes the popup instead.
Currently, the following problems exist:
util.jsxCreateElement
is slow
document.createElement
is the culprit, maybe switch to string templatingjsx.d.ts
is morally wrong
children
correctly (not all HTML elements can contain all other HTML elements)Currently it does not check whether the user is actually logged in, and will just produce assertion errors when required elements are missing.
Related: #6
Tasks:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.