GlkOte in jQuery

A while ago I said I would try to convert GlkOte over from using Prototype (a Javascript convenience library) over to jQuery (a shinier Javascript convenience library), for reasons that are not interesting unless you happen to be maintaining :slight_smile:

I have gotten a draft of this working. I think.

For reference, the old Prototype version is at:

(They should work the same, except for some cosmetic details. I increased the font size in the new version, and added one new test command.)

I’ve tested it with recent Safari, Mobile Safari, Chrome, and Firefox. I haven’t tried IE because I don’t have one handy. According to the jquery docs, IE 6+ should work, but maybe I introduced some additional hangups.

This uses jQuery 1.9.1. I expect that it won’t work with 1.8 or earlier, sadly – the jquery docs have big warnings about API changes.

The next step will be to plug it into Quixe and test that. But I won’t get to that for another couple of weeks.

Hurray! I’ll take a look when I get enough time myself.

Btw, the 1.9/2.0 API is meant to be very stable, and I don’t think the jQuery team are expecting to change it for quite a long while. I still think that we should provide jQuery in the CSS/JS Glk system, so 1.9 would be a good API to provide. And if the API does eventually remove something, the jQuery team will provide a compatibility plugin we could use.

I just gave it a quick test, and it seems to work well, even in IE7 (which Parchment doesn’t support).