diff --git a/modules/core/www/assets/js/loginuserpass.js b/modules/core/www/assets/js/loginuserpass.js index 16ec5dcd28ce96a4d2407d8ee3c2fbc013282584..6685cd43ac2dbe04528b8be6044f4d44bcf30eb9 100644 --- a/modules/core/www/assets/js/loginuserpass.js +++ b/modules/core/www/assets/js/loginuserpass.js @@ -1,19 +1,3 @@ -window.readyHandlers = []; -window.ready = function ready(handler) { - window.readyHandlers.push(handler); - handleState(); -}; - -window.handleState = function handleState () { - if (document.readyState === 'interactive' || document.readyState === "complete") { - while(window.readyHandlers.length > 0) { - (window.readyHandlers.shift())(); - } - } -}; - -document.onreadystatechange = window.handleState; - ready(function () { // your code here var button = document.getElementById("submit_button"); diff --git a/src/js/bundle.js b/src/js/bundle.js index 41cc0084e4f5eceb5ea7e1d892da6620d055a4a8..608ce4d262543e847dc3095c2d0b487d9621c0cb 100644 --- a/src/js/bundle.js +++ b/src/js/bundle.js @@ -6,6 +6,22 @@ import xml from "highlight.js/lib/languages/xml"; import php from "highlight.js/lib/languages/php"; import json from "highlight.js/lib/languages/json"; +window.readyHandlers = []; +window.ready = function ready(handler) { + window.readyHandlers.push(handler); + handleState(); +}; + +window.handleState = function handleState () { + if (document.readyState === 'interactive' || document.readyState === "complete") { + while(window.readyHandlers.length > 0) { + (window.readyHandlers.shift())(); + } + } +}; + +document.onreadystatechange = window.handleState; + $(document).ready(function () { $('#language-selector').on('change', function () { $("#language-form").submit();