Revert "Added regex filter to ensure callback is valid JavaScript function."

This reverts commit 096f424eda253296082d0de371928dac0768cf13.