Skip to content

Commit

Permalink
fix: Remove Google translate bar when loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jan 16, 2024
1 parent 8db1071 commit 486585e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/views/layouts/decidim/_head_extra.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
});
</script>
<% end %>

<% if translation_mode?(:google) %>
<script>

Expand Down Expand Up @@ -39,6 +40,11 @@
},
'google_translate_element'
);

waitForElm("iframe.skiptranslate").then((elm) => {
$(elm).hide();
$("body").attr("style", "");
});
}
</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Expand Down

0 comments on commit 486585e

Please sign in to comment.