Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
decker
decker
Commits
dc340f96
Commit
dc340f96
authored
Apr 18, 2021
by
Henrik Tramberend
Browse files
Remove geometry references
parent
12f4a6bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
resource/support/js/decker.js
View file @
dc340f96
...
...
@@ -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
=
[];
...
...
src/Text/Decker/Filter/Image.hs
View file @
dc340f96
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment