-
Notifications
You must be signed in to change notification settings - Fork 52
/
debug.html
197 lines (175 loc) · 7.12 KB
/
debug.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html>
<!--
Thanks for viewing source!
_________________
/\ _____________ \
/ \ \___________/\ \
/ /\ \ \ / /\ \ \ w
/ / /\ \ \_____/ / /\ \ \ a
/ /_/__\ \ \____\/_/ \ \ \ t
\ \ \___\ \ \___/\ \ \ \ \
\ \ \ \ \ \__\ \ \___\_\ \
\ \ \ \ \____\ \ \_______\
\ \ \ / / ____\ \ \____ /
\ \ \/ / / \ \ \/ / /
\ \/ / /_______\_\/ / /
\ / /___________\/ /
\/________________/
meemoo.org
-->
<!-- <html manifest="iframework.appcache"> -->
<head>
<meta charset="utf-8" />
<title>meemoo: use, build, share, and hack creative apps in the browser</title>
<script type="text/javascript">
(function(){
"use strict";
window._meemooInitialize = function(compatible) {
if (!document.getElementById("iframework-info")) {
// Wait for DOM
window.setTimeout(function(){
_meemooInitialize(compatible);
}, 100);
return false;
}
if (window.Iframework){
// Already initialized
return false;
}
if (!compatible) {
document.getElementById("iframework-info").innerHTML = "» You need a modern browser to run this. ";
document.getElementById("iframework-info").innerHTML += '<a href="#" onclick="_meemooInitialize(true);return false;">Try anyway?</a>';
return false;
} else {
document.getElementById("iframework-info").innerHTML = "";
}
// yepnope([
// {
// // Try the CDN stuff first
// load: (debug ? debugLibs : buildLibs),
// complete: function(){
// if (!window.jQuery) {
// // CDN offline?
// yepnope("libs/jquery.js");
// yepnope("libs/jquery-ui/jquery-ui.js");
// yepnope("libs/jquery-ui/jquery-ui.css");
// }
// document.getElementById("iframework-info").innerHTML = "» 2/2: Loading Meemoo...";
// }
// },
// {
// // Load all of the src/ files, or just the minified one
// load: (debug ? debugFiles : buildFiles),
// complete: function(){
// // All loaded
// if (window.Iframework) {
// document.getElementById("iframework-info").innerHTML = "» Loaded!";
// window.setTimeout(function(){
// document.getElementById("iframework-info").innerHTML = "";
// }, 1500);
// } else {
// document.getElementById("iframework-info").innerHTML = "";
// // document.getElementById("iframework-info").innerHTML = "» Something didn't work (;_;)";
// }
// }
// }
// ]);
}
// This tests to see if the browser can do data clone for postMessage
// We'll assume that if it can do that it can handle the rest
// Adapted from http://thecssninja.com/demo/sclones/
if(!!window.postMessage) {
try {
// Safari 5.1 will sometimes throw an exception and sometimes won't, lolwut?
// When it doesn't we capture the message event and check the
// internal [[Class]] property of the message being passed through.
// Safari will pass through DOM nodes as Null
// iOS Safari on the other hand passes it through as DOMWindow
window.onmessage = function(e){
var type = Object.prototype.toString.call(e.data);
var safariCompatible = (type.indexOf("Null") != -1 || type.indexOf("DOMWindow") != -1) ? true : false;
if (!window.Iframework) {
_meemooInitialize(safariCompatible);
}
// Only keep the onmessage function for the one test
window.onmessage = null;
};
// Spec states you can't transmit DOM nodes and it will throw an error
// postMessage implimentations that support cloned data will throw.
window.postMessage(document.createElement("a"),"*");
} catch(e) {
// BBOS6 throws but doesn't pass through the correct exception
// so check error message
var validCompatible = (e.DATA_CLONE_ERR || e.message == "Cannot post cyclic structures.") ? true : false;
_meemooInitialize(validCompatible);
}
} else {
_meemooInitialize(false);
}
})();
</script>
</head>
<body>
<footer style="font-size: 10px; font-family: Monaco, monospace;">
<span id="debug-info">DEBUG » </span>
<a href="http://meemoo.org/" target="_blank">meemoo</a> »
<a href="https://github.com/meemoo/iframework" target="_blank">source</a>
<span id="iframework-info"></span>
<noscript>» use, build, share, and hack creative apps in the browser.</noscript>
</footer>
<!-- Libs -->
<script src="libs/yepnope.min.js"></script>
<script src="libs/jquery.js"></script>
<script src="libs/jquery-ui/jquery-ui.js"></script>
<!-- Packaged libs -->
<script src="libs/underscore.js"></script>
<script src="libs/backbone.js"></script>
<script src="libs/backbone.localStorage.js"></script>
<script src="libs/mousetrap.js"></script>
<script src="libs/spectrum/spectrum.js"></script>
<script src="libs/jquery.ui.touch-punch.js"></script>
<script src="libs/js-expression-eval/parser.js"></script>
<!-- Iframework -->
<script src="src/iframework.js"></script>
<script src="src/iframework-utils.js"></script>
<script src="src/eventshistory.js"></script>
<script src="src/local-app.js"></script>
<script src="src/local-app-view.js"></script>
<script src="src/graph.js"></script>
<script src="src/graph-view.js"></script>
<script src="src/node.js"></script>
<script src="src/node-view.js"></script>
<script src="src/node-box.js"></script>
<script src="src/node-box-view.js"></script>
<script src="src/node-box-native-view.js"></script>
<script src="src/node-box-iframe.js"></script>
<script src="src/node-box-iframe-view.js"></script>
<script src="src/port.js"></script>
<script src="src/port-view.js"></script>
<script src="src/port-in.js"></script>
<script src="src/port-in-view.js"></script>
<script src="src/port-out.js"></script>
<script src="src/port-out-view.js"></script>
<script src="src/module.js"></script>
<script src="src/module-view.js"></script>
<script src="src/edge.js"></script>
<script src="src/edge-view.js"></script>
<script src="src/router.js"></script>
<script src="src/nodes/image.js"></script>
<!-- Plugins -->
<script src="src/plugins/source.js"></script>
<script src="src/plugins/library.js"></script>
<script src="src/plugins/images.js"></script>
<!-- Last -->
<script src="src/iframework-last.js"></script>
<!-- Examples -->
<script src="src/examples/module-library.js"></script>
<script src="src/examples/apps.js"></script>
<!-- Style -->
<link href="libs/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css"></link>
<link href='//fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'>
<link href="libs/spectrum/spectrum.css" rel="stylesheet" type="text/css"></link>
<link href="iframework.css" rel="stylesheet" type="text/css"></link>
</body>
</html>