X-Git-Url: https://jasonwoof.com/gitweb/?p=hexbog.git;a=blobdiff_plain;f=main.coffee;h=7daeab54a6959b286437143e11b199ec96de85a9;hp=459f152b95f323cedece996784d8744c1ea9fe1d;hb=refs%2Fheads%2Fmaster;hpb=b20403c1264f721d3e85779df74200def0bea565
diff --git a/main.coffee b/main.coffee
index 459f152..7daeab5 100644
--- a/main.coffee
+++ b/main.coffee
@@ -306,7 +306,7 @@ 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.html "#{word}"
$big_tip.addClass('good')
else
$big_tip.html word
@@ -626,36 +626,36 @@ activate_selection = ->
show_definition = (word, type, definition, language) ->
- html = ""
+ html = ""
html += "#{word.substr(0, 1).toUpperCase() + word.substr(1)}, #{type}"
if language isnt 'English'
html += " (#{language})"
html += ': '
html += definition
- html += '
'
+ html += ''
$definition_body.html html
connector_width = 11
-connector_radius = 5
+connector_radius = 4
connector_slant = 12
add_connector = (tile, horiz, vert) ->
style = {}
switch horiz
when 'left'
- style.right = '100%'
+ style.left = -9
when 'mid'
style.left = 21 - connector_radius
when 'right'
- style.left = '100%'
+ style.right = -9
switch vert
when 'top'
- style.bottom = '100%'
+ style.top = -9
when 'up'
style.top = 21 - connector_radius - connector_slant
when 'down'
style.top = 21 - connector_radius + connector_slant
when 'bot'
- style.top = '100%'
+ style.bottom = -9
tile.connector = $("").css style
tile.dom.append tile.connector
@@ -828,7 +828,7 @@ extract_wiktionary_definiton = (html) ->
look_up_definition = (word) ->
$definition_body.html "Looking up definition for \"#{word}\"..."
$.ajax({
- url: "http://en.wiktionary.org/w/api.php?action=parse&format=json&page=#{word}"
+ url: "https://en.wiktionary.org/w/api.php?action=parse&format=json&page=#{word}"
jsonpCallback: "lud_#{word}" # always use the same callback for the same word so it's cacheable
dataType: 'jsonp'
cache: true