Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Anki Scripting Crimes Part 1
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 1
Commits
55248129
Commit
55248129
authored
1 month ago
by
Philipp Pospischil
Browse files
Options
Downloads
Patches
Plain Diff
fix: AnkiDroid compatibility with class instead of ID
parent
5b8b7971
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
animation.js
+6
-5
6 additions, 5 deletions
animation.js
with
6 additions
and
5 deletions
animation.js
+
6
−
5
View file @
55248129
import
HanziWriter
from
"
hanzi-writer
"
const
kanji
=
document
.
getElementById
(
"
kanji
"
).
innerText
const
hanziWriterContainer
=
document
.
getElementById
(
"
kanji-animation
"
)
HanziWriter
.
create
(
hanziWriterContainer
,
kanji
).
animateCharacter
()
for
(
const
kanjiContainer
of
document
.
getElementsByClassName
(
"
kanji
"
))
{
const
kanjiText
=
kanjiContainer
.
textContent
const
hanziWriterContainer
=
document
.
createElement
(
"
div
"
)
kanjiContainer
.
append
(
hanziWriterContainer
)
HanziWriter
.
create
(
hanziWriterContainer
,
kanjiText
).
animateCharacter
()
}
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