This allows the the tcdr function to be used in other browser extensions.

I wasn't able to test that this works correctly in safari. So it should be
verified that it works in safari before merging.