From bf43e827043895217a0aece920118f799f7eb6b3 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Sat, 22 Feb 2014 15:03:34 +0100 Subject: [PATCH] assign $script to 'window', not to 'this'! --- src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index e6429c0..474c88d 100644 --- a/src/script.js +++ b/src/script.js @@ -1,7 +1,7 @@ (function (name, definition) { if (typeof module != 'undefined' && module.exports) module.exports = definition() else if (typeof define == 'function' && define.amd) define(definition) - else this[name] = definition() + else window[name] = definition() })('$script', function () { var doc = document , head = doc.getElementsByTagName('head')[0]