"Join Us" message for console snoopers (#585)

This commit is contained in:
William O'Beirne 2017-12-14 18:47:11 -05:00 committed by Daniel Ternyak
parent 9dca5f28b4
commit 2dde67c79b
2 changed files with 34 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import { render } from 'react-dom';
import Root from './Root';
import createHistory from 'history/createBrowserHistory';
import { configuredStore } from './store';
import consoleAdvertisement from './utils/consoleAdvertisement';
const history = createHistory();
@ -15,11 +16,13 @@ const appEl = document.getElementById('app');
render(<Root store={configuredStore} history={history} />, appEl);
if (module.hot) {
module.hot.accept('reducers', () =>
configuredStore.replaceReducer(require('reducers'))
);
module.hot.accept('reducers', () => configuredStore.replaceReducer(require('reducers')));
module.hot.accept('./Root', () => {
render(<Root store={configuredStore} history={history} />, appEl);
});
}
if (process.env.NODE_ENV === 'production') {
consoleAdvertisement();
}

View File

@ -0,0 +1,28 @@
// Simply importing this file will do the console log conditionally
export default function consoleAdvertisement() {
console.log(
`%c
,:;;;;;;;;;;:.
.;;;;;;::;;;;;;;;;;;;'
::::;;;;::::;;;;;;;;;;;;;: _ _ _ _ _
;::;;::;;:::' .;;;;;;;;;;;, | | (_) | | | | | |
;;:;;;;::;:; ;;;;;;;;: | | ___ _ _ __ | | | |___| |
;;:;;;;;;::;;; ;;;;;;;: _ | |/ _ \\| | '_ \\ | | | / __| |
;;::;;;;;::::;;;;;;;, ;;;;;;;, | |__| | (_) | | | | | | |__| \\__ |_|
;::;;;; :;;::;;;;;::;; ;;;;;;; \\____/ \\___/|_|_| |_| \\____/|___(_)
:::;;;;' ;:;;;;;;::;' ,;;;;;;
:;;;;;; ;::;;;;' ,;;;;:: https://github.com/MyEtherWallet/MyEtherWallet
.;;;;;;, ,;::;;;;;;;; ;;;;;:;
;;;;;;; ;::;;;;;;:;:;',;;;;:;;
';;;;;;; ';;;;::;;;;;;::;
.;;;;;;;' ;;:::;;;;;::;
;;;;;;;;;'' ;:;;:;;;::;
::::;;;;::::;;;;;;;;;;;;;:
.;;;;;;::;;;;;;;;;;;;'
,:;;;;;;;;;;:.
`,
'background: #163151; color: #FFF;'
);
}