From 920a54c810e49f0b98e109d807537f1054be6ef0 Mon Sep 17 00:00:00 2001 From: Liam Cardenas Date: Tue, 5 Dec 2017 17:16:06 -0800 Subject: [PATCH] Added comment to indicate API key --- src/renderer/js/main.js | 61 +++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/src/renderer/js/main.js b/src/renderer/js/main.js index 4bfd824e9..9c63a17f0 100644 --- a/src/renderer/js/main.js +++ b/src/renderer/js/main.js @@ -55,20 +55,16 @@ document.addEventListener("click", event => { let hrefParts = window.location.href.split("#"); let element = target.title || target.text.trim(); if (element) { - amplitude - .getInstance() - .logEvent("CLICK", { - target: element, - location: - hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", - }); + amplitude.getInstance().logEvent("CLICK", { + target: element, + location: + hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", + }); } else { - amplitude - .getInstance() - .logEvent("UNMARKED_CLICK", { - location: - hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", - }); + amplitude.getInstance().logEvent("UNMARKED_CLICK", { + location: + hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", + }); } } if ( @@ -90,27 +86,26 @@ var init = function() { function onDaemonReady() { lbry.status().then(info => { - amplitude - .getInstance() - .init( - "0b130efdcbdbf86ec2f7f9eff354033e", - info.lbry_id, - null, - function() { - window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again - app.store.dispatch(doDaemonReady()); + amplitude.getInstance().init( + // Amplitude API Key + "0b130efdcbdbf86ec2f7f9eff354033e", + info.lbry_id, + null, + function() { + window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again + app.store.dispatch(doDaemonReady()); - ReactDOM.render( - -
- - -
-
, - canvas - ); - } - ); + ReactDOM.render( + +
+ + +
+
, + canvas + ); + } + ); }); }