|
13 | 13 | {height:100%;display:flex;flex-direction:column} |
14 | 14 | #hdr |
15 | 15 | {display:flex;align-items:center;margin:0;margin-bottom:5px} |
16 | | - |
17 | 16 | #spc |
18 | 17 | {flex:1} |
19 | 18 |
|
| 19 | + #isolate |
| 20 | + {margin-right:10px} |
| 21 | + #console-clear |
| 22 | + {margin-right:10px} |
| 23 | + #word-wrap |
| 24 | + {margin-right:20px;/*color:gray*/} |
| 25 | + |
| 26 | + |
| 27 | + |
20 | 28 | .ext-button |
21 | 29 | {border:1px solid lightgray;padding:2px 5px;cursor:pointer;display:flex;align-items:center;margin-right:10px} |
22 | 30 | .ext-button [type=checkbox] |
|
37 | 45 |
|
38 | 46 | <div id=root> |
39 | 47 | <div id=hdr> |
40 | | - <span id=spc></span> |
41 | | - <div id=console-persist class=ext-button>console.persist<input type=checkbox></div> |
42 | | - <div id=console-log class=ext-button>console.log<input type=checkbox checked></div> |
43 | | - <div id=word-wrap class=ext-button>wrap<input type=checkbox checked></div> |
44 | | - <button id=clear>clear</button> |
| 48 | + <span id=isolate class=radio> |
| 49 | + <input type=checkbox> |
| 50 | + isolate |
| 51 | + </span> |
| 52 | + |
| 53 | + <span id=allow-scripts class=radio> |
| 54 | + <input type=checkbox checked disabled> |
| 55 | + allow-scripts |
| 56 | + </span> |
| 57 | + <span id=allow-modals class=radio> |
| 58 | + <input type=checkbox checked> |
| 59 | + allow-modals |
| 60 | + </span> |
| 61 | + <span id=allow-popups class=radio style='margin-right:30px'> |
| 62 | + <input type=checkbox checked> |
| 63 | + allow-popups |
| 64 | + </span> |
| 65 | + |
| 66 | + <div style='flex:1'></div> |
| 67 | + |
| 68 | + <span id=console-show class=radio> |
| 69 | + <input type=checkbox checked> |
| 70 | + console |
| 71 | + </span> |
| 72 | + <span id=console-echo class=radio> |
| 73 | + <input type=checkbox checked> |
| 74 | + echo |
| 75 | + </span> |
| 76 | + <span id=console-persist class=radio> |
| 77 | + <input type=checkbox> |
| 78 | + persist |
| 79 | + </span> |
| 80 | + <span id=console-clear class=radio> |
| 81 | + clear |
| 82 | + </span> |
| 83 | + |
| 84 | + <span id=word-wrap class=ext-button> |
| 85 | + <input type=checkbox checked> |
| 86 | + wrap |
| 87 | + </div> |
| 88 | + |
45 | 89 | <button id=kill>kill</button> |
46 | 90 | </div> |
47 | 91 |
|
|
276 | 320 |
|
277 | 321 | async function onload(){ |
278 | 322 |
|
279 | | - var win = iframe.contentWindow; |
280 | | - |
281 | | - win.focus(); |
282 | | - win.console.log = log; |
283 | | - win.console.clear = clear; |
284 | | - win.console.error = error; |
285 | | - win.console.write = write; |
286 | | - win.console.groupCollapsed = groupCollapsed; |
287 | | - |
| 323 | + |
| 324 | + |
288 | 325 | if(!chk.persist){ |
289 | 326 | clear(); |
290 | 327 | } |
|
0 commit comments