diff --git a/js/tmpl.js b/js/tmpl.js index 9380053..9c694f6 100644 --- a/js/tmpl.js +++ b/js/tmpl.js @@ -15,7 +15,7 @@ /*jslint evil: true, regexp: true, unparam: true */ /*global document, define */ -(function ($) { +(function (w) { "use strict"; var tmpl = function (str, data) { var f = !/[^\w\-\.:]/.test(str) ? tmpl.cache[str] = tmpl.cache[str] || @@ -77,11 +77,7 @@ tmpl.arg = "o"; tmpl.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);}" + ",include=function(s,d){_s+=tmpl(s,d);}"; - if (typeof define === "function" && define.amd) { - define(function () { - return tmpl; - }); - } else { - $.tmpl = tmpl; - } -}(this)); + + w["tmpl"] = tmpl; + +})(window); \ No newline at end of file