sixteen nights

sixteen nights with Opera

HTML Ruby

, , ,

This user javascript adds support for rendering of ruby annotation in Opera. Updated to version 6.00.2.

This script adds support for ruby annotation in Opera. (What about Firefox?)

What is ruby?

Ruby, here, is not the programming language Ruby but the ruby annotation used in web pages. These "ruby" are small texts that are usually displayed above base texts to show the pronunciation of characters used in East Asian languages.

What is the problem?

Ruby annotation itself is currently a W3C recommendation as a XHTML 1.1 module with a supporting CSS3 module for styling. However, the only browser to have any kind of built-in support is Internet Explorer which implemented the draft specification in IE 5 and Chrome 4 which now has rudimentary support for rendering the HTML5 draft spec ruby annotation.

Pure CSS solutions are possible in Opera with User Stylesheet (see download section), but they do not provide text spacing and will break when faced with unclosed ruby tags.

How does HTML Ruby solve it?

As mentioned above, this script adds support for rendering of ruby annotation in Opera. The script almost supports the full specification described in this draft for HTML ruby annotation and this W3C recommendation for XHTML ruby annotation and includes support for complete baseline alignment, the rbspan attribute, rb/rt text spacing, and unclosed ruby tags.

Try it for yourself at W3C's I18N Tests: Ruby markup and many other sites that use ruby annotation.

Download

HTML Ruby 6 and optional settings file for Opera 10.5 (at userscripts.org)
HTML Ruby 5 for Opera 9.5
HTML Ruby 4 for Opera 9.2

Change Log

CSS used in HTML Ruby can be used on its own as a User Stylesheet

Known Issues

If you experience messed-up encoding while using this script, refreshing the page or setting the encoding manually should solve the problem. This may occur when encountering unclosed ruby tags on a non-unicode page where there is no server-supplied encoding.

エンコードがサーバから指定されていないページで、タグが閉じられていないルビがあった場合、ページが文字化けする可能性があります。文字化けした場合、ページをリロードするか手動で適切なエンコードを指定することで正常に表示されます。

Special Thanks

Ti, White Lynx, and xErath who helped me develop HTML Ruby and provided me with valuable feedback.

IE9 using hardware acceleration for renderingVertical-izer

Comments

metude Sunday, April 4, 2010 9:11:21 AM

Is there an update for Opera 10.5

kailapis Sunday, April 25, 2010 1:53:17 AM

@metude: Yep, though I'm kind of sure that it'll work on older versions as well.

metude Sunday, April 25, 2010 7:51:39 AM

Thanx.
Please write comment when you publish an update...

kailapis Sunday, April 25, 2010 3:37:37 PM

Version 6.00.2
* Cleaning up the code a bit

I might just use the comments as a change log.

@metude: yeah... I would like a better notification system though. Would be nice if Opera had an official site like they do with widgets.

kailapis Friday, June 18, 2010 3:05:30 AM

Version 6.00.3
* added conditional for better cleaning of unclosed tags

metude Friday, June 18, 2010 9:32:25 AM

Thanx 4 new version...

JerryJerryLoo555 Saturday, September 25, 2010 11:53:18 AM

I like Version 6.00.3

Anonymous Monday, October 4, 2010 9:37:04 PM

Anonymous writes: excuse me but, can you explain how to install this to Opera? 'cause i looked for everywhere one the web and couldn't find anay explanations... thanks

kailapis Tuesday, November 16, 2010 2:31:34 AM

Version 6.00.4
* updated code to get rid of JS error when there's no settings file

kailapis Tuesday, November 16, 2010 2:34:59 AM

Originally posted by anonymous:

Anonymous writes:

excuse me but, can you explain how to install this to Opera?


Yes... Opera hasn't done much in terms of helping users use UserJS.
See http://operawiki.info/UserJS#howto

jesus2099 Tuesday, November 16, 2010 9:01:23 AM

Hey kailapis!
Thanks for your last HTMLRubySettings "undefined" fix :)
That's very kind of you citing me in your awesome script's page!

Don't you think it could be nice having the configuration at the beginning of the script, this way having just one .js file?

--
jesus2099 × Ti = Tristan + patate12 ÷ saucisson7

kailapis Wednesday, November 17, 2010 2:33:19 AM

Originally posted by Ti:

Don't you think it could be nice having the configuration at the beginning of the script, this way having just one .js file?


Yeah, my rationale was that having the settings file separately would allow users to just save over the existing file.

Anyway, I'm making an Opera extension of HTML Ruby, since Opera seems to be moving in that direction... (years of neglecting UserJS and now having an official repo for extensions). I just need to find an easy way to offer an "options" page without creating a button in the address bar...

http://htmlrubyopera.codeplex.com/

jesus2099 Wednesday, November 17, 2010 9:29:56 AM

eek I didn't know at all about their move to such extensions !
http://labs.opera.com
These extensions will be great thanks to yours to begin with.

Anonymous Thursday, September 1, 2011 10:01:22 AM

Анонімний writes: It is cool that people can receive the mortgage loans moreover, this opens up new opportunities.

Anonymous Friday, September 2, 2011 3:37:02 PM

Анонімний writes: The business loans are important for people, which are willing to organize their own career. As a fact, it is comfortable to receive a term loan.

Anonymous Saturday, September 3, 2011 3:27:47 AM

Анонімний writes: Make your own life time more simple take the credit loans and everything you want.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies