Actually hide content when WebEnvironmentIntegrity is detected
This commit is contained in:
parent
1fe22f58cd
commit
58c6f12ea6
16
index.html
16
index.html
|
@ -92,9 +92,11 @@
|
|||
}
|
||||
|
||||
.web-environment-integrity-message {
|
||||
background-color: lightyellow;
|
||||
display: none;
|
||||
}
|
||||
section.web-environment-integrity-message {
|
||||
background-color: lightyellow;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
|
@ -163,7 +165,7 @@
|
|||
</p>
|
||||
</article>
|
||||
</section>
|
||||
<section>
|
||||
<section class="main-content">
|
||||
<h2>Bio</h2>
|
||||
<article>
|
||||
<p>
|
||||
|
@ -181,7 +183,7 @@
|
|||
</p>
|
||||
</article>
|
||||
</section>
|
||||
<section>
|
||||
<section class="main-content">
|
||||
<h2>Notable Projects</h2>
|
||||
<article>
|
||||
<h3>pict-rs</h3>
|
||||
|
@ -329,18 +331,22 @@
|
|||
<header>
|
||||
<h2>Links</h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<ul class="main-content">
|
||||
<li><a href="https://git.asonix.dog/asonix" target="_blank">Software</a></li>
|
||||
<li><a href="https://masto.asonix.dog/@asonix" rel="me" target="_blank">Mastodon</a></li>
|
||||
<li><a href="https://matrix.to/#/@asonix:matrix.asonix.dog" target="_blank">Matrix</a></li>
|
||||
<li><a href="https://t.me/asonix" target="_blank">Telegram</a></li>
|
||||
<li><a href="https://www.furaffinity.net/user/asonix" target="_blank">Furaffinity</a></li>
|
||||
</ul>
|
||||
<ul class="web-environment-integrity-message">
|
||||
<li><a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<script>
|
||||
if(navigator.getEnvironmentIntegrity !== undefined) {
|
||||
document.querySelector('.web-environment-integrity-message').setAttribute("style", "display: block;");
|
||||
document.querySelectorAll('.web-environment-integrity-message').forEach((elem) => elem.setAttribute("style", "display: block;"));
|
||||
document.querySelectorAll('.main-content').forEach((elem) => elem.setAttribute("style", "display: none;"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue