angular-gist
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -9,3 +9,3 @@ angular.module('gist', []); | ||
template: '<div></div>', | ||
link: function(scope, elm, attrs) { | ||
link: function(scope, element, attrs) { | ||
var gistId = attrs.id; | ||
@@ -17,3 +17,3 @@ | ||
iframe.id = "gist-" + gistId; | ||
elm[0].appendChild(iframe); | ||
element[0].appendChild(iframe); | ||
@@ -20,0 +20,0 @@ var iframeHtml = '<html><head><base target="_parent"><style>table{font-size:12px;}</style></head><body onload="parent.document.getElementById(\'' + iframe.id + '\').style.height=document.body.scrollHeight + \'px\'"><scr' + 'ipt type="text/javascript" src="https://gist.github.com/' + gistId + '.js"></sc'+'ript></body></html>'; |
@@ -1,1 +0,1 @@ | ||
angular.module("gist",[]),angular.module("gist").directive("gist",function(){return{restrict:"E",replace:!0,template:"<div></div>",link:function(scope,elm,attrs){var gistId=attrs.id,iframe=document.createElement("iframe");iframe.setAttribute("width","100%"),iframe.setAttribute("frameborder","0"),iframe.id="gist-"+gistId,elm[0].appendChild(iframe);var iframeHtml='<html><head><base target="_parent"><style>table{font-size:12px;}</style></head><body onload="parent.document.getElementById(\''+iframe.id+'\').style.height=document.body.scrollHeight + \'px\'"><script type="text/javascript" src="https://gist.github.com/'+gistId+'.js"></script></body></html>',doc=iframe.document;iframe.contentDocument?doc=iframe.contentDocument:iframe.contentWindow&&(doc=iframe.contentWindow.document),doc.open(),doc.writeln(iframeHtml),doc.close()}}}); | ||
angular.module("gist",[]),angular.module("gist").directive("gist",function(){return{restrict:"E",replace:!0,template:"<div></div>",link:function(scope,element,attrs){var gistId=attrs.id,iframe=document.createElement("iframe");iframe.setAttribute("width","100%"),iframe.setAttribute("frameborder","0"),iframe.id="gist-"+gistId,element[0].appendChild(iframe);var iframeHtml='<html><head><base target="_parent"><style>table{font-size:12px;}</style></head><body onload="parent.document.getElementById(\''+iframe.id+'\').style.height=document.body.scrollHeight + \'px\'"><script type="text/javascript" src="https://gist.github.com/'+gistId+'.js"></script></body></html>',doc=iframe.document;iframe.contentDocument?doc=iframe.contentDocument:iframe.contentWindow&&(doc=iframe.contentWindow.document),doc.open(),doc.writeln(iframeHtml),doc.close()}}}); |
{ | ||
"name": "angular-gist", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/scottcorgan/angular-gist", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "angular-gist", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "AngularJS directive for embedding Github gists", | ||
@@ -5,0 +5,0 @@ "main": "Gruntfile.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3829