Moved scripts from .html files to seperate js .files #191

Merged
bema merged 13 commits from bema/ref/spearate_js_from_html into master 2023-05-16 09:59:07 +02:00
Showing only changes of commit cad01a4285 - Show all commits

View File

@@ -161,21 +161,6 @@ const mergeHTMLPlugin = (function () {
}());
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("jsonBlock");
hljs.addPlugin(mergeHTMLPlugin);
}
function formatAndValidateJson(errorElement) {
const input = document.querySelector('#jsonBlock');
const processInfo = document.getElementById(errorElement);
@@ -248,3 +233,18 @@ function formatAndValidateJson(errorElement) {
input.textContent = "{\"enter\": \"your\", \"json\": \"here\"}";
hljs.highlightElement(input);
}
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("jsonBlock");
hljs.addPlugin(mergeHTMLPlugin);
}