Skip to content

Commit

Permalink
insert disable template at the end of body and remove script defer
Browse files Browse the repository at this point in the history
  • Loading branch information
kuei0221 committed Jan 23, 2021
1 parent a760f17 commit 6b5476c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capybara/server/animation_disabler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def html_content?
end

def insert_disable(html)
html.sub(%r{(</head>)}, "#{disable_markup}\\1")
html.sub(%r{(</body>)}, "#{disable_markup}\\1")
end

DISABLE_MARKUP_TEMPLATE = <<~HTML
<script defer="defer">
<script>
//<![CDATA[
(typeof jQuery !== 'undefined') && (jQuery.fx.off = true);
//]]>
Expand Down

0 comments on commit 6b5476c

Please sign in to comment.