13 lines
405 B
JavaScript
13 lines
405 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);
|
|
redirectUrl('james-somerton-my-vide-', 'james-somerton-my-video-'); |