From fd513b7f8e4330259bbd0ad325fcf4c593cd7c47 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 20 Oct 2011 13:34:23 -0400 Subject: [PATCH] Remove sniff for Opera 9.64 --- jquery.ba-postmessage.js | 3 +-- jquery.ba-postmessage.min.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jquery.ba-postmessage.js b/jquery.ba-postmessage.js index 5c0fbfe..63081a7 100644 --- a/jquery.ba-postmessage.js +++ b/jquery.ba-postmessage.js @@ -63,8 +63,7 @@ p_receiveMessage, - // I couldn't get window.postMessage to actually work in Opera 9.64! - has_postMessage = window[postMessage] && !$.browser.opera; + has_postMessage = window[postMessage]; // Method: jQuery.postMessage // diff --git a/jquery.ba-postmessage.min.js b/jquery.ba-postmessage.min.js index 5fe80a2..a6d379e 100644 --- a/jquery.ba-postmessage.min.js +++ b/jquery.ba-postmessage.min.js @@ -6,4 +6,4 @@ * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ -(function($){var g,d,j=1,a,b=this,f=!1,h="postMessage",e="addEventListener",c,i=b[h]&&!$.browser.opera;$[h]=function(k,l,m){if(!l){return}k=typeof k==="string"?k:$.param(k);m=m||parent;if(i){m[h](k,l.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(l){m.location=l.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=c=function(l,m,k){if(i){if(l){a&&c();a=function(n){if((typeof m==="string"&&n.origin!==m)||($.isFunction(m)&&m(n.origin)===f)){return f}l(n)}}if(b[e]){b[l?e:"removeEventListener"]("message",a,f)}else{b[l?"attachEvent":"detachEvent"]("onmessage",a)}}else{g&&clearInterval(g);g=null;if(l){k=typeof m==="number"?m:typeof k==="number"?k:100;g=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;l({data:o.replace(n,"")})}},k)}}}})(jQuery); \ No newline at end of file +(function($){var g,d,j=1,a,b=this,f=!1,h="postMessage",e="addEventListener",c,i=b[h];$[h]=function(k,l,m){if(!l){return}k=typeof k==="string"?k:$.param(k);m=m||parent;if(i){m[h](k,l.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(l){m.location=l.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=c=function(l,m,k){if(i){if(l){a&&c();a=function(n){if((typeof m==="string"&&n.origin!==m)||($.isFunction(m)&&m(n.origin)===f)){return f}l(n)}}if(b[e]){b[l?e:"removeEventListener"]("message",a,f)}else{b[l?"attachEvent":"detachEvent"]("onmessage",a)}}else{g&&clearInterval(g);g=null;if(l){k=typeof m==="number"?m:typeof k==="number"?k:100;g=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;l({data:o.replace(n,"")})}},k)}}}})(jQuery); \ No newline at end of file