Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
b47011ee
Commit
b47011ee
authored
Jan 11, 2023
by
Dominik Hebeler
Browse files
fixed browser history on javascript redirect
parent
2df56e9b
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
metager/resources/js/verify.js
View file @
b47011ee
...
...
@@ -29,16 +29,13 @@ document.querySelectorAll("link").forEach((element) => {
let
nonce
=
document
.
querySelector
(
"
meta[name=nonce]
"
).
content
;
let
check
=
`/index.css?id=
${
nonce
}
`
;
console
.
log
(
url
);
console
.
log
(
nonce
);
console
.
log
(
check
);
let
interval
=
setInterval
(
function
()
{
let
links
=
document
.
querySelectorAll
(
"
link
"
);
for
(
let
i
=
0
;
i
<
links
.
length
;
i
++
)
{
if
(
links
[
i
].
href
.
includes
(
check
))
{
clearInterval
(
interval
);
window
.
location
=
url
;
history
.
replaceState
(
null
,
""
,
url
);
history
.
go
();
}
}
},
100
);
...
...
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