From: ScottDowne Date: Mon, 7 Mar 2011 14:54:25 +0000 (-0500) Subject: [#340] mustache plugin using getScript X-Git-Tag: v0.4~20^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9004ef0bf86e453105598b462769d2d3837ac383;p=popcorn-js.git [#340] mustache plugin using getScript --- diff --git a/plugins/mustache/popcorn.mustache.js b/plugins/mustache/popcorn.mustache.js index 5cca26f..f393445 100644 --- a/plugins/mustache/popcorn.mustache.js +++ b/plugins/mustache/popcorn.mustache.js @@ -2,17 +2,7 @@ (function (Popcorn) { - // TODO: swap to getScript() - (function() { - var mustacheUrl = 'https://github.com/janl/mustache.js/raw/master/mustache.js'; - - var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); - - script.type = 'text/javascript'; - script.src = mustacheUrl; - head.insertBefore( script, head.firstChild ); - })(); + Popcorn.getScript('https://github.com/janl/mustache.js/raw/master/mustache.js'); /** * Mustache Popcorn Plug-in