X-Git-Url: https://jasonwoof.com/gitweb/?p=hexbog.git;a=blobdiff_plain;f=main.coffee;h=015ce7c2fa221d9b772d863a05d56b0d74aa01ed;hp=7403503ffbd17634eac77d8e485dc2795ba80e93;hb=5f118636bd356acfabd1e6a3a9da0b6bc433c95b;hpb=3c38faf760ae82a88c1cd5adaa7eb1315a92fba8 diff --git a/main.coffee b/main.coffee index 7403503..015ce7c 100644 --- a/main.coffee +++ b/main.coffee @@ -245,8 +245,8 @@ update_selection_display = -> 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 @@ -255,8 +255,10 @@ update_selection_display = -> else last = '' $little_tip.html "Click the #{last}\"#{word.substr(word.length - 1)}\" for #{score_for word} points" + $big_tip.html "#{word}" $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" @@ -526,8 +528,8 @@ extract_wiktionary_definiton = (html) -> 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" or new_def.substr(0, 20) is "Alternative form of " - 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' @@ -541,7 +543,7 @@ extract_wiktionary_definiton = (html) -> 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