mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-04-15 02:10:50 +00:00
Restores redirect script temporarily
This commit is contained in:
parent
560a277ad9
commit
15e9a04106
@ -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>
|
||||||
|
12
src/assets/js/redirect.js
Normal file
12
src/assets/js/redirect.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
const currentUrl = window.location.href;
|
||||||
|
const oldDomain = 'leilukin.neocities.org';
|
||||||
|
const newDomain = 'leilukin.com';
|
||||||
|
|
||||||
|
const redirectUrl = (oldStr, newStr) => {
|
||||||
|
if (currentUrl.includes(oldStr)) {
|
||||||
|
const newUrl = currentUrl.replace(oldStr, newStr);
|
||||||
|
location.replace(newUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
redirectUrl(oldDomain, newDomain);
|
Loading…
x
Reference in New Issue
Block a user