Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sp-quiz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Monitor
Service Desk
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
Philip Kaluđerčić
sp-quiz
Commits
c49b15bf
Commit
c49b15bf
authored
1 year ago
by
Philip Kaluđerčić
Browse files
Options
Downloads
Patches
Plain Diff
Avoid generating the inner HTML of #stats
parent
65e4f9aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
quiz.js
+5
-4
5 additions, 4 deletions
quiz.js
with
5 additions
and
4 deletions
quiz.js
+
5
−
4
View file @
c49b15bf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// ./LICENSE for more details.
// ./LICENSE for more details.
"
use strict
"
;
"
use strict
"
;
const
version
=
"
$Id: quiz.js,v 1.1
4
2024/01/20
09:55:10
oj14ozun Exp oj14ozun $
"
;
const
version
=
"
$Id: quiz.js,v 1.1
5
2024/01/20
10:00:26
oj14ozun Exp oj14ozun $
"
;
const
js_version
=
document
.
getElementById
(
"
js-version
"
);
const
js_version
=
document
.
getElementById
(
"
js-version
"
);
js_version
.
innerHTML
=
version
;
js_version
.
innerHTML
=
version
;
...
@@ -18,6 +18,8 @@ const info_toggle = document.getElementById("info-toggle");
...
@@ -18,6 +18,8 @@ const info_toggle = document.getElementById("info-toggle");
const
action
=
document
.
getElementById
(
"
action
"
);
const
action
=
document
.
getElementById
(
"
action
"
);
const
stats
=
document
.
getElementById
(
"
stats
"
);
const
stats
=
document
.
getElementById
(
"
stats
"
);
const
report
=
document
.
getElementById
(
"
report
"
);
const
report
=
document
.
getElementById
(
"
report
"
);
const
correct
=
document
.
getElementById
(
"
correct
"
);
const
wrong
=
document
.
getElementById
(
"
wrong
"
);
const
class_list
=
document
.
documentElement
.
classList
;
const
class_list
=
document
.
documentElement
.
classList
;
...
@@ -54,9 +56,8 @@ function update_stats(q) {
...
@@ -54,9 +56,8 @@ function update_stats(q) {
const
data
=
get_data
(
q
);
const
data
=
get_data
(
q
);
// update stats
// update stats
stats
.
innerHTML
=
correct
.
innerHTML
=
data
.
right
;
"
<abbr title=
\"
Wie oft richtig
\"
class=
\"
correct
\"
>
"
+
data
.
right
+
"
</abbr>:
"
wrong
.
innerHTML
=
data
.
wrong
;
+
"
<abbr title=
\"
Wie oft falsch
\"
class=
\"
wrong
\"
>
"
+
data
.
wrong
+
"
</abbr>
"
;
}
}
function
remember
(
q
,
ok
)
{
function
remember
(
q
,
ok
)
{
...
...
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