Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
open-source
MetaGer
Commits
3218082b
Commit
3218082b
authored
1 year ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
Merge branch 'development' into 'master'
Development See merge request
!2046
parents
809f7801
df7ee64e
No related branches found
No related tags found
1 merge request
!2046
Development
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
metager/resources/js/verify.js
+38
-2
38 additions, 2 deletions
metager/resources/js/verify.js
metager/resources/views/layouts/resultpage/framedResultPage.blade.php
+1
-1
1 addition, 1 deletion
...urces/views/layouts/resultpage/framedResultPage.blade.php
with
39 additions
and
3 deletions
metager/resources/js/verify.js
+
38
−
2
View file @
3218082b
...
...
@@ -4,7 +4,7 @@ require("fetch-ie8");
try
{
// Should get blocked by csp
eval
(
"
window.sp = 1;
"
);
}
catch
(
err
)
{}
}
catch
(
err
)
{
}
let
key
=
getKey
();
let
url
=
"
/img/logo.png?id=
"
+
key
;
...
...
@@ -16,9 +16,45 @@ if (navigator.webdriver) {
url
+=
"
&wd
"
;
}
fetch
(
url
);
let
interval
;
let
unload
=
false
;
window
.
addEventListener
(
"
beforeunload
"
,
()
=>
{
unload
=
true
;
})
fetch
(
url
).
then
(
result
=>
{
interval
=
setInterval
(
verify
,
100
);
});
function
getKey
()
{
let
nonce_element
=
document
.
querySelector
(
"
meta[name=nonce]
"
);
return
nonce_element
.
content
;
}
function
verify
()
{
if
(
unload
)
{
clearInterval
(
interval
);
return
;
}
let
styleSheet
=
getStyleSheet
();
if
(
!
styleSheet
||
!
(
"
cssRules
"
in
styleSheet
)
||
styleSheet
.
cssRules
.
length
===
0
)
{
return
false
;
}
clearInterval
(
interval
);
history
.
go
();
}
function
getStyleSheet
()
{
let
styleSheets
=
document
.
styleSheets
;
for
(
let
i
=
0
;
i
<
styleSheets
.
length
;
i
++
)
{
let
styleSheet
=
styleSheets
[
i
];
let
matches
=
styleSheet
.
href
.
match
(
/index
\.
css
\?
id=
([
a-f0-9
]{32})
$/
);
if
(
!
matches
)
{
continue
;
}
return
styleSheet
;
}
return
null
;
}
This diff is collapsed.
Click to expand it.
metager/resources/views/layouts/resultpage/framedResultPage.blade.php
+
1
−
1
View file @
3218082b
...
...
@@ -21,7 +21,7 @@
<script
src=
"{{ mix('js/index.js') }}"
></script>
<link
rel=
"stylesheet"
href=
"/index.css?id={{ $mgv }}"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta
http-equiv=
"refresh"
content=
"
0
"
>
<meta
http-equiv=
"refresh"
content=
"
1
"
>
</head>
<body>
<div
id=
"resultpage-container"
>
...
...
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