<commit_before>import React from 'react';
import {render} from 'react-dom';
import {Provider} from 'react-redux';
import {createStore, applyMiddleware} from 'redux'
import thunk from 'redux-thunk';
import dtApp from './reducers/evolve'
import App from './components/App/index';
import {setImageSrc} from './actions'
import ReactGA from 'react-ga';

ReactGA.initialize('UA-25289674-1');
// See https://github.com/react-ga/react-ga#usage if adding react-router
ReactGA.set({page: '/'});
ReactGA.pageview('/');


const store = createStore(
    dtApp,
    applyMiddleware(thunk)
);

render(
    <Provider store={store}>
        <App/>
    </Provider>,
    document.getElementById('react-app')
);

store.dispatch(setImageSrc('/img/marilyn.jpg'));<commit_msg>Add onbeforeunload prompt if user has been on page for half an hour.<commit_after>import React from 'react';
import {render} from 'react-dom';
import {Provider} from 'react-redux';
import {createStore, applyMiddleware} from 'redux'
import thunk from 'redux-thunk';
import dtApp from './reducers/evolve'
import App from './components/App/index';
import {setImageSrc} from './actions'
import ReactGA from 'react-ga';

ReactGA.initialize('UA-25289674-1');
// See https://github.com/react-ga/react-ga#usage if adding react-router
ReactGA.set({page: '/'});
ReactGA.pageview('/');


const store = createStore(
    dtApp,
    applyMiddleware(thunk)
);

render(
    <Provider store={store}>
        <App/>
    </Provider>,
    document.getElementById('react-app')
);

store.dispatch(setImageSrc('/img/marilyn.jpg'));

setTimeout(function () {
    window.onbeforeunload = function (e) {
        var msg = 'Are you sure you want to leave this page?';
        e.returnValue = msg; // most browsers
        return msg; // safari
    };
}, 1800000);
{'fraction_non_alphanumeric': 0.15595304639463387, 'fraction_numerical': 0.013974287311347122, 'mean_word_length': 4.114285714285714, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4687759', 'n_tokens_mistral': 582, 'n_tokens_neox': 570, 'n_words': 148}