genia.likes.science@gmail.com | c5f82a2 | 2013-05-08 02:44:35 -0700 | [diff] [blame] | 1 | <!doctype html>
|
| 2 | <html>
|
| 3 | <head>
|
| 4 | <title></title>
|
| 5 | <meta http-equiv="CACHE-CONTROL" content="PUBLIC"/>
|
| 6 | <meta http-equiv="EXPIRES" content="Sat, 01 Jan 2050 00:00:00 GMT"/>
|
| 7 | </head>
|
| 8 | <body>
|
| 9 | <script type="text/javascript">
|
| 10 |
|
| 11 | function sendMessage(message, url){
|
| 12 | window.setTimeout(function(){
|
| 13 | window.name = message;
|
| 14 | location.href = url + "," + encodeURIComponent(location.protocol + "//" + location.host + location.pathname);
|
| 15 | }, 0);
|
| 16 | }
|
| 17 |
|
| 18 | if (location.hash) {
|
| 19 | if (location.hash.substring(1, 2) === "_") {
|
| 20 | var channel, url, hash = location.href.substring(location.href.indexOf("#") + 3), indexOf = hash.indexOf(",");
|
| 21 | if (indexOf == -1) {
|
| 22 | channel = hash;
|
| 23 | }
|
| 24 | else {
|
| 25 | channel = hash.substring(0, indexOf);
|
| 26 | url = decodeURIComponent(hash.substring(indexOf + 1));
|
| 27 | }
|
| 28 | switch (location.hash.substring(2, 3)) {
|
| 29 | case "2":
|
| 30 | // NameTransport local
|
| 31 | window.parent.parent.easyXDM.Fn.get(channel)(window.name);
|
| 32 | location.href = url + "#_4" + channel + ",";
|
| 33 | break;
|
| 34 | case "3":
|
| 35 | // NameTransport remote
|
| 36 | var guest = window.parent.frames["easyXDM_" + channel + "_provider"];
|
| 37 | if (!guest) {
|
| 38 | throw new Error("unable to reference window");
|
| 39 | }
|
| 40 | guest.easyXDM.Fn.get(channel)(window.name);
|
| 41 | location.href = url + "#_4" + channel + ",";
|
| 42 | break;
|
| 43 | case "4":
|
| 44 | // NameTransport idle
|
| 45 | var fn = window.parent.easyXDM.Fn.get(channel + "_load");
|
| 46 | if (fn) {
|
| 47 | fn();
|
| 48 | }
|
| 49 | break;
|
| 50 | }
|
| 51 | }
|
| 52 | }
|
| 53 | </script>
|
| 54 | </body>
|
| 55 | </html>
|