Update dev-tools.js
Browse files- dev-tools.js +191 -170
dev-tools.js
CHANGED
@@ -2,227 +2,248 @@
|
|
2 |
// スタイルの動的追加
|
3 |
const style = document.createElement('style');
|
4 |
style.textContent = `
|
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 |
#console-log {
|
74 |
-
|
75 |
margin: 0;
|
76 |
line-height: 1.4;
|
77 |
flex: 1;
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
background: #252a33;
|
83 |
border: 1px solid #4fc3f7;
|
84 |
color: #e0e0e0;
|
85 |
padding: 8px;
|
86 |
margin-top: 10px;
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
.elements-container {
|
91 |
-
|
92 |
flex: 1;
|
93 |
overflow: hidden;
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
flex: 1;
|
99 |
overflow: auto;
|
100 |
border-right: 1px solid #4fc3f7;
|
101 |
padding-right: 10px;
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
position: relative;
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
overflow: auto;
|
124 |
padding-left: 10px;
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
border: 1px solid #4fc3f7;
|
130 |
padding: 8px;
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
margin-bottom: 5px;
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
margin-bottom: 3px;
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
min-width: 120px;
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
flex: 1;
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
color: #ff7043;
|
156 |
cursor: pointer;
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
.context-menu {
|
161 |
-
|
162 |
background: #252a33;
|
163 |
border: 1px solid #4fc3f7;
|
164 |
z-index: 10000;
|
165 |
min-width: 200px;
|
166 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
167 |
display: none;
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
cursor: pointer;
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
color: #000;
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
.storage-table {
|
182 |
-
|
183 |
border-collapse: collapse;
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
padding: 5px;
|
189 |
text-align: left;
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
gap: 5px;
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
border: none;
|
204 |
padding: 2px 5px;
|
205 |
cursor: pointer;
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
padding: 2px 5px;
|
211 |
border: 1px dashed transparent;
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
color: #000;
|
221 |
border: none;
|
222 |
padding: 5px 10px;
|
223 |
margin-top: 10px;
|
224 |
cursor: pointer;
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
`;
|
227 |
document.head.appendChild(style);
|
228 |
|
|
|
2 |
// スタイルの動的追加
|
3 |
const style = document.createElement('style');
|
4 |
style.textContent = `
|
5 |
+
.devtools-container {
|
6 |
+
position: fixed;
|
7 |
+
bottom: 0;
|
8 |
+
left: 0;
|
9 |
+
width: 100%;
|
10 |
+
height: 300px; /* 適切な高さに調整 */
|
11 |
+
background-color: #fff;
|
12 |
+
border-top: 1px solid #ccc;
|
13 |
+
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
14 |
+
z-index: 9999;
|
15 |
+
display: flex;
|
16 |
+
flex-direction: column;
|
17 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
18 |
+
}
|
19 |
+
|
20 |
+
.devtools-header {
|
21 |
+
display: flex;
|
22 |
+
justify-content: space-between;
|
23 |
+
align-items: center;
|
24 |
+
padding: 5px 10px;
|
25 |
+
background-color: #f5f5f5;
|
26 |
+
border-bottom: 1px solid #ddd;
|
27 |
+
}
|
28 |
+
|
29 |
+
.devtools-tabs {
|
30 |
+
display: flex;
|
31 |
+
gap: 10px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.devtools-tab {
|
35 |
+
padding: 5px 10px;
|
36 |
+
cursor: pointer;
|
37 |
+
border-radius: 3px 3px 0 0;
|
38 |
+
background-color: #e0e0e0;
|
39 |
+
border: 1px solid #ccc;
|
40 |
+
border-bottom: none;
|
41 |
+
font-size: 12px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.devtools-tab.active {
|
45 |
+
background-color: #fff;
|
46 |
+
border-bottom: 1px solid #fff;
|
47 |
+
margin-bottom: -1px;
|
48 |
+
font-weight: bold;
|
49 |
+
}
|
50 |
+
|
51 |
+
.devtools-close {
|
52 |
+
background: none;
|
53 |
+
border: none;
|
54 |
+
font-size: 16px;
|
55 |
+
cursor: pointer;
|
56 |
+
padding: 0 5px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.devtools-content {
|
60 |
+
flex: 1;
|
61 |
+
overflow: auto;
|
62 |
+
position: relative;
|
63 |
+
}
|
64 |
+
|
65 |
+
.devtools-panel {
|
66 |
+
position: absolute;
|
67 |
+
top: 0;
|
68 |
+
left: 0;
|
69 |
+
width: 100%;
|
70 |
+
height: 100%;
|
71 |
+
padding: 10px;
|
72 |
+
overflow: auto;
|
73 |
+
display: none;
|
74 |
+
}
|
75 |
+
|
76 |
+
.devtools-panel.active {
|
77 |
+
display: block;
|
78 |
+
}
|
79 |
+
|
80 |
+
/* Console スタイル */
|
81 |
#console-log {
|
82 |
+
white-space: pre-wrap;
|
83 |
margin: 0;
|
84 |
line-height: 1.4;
|
85 |
flex: 1;
|
86 |
+
}
|
87 |
+
|
88 |
+
.console-input {
|
89 |
+
width: 100%;
|
90 |
background: #252a33;
|
91 |
border: 1px solid #4fc3f7;
|
92 |
color: #e0e0e0;
|
93 |
padding: 8px;
|
94 |
margin-top: 10px;
|
95 |
+
}
|
96 |
+
|
97 |
+
/* Elements スタイル */
|
98 |
.elements-container {
|
99 |
+
display: flex;
|
100 |
flex: 1;
|
101 |
overflow: hidden;
|
102 |
+
}
|
103 |
+
|
104 |
+
.dom-tree {
|
105 |
+
font-family: monospace;
|
106 |
flex: 1;
|
107 |
overflow: auto;
|
108 |
border-right: 1px solid #4fc3f7;
|
109 |
padding-right: 10px;
|
110 |
+
}
|
111 |
+
|
112 |
+
.dom-node {
|
113 |
+
margin-left: 15px;
|
114 |
position: relative;
|
115 |
+
}
|
116 |
+
|
117 |
+
.dom-node.selected {
|
118 |
+
background: rgba(79, 195, 247, 0.2);
|
119 |
+
}
|
120 |
+
|
121 |
+
.dom-tag {
|
122 |
+
color: #4fc3f7;
|
123 |
+
}
|
124 |
+
|
125 |
+
.dom-attr {
|
126 |
+
color: #ff7043;
|
127 |
+
}
|
128 |
+
|
129 |
+
.css-panel {
|
130 |
+
flex: 1;
|
131 |
overflow: auto;
|
132 |
padding-left: 10px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.css-rule {
|
136 |
+
margin-bottom: 15px;
|
137 |
border: 1px solid #4fc3f7;
|
138 |
padding: 8px;
|
139 |
+
}
|
140 |
+
|
141 |
+
.css-selector {
|
142 |
+
color: #4fc3f7;
|
143 |
margin-bottom: 5px;
|
144 |
+
}
|
145 |
+
|
146 |
+
.css-property {
|
147 |
+
display: flex;
|
148 |
margin-bottom: 3px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.css-property-name {
|
152 |
+
color: #69f0ae;
|
153 |
min-width: 120px;
|
154 |
+
}
|
155 |
+
|
156 |
+
.css-property-value {
|
157 |
+
color: #e0e0e0;
|
158 |
flex: 1;
|
159 |
+
}
|
160 |
+
|
161 |
+
.css-toggle {
|
162 |
+
margin-left: 10px;
|
163 |
color: #ff7043;
|
164 |
cursor: pointer;
|
165 |
+
}
|
166 |
+
|
167 |
+
/* Context Menu */
|
168 |
.context-menu {
|
169 |
+
position: absolute;
|
170 |
background: #252a33;
|
171 |
border: 1px solid #4fc3f7;
|
172 |
z-index: 10000;
|
173 |
min-width: 200px;
|
174 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
175 |
display: none;
|
176 |
+
}
|
177 |
+
|
178 |
+
.context-menu-item {
|
179 |
+
padding: 8px 15px;
|
180 |
cursor: pointer;
|
181 |
+
}
|
182 |
+
|
183 |
+
.context-menu-item:hover {
|
184 |
+
background: #4fc3f7;
|
185 |
color: #000;
|
186 |
+
}
|
187 |
+
|
188 |
+
/* Storage スタイル */
|
189 |
.storage-table {
|
190 |
+
width: 100%;
|
191 |
border-collapse: collapse;
|
192 |
+
}
|
193 |
+
|
194 |
+
.storage-table th, .storage-table td {
|
195 |
+
border: 1px solid #4fc3f7;
|
196 |
padding: 5px;
|
197 |
text-align: left;
|
198 |
+
}
|
199 |
+
|
200 |
+
.storage-table th {
|
201 |
+
background: #252a33;
|
202 |
+
}
|
203 |
+
|
204 |
+
.storage-actions {
|
205 |
+
display: flex;
|
206 |
gap: 5px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.storage-btn {
|
210 |
+
background: #4fc3f7;
|
211 |
border: none;
|
212 |
padding: 2px 5px;
|
213 |
cursor: pointer;
|
214 |
+
}
|
215 |
+
|
216 |
+
.editable {
|
217 |
+
cursor: pointer;
|
218 |
padding: 2px 5px;
|
219 |
border: 1px dashed transparent;
|
220 |
+
}
|
221 |
+
|
222 |
+
.editable:hover {
|
223 |
+
border-color: #4fc3f7;
|
224 |
+
}
|
225 |
+
|
226 |
+
.add-btn {
|
227 |
+
background: #69f0ae;
|
228 |
color: #000;
|
229 |
border: none;
|
230 |
padding: 5px 10px;
|
231 |
margin-top: 10px;
|
232 |
cursor: pointer;
|
233 |
+
}
|
234 |
+
|
235 |
+
/* 各パネルの基本スタイル */
|
236 |
+
#console-panel {
|
237 |
+
background-color: #fff;
|
238 |
+
}
|
239 |
+
|
240 |
+
#elements-panel {
|
241 |
+
background-color: #fff;
|
242 |
+
}
|
243 |
+
|
244 |
+
#storage-panel {
|
245 |
+
background-color: #fff;
|
246 |
+
}
|
247 |
`;
|
248 |
document.head.appendChild(style);
|
249 |
|