translatehtml.js: Load only if config is enabled.

pull/3959/head
Julio 4 years ago
parent dfed609445
commit 8b843f3b5f
  1. 2
      assets/js/translatehtml.js

@ -1,7 +1,7 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
if (window.user) { if (window.config && window.config['editor.translate_html'] && window.user && window.user.locale) {
const isoCode = window.user.locale; const isoCode = window.user.locale;
const translateElement = document.querySelector('.mce-translatehtml'); const translateElement = document.querySelector('.mce-translatehtml');
if (translateElement) { if (translateElement) {

Loading…
Cancel
Save