Commit 751a0503 authored by Robert Knight's avatar Robert Knight

Revert an unnecessary change to the config in the live reload server

The change from defining a `window.hypothesisConfig` function to using a
script config tag was left over from an earlier version of the package
content server work.
parent cd10d27a
......@@ -47,18 +47,15 @@ function LiveReloadServer(port, config) {
<pre style="margin: 20px 75px 75px 75px;">${changelogText()}</pre>
<script>
var appHost = document.location.hostname;
var config = {
liveReloadServer: 'ws://' + appHost + ':${port}',
// Open the sidebar when the page loads
openSidebar: true,
};
window.hypothesisConfig = function () {
return {
liveReloadServer: 'ws://' + appHost + ':${port}',
var configEl = document.createElement('script');
configEl.className = 'js-hypothesis-settings';
configEl.type = 'application/json';
configEl.textContent = JSON.stringify(config);
document.head.appendChild(configEl);
// Open the sidebar when the page loads
openSidebar: true,
};
};
window.addEventListener('message', function (event) {
if (event.data.type && event.data.type === 'reloadrequest') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment