allow browser to use https for pastebin embed

This commit is contained in:
kurros 2016-08-05 18:42:41 -04:00
parent 573b090ed2
commit 4a0ed97934

View file

@ -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%')