Add domain redirect script
This commit is contained in:
parent
ec6a1e7f4c
commit
35707c0f2e
|
@ -33,6 +33,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{# JavaScript #}
|
{# JavaScript #}
|
||||||
|
<script src="/assets/js/redirect.js"></script>
|
||||||
<script src="/assets/js/details-utils.js" defer></script>
|
<script src="/assets/js/details-utils.js" defer></script>
|
||||||
|
|
||||||
<title>
|
<title>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
const currentUrl = window.location.href;
|
||||||
|
const oldDomain = 'leilukin.neocities.org';
|
||||||
|
const newDomain = 'leilukin.com';
|
||||||
|
|
||||||
|
if (currentUrl.includes(oldDomain)) {
|
||||||
|
const newUrl = currentUrl.replace(oldDomain, newDomain);
|
||||||
|
location.replace(newUrl);
|
||||||
|
}
|
Loading…
Reference in New Issue