Permalink
Browse files

added minified version

  • Loading branch information...
1 parent f7bb2f1 commit 624946a16bd5ce97c62c22e86b59f0fcd07ac8e4 @thomassturm committed May 25, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 ender-postmessage.min.js
@@ -0,0 +1,20 @@
+/*
+ * ender postMessage - v0.1 - 5/23/2011
+ * by Thomas Sturm http://www.sturm.to
+ * Dual licensed under the MIT and GPL licenses.
+ *
+ * based on
+ *
+ * jQuery postMessage - v0.5 - 9/11/2009
+ * http://benalman.com/projects/jquery-postmessage-plugin/
+ * Copyright (c) 2009 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */// Release History
+// ender postMessage
+// 0.1 - (5/23/2011) Initial Fork and Release
+//
+// jQuery postMessage
+// 0.5 - (9/11/2009) Improved cache-busting
+// 0.4 - (8/25/2009) Initial release
+!function(a){var b,c,d,e=1,f,g=this,h=!1,i="postMessage",j="addEventListener",k,l=g[i];a.ender({postMessage:function(a,b,c){!b||(c=c||parent,l?c[i](a,b.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):b&&(c.location=b.replace(/#.*$/,"")+"#"+ +(new Date)+e++ +"&"+a))},receiveMessage:function(a,e,i){l?(a&&(f&&receiveMessage(),f=function(b){if(typeof e=="string"&&b.origin!==e||typeof e=="function"&&e(b.origin)===h)return h;a(b)}),g[j]?g[a?j:"removeEventListener"]("message",f,h):g[a?"attachEvent":"detachEvent"]("onmessage",f)):(b&&clearInterval(b),b=null,a&&(i=typeof e=="number"?e:typeof i=="number"?i:100,d=document.location.hash,b=setInterval(function(){var b=document.location.hash,e=/^#?\d+&/;b!==c&&b!==d&&e.test(b)&&(c=b,d?document.location.hash=d:document.location.hash="",a({data:b.replace(e,"")}))},i)))}})}(ender)

0 comments on commit 624946a

Please sign in to comment.