Created
June 17, 2017 22:37
-
-
Save anonymous/449c895ac34d2f89083547655a6c16a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
if( document.referrer ) | |
{ | |
var tag = document.createElement('a'); | |
tag.href = document.referrer ; | |
[ | |
[ ['123.com','www.123.com'] , '111.com' ], | |
[ ['456.com','www.456.com'] , '222.com' ], | |
].forEach(function(e){ | |
if( e[0].indexOf(tag.hostname) != -1 ) | |
location.href = 'http://' + e[1] ; | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment