Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WorkAdventure Dialogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FS Info TU Dortmund
Events
WorkAdventure Dialogs
Commits
d4b3e5ae
Commit
d4b3e5ae
authored
4 years ago
by
Jonas Zohren
Browse files
Options
Downloads
Patches
Plain Diff
Use query parameter instead of hash to select dialog
parent
13020b60
No related branches found
Branches containing commit
No related tags found
Loading
Pipeline
#16990
passed
4 years ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils.ts
+3
-3
3 additions, 3 deletions
src/utils.ts
with
3 additions
and
3 deletions
src/utils.ts
+
3
−
3
View file @
d4b3e5ae
...
...
@@ -18,15 +18,15 @@ function isValidDialogSetName(input: unknown) {
return
!
/
[^
a-zA-Z0-9
\-\_]
/i
.
test
(
input
);
}
function
get
Hash
Value
():
string
{
return
window
.
location
.
hash
.
substr
(
1
);
function
get
Param
Value
(
paramName
:
string
):
string
|
null
{
return
new
URLSearchParams
(
window
.
location
.
search
).
get
(
paramName
);
}
/**
* Fetch a dialogSet based on the hash value
*/
export
async
function
fetchDialogSet
():
Promise
<
DialogSet
>
{
const
setName
=
get
Hash
Value
();
const
setName
=
get
Param
Value
(
"
dialogSet
"
);
if
(
!
isValidDialogSetName
(
setName
))
throw
new
Error
(
"
Name is not valid dialogSet name
"
);
...
...
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