Remove redirect JavaScript

This commit is contained in:
Helen Chong 2024-06-04 22:39:47 +08:00
parent dcbe035f9a
commit 37bf0ffb4e
1 changed files with 0 additions and 12 deletions

View File

@ -1,12 +0,0 @@
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);