1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

insert disable template at the end of body and remove script defer

This commit is contained in:
michaelhwang 2021-01-23 17:03:24 +08:00
parent a760f1775e
commit 6b5476cc5b

View file

@ -40,11 +40,11 @@ module Capybara
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);
//]]>