inject phantomscript functionality