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.
The function find_duplicates was for checking creating source before. I found that function can also find the source by url so I just call it directly instead of changing the name. I will change the name to a better one(the one you suggest) later.