diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-10-14 13:03:51 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-10-14 13:03:51 +0200 |
commit | 389abe953bf582e522acdf2c0e7b17b8fab3e18d (patch) | |
tree | 6b8f123d4da72d8d0906922a3b38928de802f8bc /pdf-as-web/src/main/webapp/assets/js/postman.js | |
parent | 7aadb86776f828f13ac16c18c2e16b17e62f5d9e (diff) | |
download | pdf-as-4-389abe953bf582e522acdf2c0e7b17b8fab3e18d.tar.gz pdf-as-4-389abe953bf582e522acdf2c0e7b17b8fab3e18d.tar.bz2 pdf-as-4-389abe953bf582e522acdf2c0e7b17b8fab3e18d.zip |
JS changes to work with mobile ApplicationSnapshot
Diffstat (limited to 'pdf-as-web/src/main/webapp/assets/js/postman.js')
-rw-r--r-- | pdf-as-web/src/main/webapp/assets/js/postman.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/webapp/assets/js/postman.js b/pdf-as-web/src/main/webapp/assets/js/postman.js new file mode 100644 index 00000000..e13c0ee7 --- /dev/null +++ b/pdf-as-web/src/main/webapp/assets/js/postman.js @@ -0,0 +1,15 @@ +// postMessage +// ---------------------------------------------------------------------- +/* + * nojquery-postmessage by Jeff Lee + * a non-jQuery fork of: + * + * 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/ + */ +function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this}; +//---------------------------------------------------------------------- |