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

Remove geometry references

parent 12f4a6bf
......@@ -33,7 +33,6 @@ function deckerStart() {
// if (!printMode) {
// setTimeout(continueWhereYouLeftOff, 500);
// }
renderSvgMath();
}
function prepareTaskLists() {
......@@ -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
// actually be performed.
let reloadInhibitors = [];
......
......@@ -365,5 +365,5 @@ renderJavascriptHtml code = do
id <- liftIO randomId
let anchor = "let anchor = document.getElementById(\"" <> id <> "\");\n"
return $ do
H.div ! A.id (toValue id) ! A.class_ "geometry" $ ""
H.script ! A.class_ "geometry" ! A.type_ "geometry" $ toHtml (anchor <> code)
H.div ! A.id (toValue id) ! A.class_ "es6 module anchor" $ ""
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