|
|
@ -463,8 +463,10 @@ plugins.factory('userPlugins', function() { |
|
|
|
jsonp(url, function(data) { |
|
|
|
jsonp(url, function(data) { |
|
|
|
// Add the gist stylesheet only once
|
|
|
|
// Add the gist stylesheet only once
|
|
|
|
if (document.querySelectorAll('link[rel=stylesheet][href="' + data.stylesheet + '"]').length < 1) { |
|
|
|
if (document.querySelectorAll('link[rel=stylesheet][href="' + data.stylesheet + '"]').length < 1) { |
|
|
|
var stylesheet = '<link rel="stylesheet" href="' + data.stylesheet + '"></link>'; |
|
|
|
var stylesheet = document.createElement("link"); |
|
|
|
document.getElementsByTagName('head')[0].innerHTML += stylesheet; |
|
|
|
stylesheet.href = data.stylesheet; |
|
|
|
|
|
|
|
stylesheet.setAttribute('rel', 'stylesheet'); |
|
|
|
|
|
|
|
document.head.appendChild(stylesheet); |
|
|
|
} |
|
|
|
} |
|
|
|
element.innerHTML = '<div style="clear:both">' + data.div + '</div>'; |
|
|
|
element.innerHTML = '<div style="clear:both">' + data.div + '</div>'; |
|
|
|
}); |
|
|
|
}); |
|
|
|