I've uploaded a modified version of the Furigana engine to https://gist.github.com/cyphr/6536814. The changes include various bugs fixed and added features.
Fixed bugs:
I've added the problem characters at 々 and 〆 break furigana to the regular expression.
In reference to Proposal about furigana:
- I've made the font size of Furigana when using Internet Explorer/Google Chrome similar to other browsers in order to increase readability (it was very small).
- When the "hide ruby texts, only show when hover on kanji" option (still off by default) is checked in the Furigana options, I've added underlining of words with Furigana text to allow easier identifying of which characters have Furigana.
I've fixed the bug where going e.g. 漢字ひらがな漢字{ふりがな} makes the "ふりがな" over the top of the "ひらがな" rather than "漢字".
The "options" at the bottom of the screen was above the navbar at the bottom of the screen due to a change on Stack Exchange's end, I made it prepend to the start of the inside of the navbar (minor).
Fixed the y-position of the "options" screen being incorrect when content height changes in between the time of the creation of the element and when it's shown.
Added support for fullwidth bracket characters (
{}
) as at Furigana in Japanese input mode using { }Fixed some Furigana vertical alignment issues: Made Safari and Opera 15+ and other WebKit-based browsers use their own ruby rendering (they support it natively, and is better aligned with other text when done this way), and for Firefox and Opera 12 and below it now uses pixel values to
vertical-align
which should be more accurate than it was previously. Unfortunately Firefox/Opera 12 and below will still sometimes be out by a pixel or so due to rounding as I haven't been able to find a perfect solution for those browsers
Added Features:
Added faster display of Furigana in "show on hover" mode by using a popup DIV rather than using "title" attributes.
At the bottom of the page, rather than saying "options" for the Furigana options, I've made it say "furigana options" as it's pretty easy to miss.
Added support for LH pitch accents as at What notation should we use for showing the pitch accent of words?.
Added an option to turn off the Furigana engine entirely.
Added additional options for left-aligned Furigana and not showing any Furigana (the center-aligned Furigana still remains the default), and added a "help" link to How should I format my questions on Japanese Language SE?, screenshot:
Added support for the mobile site
Added support for various additional characters to the regular expression when using
漢字【かんじ】
and漢字{かんじ}
syntax:<>()()≪≫;;::!!==≡≠≒$¥??&##@@“‘”’
Added support for including Okurigana in Furigana (for aesthetic reasons when JavaScript not enabled, and also for SEO)
Added some formatting help to the "formatting help" at https://japanese.stackexchange.com/questions/ask (disabled for anime.se as I think it's probably less important there), along with a link to How should I format my questions on Japanese Language SE?, screenshot:
Removed Features:
Removed the "strict" ([漢字]{かんじ} only), "recommended" ([漢字]{かんじ}, 漢字{かんじ}, 漢字【かんじ】) and "extended" ([漢字]{かんじ}, 漢字{かんじ}, 漢字【かんじ】, 漢字(かんじ), 漢字[かんじ] and others) Furigana syntax choice and left only the "recommended" syntaxes as I think those syntaxes are pretty much the only syntaxes which have been used on this website.
Removed the "hide romaji ruby texts" option, as I don't think romaji ruby texts are used often enough for it to warrant a specific option.
I've tested on IE8, Firefox 23.0, and Chromium 28.0.1500.71 Ubuntu and on those browsers it seems to work OK.
Please give any thoughts/report and report any bugs you've found etc here.
localStorage
updates).