mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-16 01:10:30 +02:00
Fix redirection when returning from new website (#5527)
This commit is contained in:
parent
2fb218a989
commit
07e57ebaff
@ -200,6 +200,7 @@
|
||||
$hideAlways = document.getElementById('hide-feedback-request');
|
||||
|
||||
var redesignUrl = 'https://simple-icons.github.io/simple-icons-website/',
|
||||
redesignRootDomain = 'simple-icons.github.io',
|
||||
hideBannerAlwaysIdentifier = 'hide-banner',
|
||||
redirectAutomaticallyIdentifier = 'redirect-to-redesign';
|
||||
|
||||
@ -235,7 +236,7 @@
|
||||
var redirect = localStorage.getItem(redirectAutomaticallyIdentifier);
|
||||
if (redirect === 'true') {
|
||||
$redirectAutomatically.innerHTML = "Disable redirect";
|
||||
if (document.referrer !== redesignUrl) {
|
||||
if (document.referrer.split('/')[2] !== redesignRootDomain) {
|
||||
window.location.replace(redesignUrl);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user