diff --git a/jquery.stayInWebApp.js b/jquery.stayInWebApp.js index a7c52d5..d94a4c6 100644 --- a/jquery.stayInWebApp.js +++ b/jquery.stayInWebApp.js @@ -5,7 +5,7 @@ ;(function($) { //extend the jQuery object, adding $.stayInWebApp() as a function - $.extend({ + $.extend($, { stayInWebApp: function(selector) { //detect iOS full screen mode if(("standalone" in window.navigator) && window.navigator.standalone) { @@ -39,4 +39,4 @@ } } //end stayInWebApp func }); -})( jQuery ); \ No newline at end of file +})( window.jQuery || window.Zepto ); \ No newline at end of file diff --git a/jquery.stayInWebApp.min.js b/jquery.stayInWebApp.min.js index 8da9f25..aaea090 100644 --- a/jquery.stayInWebApp.min.js +++ b/jquery.stayInWebApp.min.js @@ -2,4 +2,4 @@ * jQuery stayInWebApp Plugin * version: 0.4 (2012-06-19) */ -(function($){$.extend({stayInWebApp:function(b){"standalone"in window.navigator&&window.navigator.standalone&&(b||(b="a"),$("body").delegate(b,"click",function(b){if($(this).attr("target")==void 0||$(this).attr("target")==""||$(this).attr("target")=="_self"){var c=$(this).attr("href");if(!c.match(/^http(s?)/g))b.preventDefault(),self.location=c}}))}})})(jQuery); \ No newline at end of file + (function(a){a.extend(a,{stayInWebApp:function(b){"standalone"in window.navigator&&window.navigator.standalone&&(b||(b="a"),a("body").delegate(b,"click",function(b){if(a(this).attr("target")==undefined||a(this).attr("target")==""||a(this).attr("target")=="_self"){var c=a(this).attr("href");c.match(/^http(s?)/g)||(b.preventDefault(),self.location=c)}}))}})})(window.jQuery||window.Zepto); \ No newline at end of file