I think I now why this is happening.
1. Access https://reddit.com;
2. script checks if there's __https://reddits.com__ on your URL;
3. if your condition is true, then your script does __'https://web.archive.org/web/*/' + https://reddit.com__ and send you to this addres;
4. script checks if there's __https://reddits.com__ on your URL;
5. Yeah, there is https://reddit.com on there, you've just added it!
6. then your script does __'https://web.archive.org/web/*/' + https://reddit.com__ and send you to this addres;
7. Loop!
I think you can set the script to run at a specific website.