| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Cast shell remote debugging</title> | 3 <title>Cast shell remote debugging</title> |
| 4 <style> | 4 <style> |
| 5 .local-ui-link { | |
| 6 background-color: #eee; | |
| 7 border: 1px solid #ccc; | |
| 8 color: #333; | |
| 9 display: block; | |
| 10 font-family: monospace; | |
| 11 font-size: 11px; | |
| 12 margin: 4px; | |
| 13 padding: 4px; | |
| 14 width: 100%; | |
| 15 } | |
| 16 | |
| 17 .help { | 5 .help { |
| 18 font-size: 11px; | 6 font-size: 11px; |
| 19 } | 7 } |
| 20 </style> | 8 </style> |
| 21 </head> | 9 </head> |
| 22 <body> | 10 <body> |
| 23 | 11 |
| 24 <div id='caption'>Inspectable WebContents</div> | 12 <div id='caption'>Inspectable WebContents</div> |
| 25 <div id='items'></div> | 13 <div id='items'></div> |
| 26 | 14 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 43 var item_container = document.createElement('div'); | 31 var item_container = document.createElement('div'); |
| 44 var frontend_header = document.createElement('h3'); | 32 var frontend_header = document.createElement('h3'); |
| 45 frontend_header.textContent = metadata.title || "(untitled tab)"; | 33 frontend_header.textContent = metadata.title || "(untitled tab)"; |
| 46 item_container.appendChild(frontend_header); | 34 item_container.appendChild(frontend_header); |
| 47 | 35 |
| 48 if (metadata.devtoolsFrontendUrl) { | 36 if (metadata.devtoolsFrontendUrl) { |
| 49 var frontend_link = document.createElement('a'); | 37 var frontend_link = document.createElement('a'); |
| 50 frontend_link.textContent = 'Remote Debugging (AppEngine)' | 38 frontend_link.textContent = 'Remote Debugging (AppEngine)' |
| 51 frontend_link.href = metadata.devtoolsFrontendUrl; | 39 frontend_link.href = metadata.devtoolsFrontendUrl; |
| 52 item_container.appendChild(frontend_link); | 40 item_container.appendChild(frontend_link); |
| 53 | |
| 54 var devtools_protocol_link = document.createElement('textarea'); | |
| 55 devtools_protocol_link.className = 'local-ui-link'; | |
| 56 devtools_protocol_link.value = metadata.devtoolsFrontendUrl.replace( | |
| 57 "https://chrome-devtools-frontend.appspot.com", | |
| 58 "chrome-devtools://devtools/remote"); | |
| 59 // Highlight text when clicked. | |
| 60 devtools_protocol_link.onclick = function() { this.select(); } | |
| 61 item_container.appendChild(devtools_protocol_link); | |
| 62 } else { | 41 } else { |
| 63 frontend_header.textContent += " (already has active debugging session)"; | 42 frontend_header.textContent += " (already has active debugging session)"; |
| 64 } | 43 } |
| 65 | 44 |
| 66 document.getElementById("items").appendChild(item_container); | 45 document.getElementById("items").appendChild(item_container); |
| 67 } | 46 } |
| 68 </script> | 47 </script> |
| 69 | 48 |
| 70 <h3>Help</h3> | 49 <h3>Help</h3> |
| 71 <div id="help"> | 50 <div id="help"> |
| 72 Note: there are two debugging options presented for each page above. Either | 51 You may have to select the shield icon in the address bar to establish a conne
ction. |
| 73 is a valid way to initiate a remote debugging session. | 52 See the <a href="https://support.google.com/chrome/answer/1342714?hl=en">help |
| 74 <ul> | 53 center</a> for more information. |
| 75 <li>For the first option (link), you may have to select the shield icon in | |
| 76 the address bar to establish a connection. See the <a | |
| 77 href="https://support.google.com/chrome/answer/1342714?hl=en">help | |
| 78 center</a> for more information.</li> | |
| 79 <li>For the second option (textarea), simply copy/paste the URL into | |
| 80 Chrome's URL bar.</li> | |
| 81 </ul> | |
| 82 </div> | 54 </div> |
| 83 | 55 |
| 84 </body> | 56 </body> |
| 85 </html> | 57 </html> |
| OLD | NEW |