mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-03-14 23:07:15 +00:00
12 lines
337 B
JavaScript
12 lines
337 B
JavaScript
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); |