Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Anki Scripting Crimes Part 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tapirbug-blog
Anki Scripting Crimes Part 2
Commits
91c1d810
Commit
91c1d810
authored
1 month ago
by
Philipp Pospischil
Browse files
Options
Downloads
Patches
Plain Diff
fix: AnkiDroid compatibility with class instead of ID
parent
e82d988e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
animation.js
+6
-5
6 additions, 5 deletions
animation.js
back.html
+6
-5
6 additions, 5 deletions
back.html
with
12 additions
and
10 deletions
animation.js
+
6
−
5
View file @
91c1d810
import
HanziWriter
from
"
hanzi-writer
"
import
HanziWriter
from
"
hanzi-writer
"
const
kanji
=
document
.
getElementById
(
"
kanji
"
).
innerText
for
(
const
kanjiContainer
of
document
.
getElementsByClassName
(
"
kanji
"
))
{
const
kanjiText
=
kanjiContainer
.
textContent
const
hanziWriterContainer
=
document
.
getElementById
(
"
kanji-animation
"
)
const
hanziWriterContainer
=
document
.
createElement
(
"
div
"
)
kanjiContainer
.
append
(
hanziWriterContainer
)
HanziWriter
.
create
(
hanziWriterContainer
,
kanji
).
animateCharacter
()
HanziWriter
.
create
(
hanziWriterContainer
,
kanjiText
).
animateCharacter
()
}
This diff is collapsed.
Click to expand it.
back.html
+
6
−
5
View file @
91c1d810
{{FrontSide}}
{{FrontSide}}
<hr
id=
"answer"
><hr
id=
"answer"
><hr
id=
"answer"
><hr
id=
"answer"
>
<hr
id=
"answer"
>
<hr
id=
"answer"
>
<hr
id=
"answer"
>
<hr
id=
"answer"
>
<div
id=
"kanji"
>
{{Back}}
</div>
<div
class=
"kanji"
>
{{Back}}
</div>
<div
id=
"kanji-animation"
></div>
<script
type=
"module"
>
<script
type=
"module"
>
import
"
./animation.js
"
import
"
./animation.js
"
</script>
</script>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment