Skip to content
Snippets Groups Projects
Commit f6bda0aa authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Move generic part to bundle

parent d2d5c75b
No related branches found
No related tags found
No related merge requests found
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 () { ready(function () {
// your code here // your code here
var button = document.getElementById("submit_button"); var button = document.getElementById("submit_button");
......
...@@ -6,6 +6,22 @@ import xml from "highlight.js/lib/languages/xml"; ...@@ -6,6 +6,22 @@ import xml from "highlight.js/lib/languages/xml";
import php from "highlight.js/lib/languages/php"; import php from "highlight.js/lib/languages/php";
import json from "highlight.js/lib/languages/json"; 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 () { $(document).ready(function () {
$('#language-selector').on('change', function () { $('#language-selector').on('change', function () {
$("#language-form").submit(); $("#language-form").submit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment