Remove defer attribute when not needed (#14234)

This commit is contained in:
Julien Maury 2021-07-21 16:51:41 +02:00 committed by GitHub
parent c78eac209f
commit 25715d07bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -100,7 +100,7 @@
<% end %>
<% if @comment.persisted? %>
<script defer>
<script>
var editForm = document.getElementById("edit_comment_<%= @comment&.id %>");
if ( editForm ) {
editForm.onsubmit = function (e) {

View file

@ -91,7 +91,7 @@
</div>
</div>
<script defer>
<script>
window.addeventasync = function () {
addeventatc.register('button-dropdown-click', function (obj) {
ga('send', 'event', 'click', 'Add Event To Calendar', 'User: <%= user_signed_in? %>');

View file

@ -113,7 +113,7 @@
<%= render "layouts/signup_modal" unless user_signed_in? %>
<% end %>
<% if @shell %>
<script defer>
<script>
if (!document.title) {
document.title = document.getElementsByTagName("TITLE")[1].textContent
}

View file

@ -10,7 +10,7 @@
<% if @html_variant %>
<%= @html_variant.html.html_safe %>
<div id="html-variant-element" data-variant-id="<%= @html_variant.id %>"></div>
<script defer>
<script>
setTimeout(function () {
var tokenMeta = document.querySelector("meta[name='csrf-token']")
var isBot = /bot|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex/i.test(navigator.userAgent) // is crawler