Add function for source preview page's javascript

Some functions are needed in source preview page, like checking if a website can be embed in an iframe which cannot be done in js, get source by url.
I will change it.