aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/app.js')
-rw-r--r--web/src/js/app.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/src/js/app.js b/web/src/js/app.js
index 5b5d1fc8..f631b2c5 100644
--- a/web/src/js/app.js
+++ b/web/src/js/app.js
@@ -3,7 +3,6 @@ import {render} from 'react-dom'
import {createStore} from 'redux'
import {Provider} from 'react-redux'
-import $ from "jquery"
import Connection from "./connection"
import {App} from "./components/proxyapp.js"
import {EventLogActions} from "./actions.js"
@@ -11,8 +10,8 @@ import rootReducer from './ducks/index';
let store = createStore(rootReducer);
-$(function () {
- window.ws = new Connection("/updates");
+document.addEventListener('DOMContentLoaded', () => {
+ window.ws = new Connection("/updates", store.dispatch);
window.onerror = function (msg) {
EventLogActions.add_event(msg);
@@ -20,6 +19,7 @@ $(function () {
render(
<Provider store={store}>{App}</Provider>,
- document.getElementById("mitmproxy"));
-});
+ document.getElementById("mitmproxy")
+ );
+});