forked from itteco/iframely
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.ejs
101 lines (95 loc) · 4.86 KB
/
debug.ejs
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
<!doctype html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<title>Iframely dev debug tool</title>
<link rel="stylesheet" href="<%= CONFIG.baseStaticUrl %>/css/bootstrap.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
<script type="text/javascript" src="<%= CONFIG.baseStaticUrl %>/js/debug.js"></script>
<script type="text/javascript" src="<%= CONFIG.baseStaticUrl %>/js/iframely.js"></script>
<script type="text/javascript">
var baseAppUrl = <%- JSON.stringify(CONFIG.baseAppUrl) %>;
var REL_GROUPS = <%- JSON.stringify(CONFIG.REL_GROUPS) %>;
var DEBUG = <%= JSON.stringify(DEBUG) %>;
</script>
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<p style="padding: 5px;">
Feel free to contact <a href="mailto:[email protected]">[email protected]</a> with questions or feedback
</p>
<% if (DEBUG) { %>
<p style="padding: 5px;">
Bookmarklet:
<a style="padding: 2px; border: solid grey 1px;" onclick="return false;" href="javascript: var win=window.open('<%- CONFIG.baseAppUrl %>/debug?uri='+encodeURIComponent(document.location.href),'_blank');win.focus();">debug in iframely</a>
<br>
You can drag&drop it to your bookmarks to test web pages quickly with iframely.
<p>
<!--
<p style="padding: 5px;">
<a href="/meta-mappings" target="_blank">Unified META mappings</a>
<p>
-->
<% } %>
</div>
<div class="span10">
<p>
<form>
<div class="input-append">
<input class="input-xxlarge s-uri" type="url" value="<%= uri || '' %>" placeholder="Enter URL here" name="uri">
<input class="btn" type="submit" value="Debug!" />
</div>
<% if (DEBUG) { %>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="mixAllWithDomainPlugin" <% if (mixAllWithDomainPlugin) { %>checked="checked"<% } %>> Debug with all plugins (disable specific mixins and mixin all available plugins) <a href="/debug?uri=<%= encodeURIComponent(uri) || '' %>&mixAllWithDomainPlugin=<%= !!!mixAllWithDomainPlugin %>" target="_blank">or open in new window with opposite value</a>
</label>
<label class="checkbox">
<input type="checkbox" name="refresh" <% if (disableCache) { %>checked="checked"<% } %>> Refresh</a>
</label>
</div>
</div>
<% } %>
<% if (DEBUG != CONFIG.DEBUG) { %>
<input type="hidden" name="debug" value="<%= DEBUG ? "true" : "false" %>">
<% } %>
</form>
</p>
<div class="well" style="display: none;">
API Call:
<a target="_blank" id="api-uri"></a>
</div>
<div class="s-loader loader" style="display: none;">Loading...</div>
<div class="alert" id="status" style="display: none;"></div>
<div class="s-result-div" style="display: none;">
<ul class="nav nav-tabs" id="myTab">
<li><a href="#1" data-toggle="tab" class="s-links">Links & Meta</a></li>
<li><a href="#4" data-toggle="tab" class="s-response-tab">JSON Response</a></li>
<li><a href="#2" data-toggle="tab" class="s-context-tab">Source Data</a></li>
<li><a href="#3" data-toggle="tab" class="s-all-debug">All debug data</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="1">
<div class="s-embeds"></div>
</div>
<div class="tab-pane" id="4">
<pre class="s-json"></pre>
</div>
<div class="tab-pane" id="2">
<div class="s-debug-context"></div>
</div>
<div class="tab-pane" id="3">
<pre class="s-debug-result"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>