(html)
| 103 | } |
| 104 | |
| 105 | export function getMeteorRuntimeConfigFromHTML(html) { |
| 106 | var m = html.match(/__meteor_runtime_config__ = JSON.parse\(decodeURIComponent\("([^"]+?)"\)\)/); |
| 107 | if (! m) { |
| 108 | fail("Can't find __meteor_runtime_config__"); |
| 109 | } |
| 110 | return JSON.parse(decodeURIComponent(m[1])); |
| 111 | } |
| 112 | |
| 113 | // Poll the given app looking for the correct settings. Throws an error |
| 114 | // if the settings aren't found after a timeout. |