Skip to content

{ Monthly Archives } January 2011

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

Update: I no longer (2012-08-05) use Chili, I've switched to Prism. 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 […]

Improved sendkeys

The $.fn.sendkeys Plugin This is now obsolete. sendkeys is at version 4, and is documented at "Rethinking $.fn.sendkeys". 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, […]

Cross-Browser Text Ranges and Selections

Updated to version 2.3 on 2014-02-26 for data routines. 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 […]

Fixin’s for chili

I like Andrea Ercolino's chili syntax highlighter. I like it because it works well with jQuery, it allows me to use the HTML5 <code class="language-whatever"> notation for determining language, and I can highlight inline elements, not just pre elements. And Andrea has been very responsive to my questions. But it has an annoying habit of […]

Predictably Unhelpful

A depressing but absolutely correct editorial from Dimitri Christakis of the University of Washington in this month's Archives of Pediatrics and Adolescent Medicine (behind a pay wall, unfortunately, but the full reference is there). [H]undreds of decision tools in a variety of forms—guidelines, practice parameters, prediction rules—have been generated. Some have been good, some bad; […]

Javascript and Lisp

As Douglas Crockford has said, javascript is Lisp is C's clothing. That is part of what make javascript fun to program, but I never realized how literally true that statement is until I found this fascinating article by Thomas Lord about GNU and Scheme, that claims: I've read, since then, that up to around that […]

jQuery Text Effects

I have no idea when I would ever want to use these, but they are very cool. <h4>Click Me</h4> <div id="texteffect" style="width: 200px;height: 200px; border: 1px solid purple; background: #abcdef; cursor: pointer; padding: 2px; overflow: hidden"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur libero sem, fringilla in posuere a, cursus nec felis. Integer […]

New Hebrew Keyboard

One downside of the virtual keyboard is that it takes over the physical keyboard, so that typing is in the language of the virtual keyboard. This is often an advantage, but I usually want to mix Hebrew and English text. So I modified the program to track the Caps Lock key: if the caps lock […]

Better Asthma Care through Technology

Part of the drudgery of medicine is all the certification and paperwork, and the petty bureaucrats who need to constantly justify their existence by creating new rules. All the rules are well-intentioned, but taken together pave the road to hell—keeping us away from our patients and actually helping people. One such well-paved path is the […]