From 22b020bf8569a33bab33f392a70952fe5318546c Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 18 Dec 2015 10:24:55 +0700 Subject: [PATCH 1/2] make it possible to be module in case of use browserify it fail with 'Cannot use 'in' operator to search for 'onhashchange' in undefined' because window is undefined. this patch fixes it. --- jquery.ba-hashchange.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.ba-hashchange.js b/jquery.ba-hashchange.js index 47105f4..0185127 100644 --- a/jquery.ba-hashchange.js +++ b/jquery.ba-hashchange.js @@ -387,4 +387,4 @@ return self; })(); -})(jQuery,this); +})(jQuery,(function(){return this})()); From d0a7f62ea84e4c9177a03a82a23e5f4b3ff5965a Mon Sep 17 00:00:00 2001 From: Aleksei Zbiniakov Date: Fri, 18 Dec 2015 11:14:25 +0700 Subject: [PATCH 2/2] compatibility with "use strict" --- jquery.ba-hashchange.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.ba-hashchange.js b/jquery.ba-hashchange.js index 0185127..6d7cb96 100644 --- a/jquery.ba-hashchange.js +++ b/jquery.ba-hashchange.js @@ -387,4 +387,4 @@ return self; })(); -})(jQuery,(function(){return this})()); +})(jQuery,Funtion('return this')());