     done()
   doit = (e) ->
     t = $.trim text.val()
-    rx = br.prop 'checked'
-    unless rx
+    type = div.find('input[name=type]:checked').val()
+    if type == 'rx'
+      if t.length == 0
+        text.notify 'You have provided no regular expression.'
+        return
+    else
       if t.length == 0
         text.notify 'There is no word to filter on.'
         return

  return if filterMaker?
  filterMaker = div = roundDiv cz: 'filter_maker'
  ti = $ '<label>find <input/></label>'
  text = ti.find('input')
  br = $ '<input type="checkbox" title="Treat the contents of the text field as a javascript regular expression.">regex</input>'
  br.tooltip()
  ba = $ '<input type="radio" name="when" value="always" checked="true">always</input>'
  bn = $ '<input type="radio" name="when" value="never">never</input>'
  bc = $ '<button>Create</button>'
  bx = xButton()
  div.append(ti).append(br).append(ba).append(bn).append(bc).append(bx)
  div.children().addClass('in_maker') # force specificity in CSS
  done = ->
    div.remove()

  d.attr 'id', opts.id if opts.id?
  return d
# inject a filter into the filters list
insertFilter = (f, t, type) ->
  filters.push f
  m = if f.m then 'always' else 'never'
  html = switch type
    when 'w'
      "&ldquo;#{t}&rdquo;"
    when 'pre'
      "&ldquo;#{t}&hellip;&rdquo;"
    when 'rx'
      "/#{t}/"
  row = $ "<tr><td>#{html}</td><td class='an'></td><td><span class='X'/></td></tr>"
  an = row.find 'td[class=an]'
  x = row.find 'span'
