Formerly named "Wanikani Anime Sentences 2". Adds example sentences from anime, dramas, games, literature, and news for vocabulary from immersionkit.com.
Bunlar bu scriptin güncellenmiş kod versiyonlarıdır. Bütün versiyonları göster.
Added "Alya Sometimes Hides Her Feelings in Russian" to anime shows list
Fixed invalid (old versions) names for two literature entries. (Kanji items only) Made it automatically fallback to using Exact Search when no results are found. Removed Apiv2 lookup (still loading the module to ensure wkof.user is defined). Made the immersion kit text into a link. Sorted various functions.
wkof.user
Updated namespace as well, since changing the name also seems to make it so reinstallation is required.
Added a fix for migrating old settings to the new design.
Removed some unnecessary indents that got accidentally added by my IDE
Complete rewrite of the way the filters are done, which, along with many of the other optimizations added, ultimately makes the results return faster in certain scenarios. Updated the names of some of the filter items to match the updated names from Immersion Kit; note that this means that most users will need to double check that their filter selections match their desired preferences, since for these lists: modification = new item. Fixed the behavior of the fetchRetryCount setting to work more as expected (i.e., modifying this now allows one to essentially force a retry by increasing the count allowed). Added some code comments to the settings variables.
fetchRetryCount
Small fix for setting the default playback rate to properly be 100%
Removed some commented-out code I forgot to delete.
Completely Rewrote the Furigana class to be more catered to the needs of the script, resulting in better ability to highlight the matching keyword(s) within the sentences. Greatly improved the clarity of the way the CSS classlists are being updated. Added an element that includes the text without furigana, which condenses unnecessary padding and spaces within and around the text when showFurigana is set to 'never'. Fixed some small oversights from the original script. Modified some usages to be more consistent with the esversion style.
Implemented the position-of-keyword sort method that was accidentally prematurely introduced in the previous update.
Moved all of the content to be a subsection at the bottom of the Context section instead of being its own separate section.
Made some small optimizations (mostly with the CSS selectors as well as string parsing).
Updating the minor version number.
Fixed some possible issues with `exampleLimit` not being immediately recognized as a number. generalized the CSS selectors using a variable name defined at the start. Added some fixes for edge-case scenarios that could still cause the horizontal slider to appear. Made a few other small optimizations.
Better fix for the padding when some images are nonexistent. Also sorted some of the CSS rules and added additional class selectors when applicable.
Added `flex:auto` to the img selector so that even when no image is found, they will pad the area to create a consistent-looking table.
Moved the prior CSS fix to the proper selector.
Fixed the function call for creating the onclick listener for the English text element when first creating the elements.
Fixed a CSS styling oversight that could sometimes result in the span element being wider than the parent div and therefore causing a horizontal scrollbar to appear and take up space.
Added configurable settings for the retry count and retry delay. Updated the functions used in `onSettingsClosed` to be more consistent. Grouped sections of the settings to be easier to understand their functions and added some more descriptions to them.
Moved Mob Psycho 100 back to the drama list (just found out that it's referring to the live action). Sorry for how this will affect the settings for any anime you've disabled that comes alphabetically after that. If I redesign the settings, I'll make it so additions and removals can be less destructive in nature. Also, fixed some of the userscript documentation.
Redesigned the settings into separate pages. Added a secondary sorting method. Introduced a delayed retry for fetching the results when none were found (since the API can be a bit finicky sometimes). Organized a large amount of the code.
Readded the descriptive text that shows when no results were found or they were all filtered out by the user's settings.
Moved the sorting order to its own separate section in the settings. Made it clearer that all of the settings in General can be previewed in real-time. Inlined some simple multi-line code blocks, removed some useless code statements and commented-out code. Organized the functions a little bit.
Can now change the following settings and preview their effect in real-time (clicking cancel or otherwise closing the window without saving will revert the changes): `Box Height`, `Example Limit`, `Playback Speed`, `Playback Volume`, `Show Japanese`, `Show Furigana`, `Show English`. Fixed a few other issues related to modifying those settings.
Updated the number for playback speed to match the description
Added a range slider setting to adjust the audio playback volume and converted the playback speed number box into a slider as well. Also made it so that changing these values does not need to re-render the html. (Minimum acceptable playback speed is now expanded to be down to 10%)
CSS selector now displays properly when changing the Example Limit to 0. Fixed some async/await usage incongruencies.
Fixed the CSS selector for when Example Limit is set to 0. Reverted to the previous method of audio element configuration, which was better able to handle clicking on different elements while one is already playing. Removed some unused functions.
Updating the matching logic for the colorizer to work in most or all circumstances (in particular, should now also work when Exact Search is unchecked and a match is found with the kana/kanji equivalent of the word). Added more description to the hover text for Exact Search. Now does no sorting on the original query, so results will be cached unsorted and therefore adjusting the settings will give the properly sorted value every time. No longer needlessly recreates the list when switching the settings for Example Limit/Show Japanese/Show Furigana/Show English, instead relying on CSS modifications to handle it. Added a ton of more code optimizations.
Added `regex.lastIndex=0` before each `regex.test(string)` usage to prevent inconsistent behavior when using the global regex flag in Javascript; this fixes an issue that would occasionally prevent a keyword from getting identified to be colored.
Added a setting to configure the max height of the container box. Moved “Only Yesterday” to Ghibli films as was mentioned earlier in the thread. Changed the scriptId referenced by WaniKani Open Framework to be unique to this version of the script (will consequently “reset” settings to default).
Added new search categories [dramas, games, literature, news] (all disabled by default) and added many entries for them (news and literature are shown with Japanese titles in the settings; hint: ctrl+a works to select all once a single entry has been selected). Added Mob Psycho 100 to the anime list (despite it being in the “Drama” category on the site for some reason). Changed the order of the selection boxes and resized a few of them. Fixed onclick for the speaker icon. Now allows changing the Example Limit to 0, which makes it return as many results as possible. Improved some array lookups by using hashmaps instead. Fixed and improved the checks for whether the filter lists have been updated or not and fixed some issues that were present when recreating the list; changing the filters now updates the list extremely fast. Most things involving the settings are being handled in a more graceful manner now.
No longer needlessly queries the API when saving of the settings results in no changes necessary to re-query the API (also similarly won’t recreate the list if no changes have been made). Made a bunch of other code simplifications/optimizations.
Fixed small oversight in the segment parser for the colorizer in 1.2.2
Greatly improved the system for coloring the keywords (will now successfully color the keywords in sentences that have random spaces in the middle of a keyword, and it will now properly match longer vocab with mixed okurigana).
Made a bit of a better system for coloring the keywords (previously it would fail when using furigana in various scenarios).
Modified version with an updated anime list, more settings for filtering, and coloring of the keyword within the example text.