Skip to content

Commit

Permalink
[Update] Noscript footer
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-kun committed Dec 30, 2024
1 parent 55a5efd commit e2fc038
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#links a:hover {
text-decoration: underline;
}
#links summary a {
#links summary a, #links .noscript a {
display: inline;
}
details{
Expand All @@ -104,8 +104,8 @@
}
</style>
<noscript>
<style class='noscript'>
#links, #title {
<style id='styleNoScript'>
#links, #title, .noscript {
display:block !important;
}
.script {
Expand Down Expand Up @@ -290,6 +290,11 @@ <h2><a id='title' style='display:none' href='/'>Nikita Korzhitskii</a></h2>
</details>
<a target=_blank href="https://github.com/nikita-kun" params="cors">GitHub</a>
</details>

<p class='noscript' style='display:none'>
This website (<a target=_blank href="/sitemap/sitemap.xml">XML sitemap</a>, <a target=_blank href="https://github.com/nikita-kun/nikita-kun.github.io/" params="cors">source code</a>) is built
using the <a target=_blank href="https://nikita-kun.github.io/order/">Order</a> engine <a target=_blank href="https://github.com/nikita-kun/order/" params="cors">(source code)</a>
</p>
</div>

<iframe id='order' class='script' style='display:none'></iframe>
Expand Down Expand Up @@ -388,7 +393,7 @@ <h2><a id='title' style='display:none' href='/'>Nikita Korzhitskii</a></h2>
});

window.addEventListener('message', (event) => {
if (event.origin === window.location.origin && event.data.dataOrderException && !document.querySelector('style.noscript')) {
if (event.origin === window.location.origin && event.data.dataOrderException && !document.querySelector('#styleNoScript')) {
order.src = 'about:blank';
order.removeAttribute('src');
document.body.innerHTML += document.getElementsByTagName('noscript')[0].textContent;
Expand Down

0 comments on commit e2fc038

Please sign in to comment.