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
6b2aa17c
Commit
6b2aa17c
authored
1 year ago
by
Philip Kaluđerčić
Browse files
Options
Downloads
Patches
Plain Diff
Generate permalink contents
parent
ce9b436f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
quiz.js
+14
-1
14 additions, 1 deletion
quiz.js
with
14 additions
and
1 deletion
quiz.js
+
14
−
1
View file @
6b2aa17c
...
...
@@ -7,7 +7,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/. */
"
use strict
"
;
const
version
=
"
$Id: quiz.js,v 1.2
1
2024/01/21 1
1:04:51
oj14ozun Exp oj14ozun $
"
;
const
version
=
"
$Id: quiz.js,v 1.2
2
2024/01/21 1
2:38:48
oj14ozun Exp oj14ozun $
"
;
const
js_version
=
document
.
getElementById
(
"
js-version
"
);
js_version
.
innerText
=
version
;
...
...
@@ -25,6 +25,7 @@ const stats = document.getElementById("stats");
const
report
=
document
.
getElementById
(
"
report
"
);
const
correct
=
document
.
getElementById
(
"
correct
"
);
const
wrong
=
document
.
getElementById
(
"
wrong
"
);
const
perma
=
document
.
getElementById
(
"
perma
"
);
const
class_list
=
document
.
documentElement
.
classList
;
...
...
@@ -80,6 +81,15 @@ function remember(q, ok) {
}
function
pick
()
{
const
qid
=
new
URLSearchParams
(
window
.
location
.
search
).
get
(
"
show
"
);
if
(
qid
)
{
const
q
=
questions
.
find
(
q
=>
q
.
id
==
qid
);
if
(
q
)
{
return
q
;
}
console
.
error
(
"
Invalid ID:
"
+
qid
);
}
let
choice
=
questions
[
0
];
let
worst
=
evaluate
(
choice
);
...
...
@@ -176,6 +186,9 @@ function next() {
let
title
=
`Problem mit der Frage: "
${
text
.
innerText
}
" (
${
q
.
source
}
)`
;
let
desc
=
"
(Ersetze diesen Text mit einer Beschreibung des Problems)
"
report
.
href
=
`
${
gitlab_base
}
/issues/new?issue[title]=
${
encodeURIComponent
(
title
)}
&issue[description]=
${
encodeURIComponent
(
desc
)}
`
;
// update permalink
perma
.
href
=
`?show=
${
encodeURIComponent
(
q
.
id
)}
`
;
}
function
submit
()
{
...
...
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