Skip to content

Commit

Permalink
Expanded variable names for clarity. Eliminated parameters in closure.
Browse files Browse the repository at this point in the history
  • Loading branch information
keithws committed Jun 16, 2015
1 parent 41c3f33 commit 507c17a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/templates/script-tags.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script type='text/javascript' id="__bs_script__">//<![CDATA[
(function (d, s, h) {
(function () {
"use strict";
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.async = true;
j.src = String("%script%").replace("HOST", h);
f.parentNode.insertBefore(j, f);
}(document, "script", location.hostname));
var previousScriptTag = document.getElementsByTagName('script')[0],
newScriptTag = document.createElement('script');
newScriptTag.async = true;
newScriptTag.src = String("%script%").replace("HOST", location.hostname);
previousScriptTag.parentNode.insertBefore(newScriptTag, previousScriptTag);
}());
//]]></script>

0 comments on commit 507c17a

Please sign in to comment.