You will need to install a user script manager extension to install this script.
Script Summary: Automatically save the page you visited (or all links you can see) to "Wayback Machine".
Original link: http://userscripts-mirror.org/scripts/show/383915
You can do these things with this script:
You can change the behavior by editing this script. The default value is, savevisited = true; savealllinks = true; savealllinksnohostrestriction = false;