soiz1 commited on
Commit
0087982
·
verified ·
1 Parent(s): 82b4989

Update dev-tools.js

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