-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathditm-panel.html
153 lines (151 loc) · 6.71 KB
/
ditm-panel.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
<!DOCTYPE html>
<html class="theme-light">
<head>
<meta charset="utf-8">
<script src="ditm-panel-theme.js"></script>
<link href="devtools-common.css" rel="stylesheet" type="text/css">
<link href="devtools-splitters.css" rel="stylesheet" type="text/css">
<link href="devtools-theme.css" rel="stylesheet" type="text/css">
<link href="devtools-toolbars.css" rel="stylesheet" type="text/css">
<link href="devtools-tooltips.css" rel="stylesheet" type="text/css">
<link href="devtools-variables.css" rel="stylesheet" type="text/css">
<link href="debugger-App.css" rel="stylesheet" type="text/css">
<link href="debugger-Tabs.css" rel="stylesheet" type="text/css">
<link href="debugger-variables.css" rel="stylesheet" type="text/css">
<link href="ditm-panel.css" rel="stylesheet" type="text/css">
</head>
<body class="theme-body">
<div class="selector-box">
<label id="stored-urls-label" for="stored-urls">Saved</label>
<div id="stored-urls-box">
<select id="stored-urls"></select>
</div>
<button id="remove" class="devtools-button" title="Remove"></button>
</div>
<div class="source-header">
<div id="source-tabs" class="source-tabs">
<div id="source-tabs-text-tab" class="source-tab" title="Replace with text">
<div class="filename">Text</div>
</div>
<div id="source-tabs-url-tab" class="source-tab" title="Replace with content from another URL">
<div class="filename">URL</div>
</div>
<div id="source-tabs-replicate-tab" class="source-tab" title="Replicate all">
<div class="filename">Replicate</div>
</div>
<div id="source-tabs-log-tab" class="source-tab" title="Log">
<div class="filename">Log</div>
</div>
</div>
</div>
<div id="used-selector-box" class="selector-box">
<label id="used-urls-label" for="stored-urls">Used</label>
<div id="used-urls-box">
<select id="used-urls"></select>
</div>
<button id="refresh" class="devtools-button" title="Refresh list"></button>
<label id="url-label" for="url">URL</label>
<div id="url-box">
<input id="url" class="devtools-textinput" type="text" placeholder="http://">
<select id="url-match">
<option value="exact" selected>Exact match</option>
<option value="forward">Forward match</option>
<option value="wildcard">Use wildcard</option>
</select>
</div>
</div>
<div id="source-text-box">
<div class="devtools-toolbar">
<button id="save-text" class="devtools-button" title="Save"></button>
<button id="load-text" class="devtools-button" title="Reload from URL"></button>
<button id="pretty" class="devtools-button" title="Pretty print JS source"></button>
<div id="status-text"></div>
</div>
<textarea id="source-text" class="devtools-textinput"></textarea>
</div>
<div id="source-url-box" style="display: none">
<div class="devtools-toolbar">
<button id="save-url" class="devtools-button" title="Save"></button>
<div id="status-url"></div>
</div>
<p>
Replace the response body with the content from the following URL
</p>
<div id="source-url-box-inner">
<label for="source-url">URL</label>
<input id="source-url" class="devtools-textinput" type="text" placeholder="http://" list="source-url-history" autocomplete="off">
<div id="source-url-more-box">
<button id="source-url-more" class="devtools-button" title="More"></button>
<div class="tooltip-xul-wrapper">
<div id="source-url-menu-container" class="tooltip-container tooltip-bottom" type="doorhanger">
<div class="tooltip-panel">
<div class="menu-standard-padding" role="menu">
<li class="menuitem" role="presentation">
<button id="source-url-clear-history" class="command" role="menuitem"><span class="label">Clear history</span></button>
</li>
</div>
</div>
<div class="tooltip-arrow"></div>
</div>
</div>
</div>
</div>
<datalist id="source-url-history"></datalist>
<p>
To use local file, run HTTP server with the following command, and use <code>http://localhost:8000/{FILENAME}</code>.
</p>
<pre>
$ cd {DIRECTORY_THAT_CONTAINS_THE_FILE}
$ python3 -m http.server 8000</pre>
</div>
<div id="source-replicate-box" style="display: none">
<div class="replicate-main-box">
<p>
Download all used files, and map those URLs to the local server
</p>
<ol>
<li>
<button id="source-replicate-download" class="devtools-button" data-standalone="true">Download script and start mapping URLs</button>
<progress id="source-replicate-progress" style="display: none" max="100" value="0">0%</progress>
<span id="status-replicate"></span>
</li>
<li>
<button id="source-replicate-start" class="devtools-button" data-standalone="true" disabled>Start mapping URLs</button>
<button id="source-replicate-stop" class="devtools-button" data-standalone="true" disabled>Stop mapping URLs</button>
</li>
</ol>
<p>
After downloading <code>ditm-replicate.py</code>, run the following to extract the files and run the local server.
All used URLs are mapped to http://localhost:{PORT}/{FILENAME}
</p>
<pre id="source-replicate-command-server">
$ python3 ditm-replicate.py</pre>
<pre id="source-replicate-command-no-server" style="display: none">
$ python3 ditm-replicate.py && cd ditm-replica && python3 -m http.server {PORT}</pre>
</div>
<fieldset class="replicate-config-box">
<legend>Configuration</legend>
<label for="source-replicate-server">
<input type="checkbox" id="source-replicate-server" checked>
Run server automatically in <code>ditm-replicate.py</code>
</label>
<label for="source-replicate-server">
<input type="checkbox" id="auto-prettify-js">
Prettify JS files
</label>
<label for="source-replicate-port">
Port number
<input id="source-replicate-port" class="devtools-textinput" type="text" value="8000" size="6">
</label>
</fieldset>
</div>
<div id="source-log-box" style="display: none">
<div class="devtools-toolbar">
<button id="log-clear" class="devtools-button" title="Clear log"></button>
</div>
<div id="log-box">
</div>
</div>
<script src="ditm-panel.js"></script>
</body>
</html>