Skip to content

{ Category Archives } Javascript

Weird bug with chili and Firefox

Update: I haven't figured it out, but I did get a workaround. The bug is that any unmatched end of text leads to deleted characters in the middle of the text, so I added a line $.chili.recipes[recipeName]._main.endoftext = {_match: /$/}; to the downloadRecipe method, and now the bug doesn't show up. I'm running Firefox 7.0.1 [...]

Updated flexcal

For those following flexcal, my jQuery UI date picker, I've just released version 1.3. It fixes a bug in the setDate routine that would cause it to fail if called before the calendar was shown, and added date filtering. See the original post (now updated) for details.

Updated flexcal

For those following this, I corrected some typos (???? spelled wrong; numbers should not use the ????? form) in the Hebrew calendar. flexcal now stands at version 1.2

textpopup 1.3

I'm trying to test textpopup but (at least with jQuery 1.6.1 in Firefox), $.get with a local file fetches an XML document, not the text, unless I explicitly use the dataType parameter to set it to 'html'. Which I have now done. A small change, but it took me an hour to track it down. [...]

Javascript == Lisp, again

I've been trying on and off to get my head around continuations in Scheme, which is the language that gnucash uses for reports. It's one of the modern versions of Lisp. And then I came across a throwaway line in the YQL documentation about JSONP with a callback is a also called continuation-passing style. A [...]

jQuery 1.5

Well, jQuery 1.5 is out and there's yet another incompatibility: they changed the way attribute selectors work. You used to be able to use them without quotes, as [attr=value] but that now throws an exception. Now you have to use [attr="value"]. Not sure why they changed it; The CSS level 3 definition is ambiguous about [...]

Improved hebrewkeyboard

Now that sendkeys is fixed to work with contenteditable and I've analyzed Lebedev's VirtualKeyboard to allow typing on the physical keyboard, updating the hebrewKeyboard plugin was straightforward. I had to learn a fair amount about the difference between keyup, keydown, and keypress events, but I think everything works. Check it out!

Playing with Syntax Highlighters

I wanted to try different syntax highlighters so I wrote a little WordPress plugin that let me switch between different highlighters (email me if you would like that code). I wanted syntax highlighters that were javascript-based (ruling out GeSHi), and that allowed me to highlight inline code elements as well as code elements within block-level [...]

Improved sendkeys

The $.fn.sendkeys Plugin This is an updated version of my original $.fn.sendkeys post. I wanted to make a general-purpose onscreen keypad, and wasted a huge amount of time trying to find a way to simulate a keypress. $(element).trigger("keypress",...) won't work. Neither will keyup or keydown. For security reasons, I guess, you can't tell an element [...]

Cross-Browser Text Ranges and Selections

I was trying to update my sendkeys plugin to use contentEditable, and realized that it was getting harder and harder to do without some selection/text replacement library. Each browser is different and even different elements are treated differently. There are a few libraries out there, but none handled both input and textarea elements and regular [...]