Skip to content

Commit

Permalink
* Restore stroke animation.
Browse files Browse the repository at this point in the history
  The ` $('svg, canvas').length ` detection evaluates to true
  since google custom search switched to <svg> for icons.
  • Loading branch information
audreyt committed Apr 4, 2018
1 parent de06799 commit 46d62ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.ls
Expand Up @@ -562,7 +562,7 @@ window.do-load = ->
$result = $ \#result
$h1 = $result.find('h1, .h1')
$tooltip = $ '.ui-tooltip'
$('#strokes').fadeOut(\fast -> $('#strokes').html(''); window.scroll-to 0 0) if $('svg, canvas').length and not $('body').hasClass('autodraw')
$('#strokes').fadeOut(\fast -> $('#strokes').html(''); window.scroll-to 0 0) if $('#strokes').is(\:visible) and not $('body').hasClass('autodraw')
do
$tooltip.remove!
<- setTimeout _, 125ms
Expand Down Expand Up @@ -620,7 +620,7 @@ window.do-load = ->

$ '.results .stroke' .on vclick, ->
$('#historical-scripts').fadeIn!
return ($('#strokes').fadeOut \fast -> $('#strokes').html(''); window.scroll-to 0 0) if $('svg, canvas').length
return ($('#strokes').fadeOut \fast -> $('#strokes').html(''); window.scroll-to 0 0) if $('#strokes').is \:visible
window.scroll-to 0 0
strokeWords($('h1:first').data(\title) - /[((].*/) # Strip the english part and draw the strokes

Expand Down
2 changes: 1 addition & 1 deletion manifest.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Wed Jun 7 19:40:01 CST 2017
# Wed Apr 4 16:29:51 CST 2018

CACHE:

Expand Down

0 comments on commit 46d62ec

Please sign in to comment.