angular-gist
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -18,3 +18,10 @@ angular.module('gist', []); | ||
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>'; | ||
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">' + | ||
'!function(){"use strict";window.retargetLinks=function(){ var gists=' + | ||
'document.getElementsByClassName("gist");for(var i=0,links;i<gists.length;i++){' + | ||
'links=gists[i].getElementsByTagName("a");for(var j=0;j<links.length;j++){ ' + | ||
'links[j].setAttribute("target","_blank");}}}}();</script><script type="text/javascript" ' + | ||
'src="https://gist.github.com/' + gistId + '.js" onload="retargetLinks()"></script></body></html>'; | ||
@@ -30,2 +37,2 @@ var doc = iframe.document; | ||
}; | ||
}); | ||
}); |
@@ -1,1 +0,1 @@ | ||
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()}}}); | ||
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">!function(){"use strict";window.retargetLinks=function(){ var gists=document.getElementsByClassName("gist");for(var i=0,links;i<gists.length;i++){links=gists[i].getElementsByTagName("a");for(var j=0;j<links.length;j++){ links[j].setAttribute("target","_blank");}}}}();</script><script type="text/javascript" src="https://gist.github.com/'+gistId+'.js" onload="retargetLinks()"></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.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/scottcorgan/angular-gist", | ||
"authors": [ | ||
"Scott Corgan <scottcorgan@gmail.com>" | ||
"Scott Corgan <scottcorgan@gmail.com>", | ||
"Darío Cravero <dario@contentkingdom.co>" | ||
], | ||
"description": "AngularJS directive for embedding Github gists", | ||
"main": "dist/angular-gist.min.js", | ||
"main": "angular-gist.min.js", | ||
"keywords": [ | ||
@@ -11,0 +12,0 @@ "angular", |
{ | ||
"name": "angular-gist", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"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
4636
75