Is there a way to make have Safari run some javascript load after each loaded page?
Yes, Greasemonkey or "User scripts" were the ones that popularized this.

For one option on Mac/Safari, please see http://www.macupdate.com/app/mac/20718/greasekit