Restore replaceLinks() to ds.js (I had never put it back when I was debugging other stuff). This is pretty spotty functionality, but it works well enough.