(playground, hidden = true)
| 5 | |
| 6 | // Global variable, shared between modules |
| 7 | function playground_text(playground, hidden = true) { |
| 8 | let code_block = playground.querySelector("code"); |
| 9 | |
| 10 | if (window.ace && code_block.classList.contains("editable")) { |
| 11 | let editor = window.ace.edit(code_block); |
| 12 | return editor.getValue(); |
| 13 | } else if (hidden) { |
| 14 | return code_block.textContent; |
| 15 | } else { |
| 16 | return code_block.innerText; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | (function codeSnippets() { |
| 21 | function fetch_with_timeout(url, options, timeout = 6000) { |
no outgoing calls
no test coverage detected