Merge pull request #802 from kurros/https-pastebin
allow browser to use https for pastebin embeds
This commit is contained in:
commit
1d1a1e2818
|
@ -457,11 +457,11 @@ plugins.factory('userPlugins', function() {
|
|||
});
|
||||
|
||||
var pastebinPlugin = new UrlPlugin('Pastebin', function(url) {
|
||||
var regexp = /^http:\/\/pastebin.com\/([^.?]+)/i;
|
||||
var regexp = /^https?:\/\/pastebin.com\/([^.?]+)/i;
|
||||
var match = url.match(regexp);
|
||||
if (match) {
|
||||
var id = match[1],
|
||||
embedurl = "http://pastebin.com/embed_iframe/" + id,
|
||||
embedurl = "//pastebin.com/embed_iframe/" + id,
|
||||
element = angular.element('<iframe></iframe>')
|
||||
.attr('src', embedurl)
|
||||
.attr('width', '100%')
|
||||
|
|
Loading…
Reference in New Issue