embedly/jquery-preview — pull request #11 by tbaba (2013-01-08 02:36:00+00:00)
Title: Enable to use preview both SSL site and non-SSL site

Hi embed.ly team,

We use jquery.preview.js on SSL site, but this javascript uses HTTP request inner script as following:

```javascript
ajax : function(data){
// Make the request to Embedly. Note we are using the
// preview endpoint: http://embed.ly/docs/endpoints/1/preview
$.ajax({
url: 'http://api.embed.ly/1/preview',
dataType: 'jsonp',
data: data,
success: this._callback,
error: this.error
});
}
```

This causes a browser error. (e.g. [blocked] The page at https://example.com/ ran insecure content from ...)

So in this PR, I have changed the request url from HTTP only to using location.protocol.