word = selected_word()
$big_tip.removeClass('good')
if word.length > 0
- $big_tip.html word
if word.length < 3
+ $big_tip.html word
$little_tip.html "Click more tiles (3 minimum)"
else
if is_word word
else
last = ''
$little_tip.html "Click the #{last}\"#{word.substr(word.length - 1)}\" for #{score_for word} points"
+ $big_tip.html "<a href=\"http://en.wiktionary.org/wiki/#{word}\" target=\"_blank\" title=\"click for definition\">#{word}</a>"
$big_tip.addClass('good')
else
+ $big_tip.html word
$little_tip.html "\"#{word}\" is not in the word list."
else
$big_tip.html "← Click a word"
if part and el.tagName is 'OL'
$(el).children().each (i, el) ->
new_def = $(el).text()
- if new_def.substr(0, 9) is '(obsolete' or new_def.substr(0, 8) is "(archaic"
- key = 'obsolete'
+ if new_def.substr(0, 9) is '(obsolete' or new_def.substr(0, 8) is "(archaic" or new_def.substr(0, 20) is "Alternative form of " or new_def.substr(0, 24) is "Alternative spelling of "
+ key = 'lame'
else
if part is 'verb'
key = 'verb'
if found.verb
return false # break
- part_defs = (finds[i] for i in ['verb', 'nonverb', 'obsolete'] when finds[i])
+ part_defs = (finds[i] for i in ['verb', 'nonverb', 'lame'] when finds[i])
unless part_defs.length
return false