Commit dc340f96 authored by Henrik Tramberend's avatar Henrik Tramberend
Browse files

Remove geometry references

parent 12f4a6bf
...@@ -33,7 +33,6 @@ function deckerStart() { ...@@ -33,7 +33,6 @@ function deckerStart() {
// if (!printMode) { // if (!printMode) {
// setTimeout(continueWhereYouLeftOff, 500); // setTimeout(continueWhereYouLeftOff, 500);
// } // }
renderSvgMath();
} }
function prepareTaskLists() { function prepareTaskLists() {
...@@ -294,22 +293,6 @@ function continueWhereYouLeftOff() { ...@@ -294,22 +293,6 @@ function continueWhereYouLeftOff() {
} }
} }
// TODO: Make geometry.js into a proper module and arrange it to be loaded after
// TODO: MathJax.
function renderSvgMath() {
// Create a copy of the script with type 'geometry' that has type 'module' and
// will be executed immediately. Defers script execution until after MathJax
// has been initialized. Deletes the original 'geometry' script.
let scripts = document.querySelectorAll("script[type=geometry]");
for (let script of scripts) {
let js = document.createElement("script");
js.setAttribute("type", "module");
js.innerText = script.innerText;
script.insertAdjacentElement("beforebegin", js);
script.parentNode.removeChild(script);
}
}
// List of predicates that all must return true for a requested reload to // List of predicates that all must return true for a requested reload to
// actually be performed. // actually be performed.
let reloadInhibitors = []; let reloadInhibitors = [];
......
...@@ -365,5 +365,5 @@ renderJavascriptHtml code = do ...@@ -365,5 +365,5 @@ renderJavascriptHtml code = do
id <- liftIO randomId id <- liftIO randomId
let anchor = "let anchor = document.getElementById(\"" <> id <> "\");\n" let anchor = "let anchor = document.getElementById(\"" <> id <> "\");\n"
return $ do return $ do
H.div ! A.id (toValue id) ! A.class_ "geometry" $ "" H.div ! A.id (toValue id) ! A.class_ "es6 module anchor" $ ""
H.script ! A.class_ "geometry" ! A.type_ "geometry" $ toHtml (anchor <> code) H.script ! A.type_ "module" ! A.defer "" $ toHtml (anchor <> code)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment