Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Administrator
m4lab_landing_page
Commits
c15e5739
Commit
c15e5739
authored
5 years ago
by
Wolfgang Knopki
Browse files
Options
Download
Email Patches
Plain Diff
test dynamic header
parent
52fb7455
master
testing
No related merge requests found
Pipeline
#123
passed with stage
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/headfoot.js
+14
-10
js/headfoot.js
with
14 additions
and
10 deletions
+14
-10
js/headfoot.js
+
14
-
10
View file @
c15e5739
...
...
@@ -22,20 +22,24 @@ function userAuthenticated(){
}
function
readCookie
(
name
)
{
var
nameEQ
=
encodeURIComponent
(
name
)
+
"
=
"
;
var
ca
=
document
.
cookie
.
split
(
'
;
'
);
for
(
var
i
=
0
;
i
<
ca
.
length
;
i
++
)
{
var
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
===
'
'
)
c
=
c
.
substring
(
1
,
c
.
length
);
if
(
c
.
indexOf
(
nameEQ
)
===
0
)
return
decodeURIComponent
(
c
.
substring
(
nameEQ
.
length
,
c
.
length
));
function
readCookie
(
cname
)
{
var
name
=
cname
+
"
=
"
;
var
decodedCookie
=
decodeURIComponent
(
document
.
cookie
);
var
ca
=
decodedCookie
.
split
(
'
;
'
);
for
(
var
i
=
0
;
i
<
ca
.
length
;
i
++
)
{
var
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
==
'
'
)
{
c
=
c
.
substring
(
1
);
}
return
null
;
if
(
c
.
indexOf
(
name
)
==
0
)
{
return
c
.
substring
(
name
.
length
,
c
.
length
);
}
}
return
""
;
}
function
sendRequest
(
URL
){
console
.
log
(
docuemnt
.
cookie
);
let
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
"
POST
"
,
URL
,
true
);
let
token
=
readCookie
(
"
XSRF-TOKEN
"
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets