Skip to content

Commit

Permalink
style: added spaces to testbed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Nov 17, 2016
1 parent 7229ab0 commit 8bf4b09
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions testbed/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,35 @@ var app = {
app.initialize();

// branch

function BranchInit(isDebug) {
console.log('Trigger BranchInit()');

// for development and debugging only
Branch.setDebug(isDebug);

// sync with mixpanel if installed
Branch.setMixpanelToken('your_mixpanel_token');

// init
Branch.initSession(onBranchLinkHook).then(function(res) {
Branch.initSession(BranchLinkData).then(function(res) {
console.log(res);
alert('Response: ' + JSON.stringify(res));
}).catch(function(err) {
console.error(err);
alert('Error: ' + JSON.stringify(err));
});

// handler for deep link data
function onBranchLinkHook(data) {
function BranchLinkData(data) {
console.log('Trigger BranchLinkData()');

if (data) {
alert(JSON.stringify(data));
}
}

// optional
Branch.onNonBranchLink(function NonBranchLinkHandler(data) {
console.log('Trigger NonBranchLinkData()');

if (data) {
alert(JSON.stringify(data));
}
Expand Down Expand Up @@ -122,7 +126,7 @@ function BranchUniversalObject() {
canonicalUrl: "http://example.com/123",
title: "Content 123",
contentDescription: "Content 123 " + Date.now(),
contentImageUrl: "http://lorempixel.com/400/400",
contentImageUrl: "http://lorempixel.com/400/400/",
price: 12.12,
currency: "GBD",
contentIndexingMode: "private",
Expand Down

0 comments on commit 8bf4b09

Please sign in to comment.