Restores redirect script temporarily
This commit is contained in:
parent
560a277ad9
commit
15e9a04106
|
@ -33,6 +33,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{# JavaScript #}
|
||||
<script src="/assets/js/redirect.js"></script>
|
||||
<script src="/assets/js/details-utils.js" defer></script>
|
||||
|
||||
<title>
|
||||
|
|
|
@ -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…
Reference in New Issue