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 to work before merging.
Merge pull request #1 from squaresurf/generic-tcdr-function

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