From 970122b41d398d7b65d2ef5890ade9735e655b28 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 1 Feb 2018 11:08:04 +0100 Subject: [PATCH] Send the channel id to the text analyzer --- www/common/sframe-app-framework.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 960fce5f7..181c45a94 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -7,6 +7,7 @@ define([ '/common/sframe-common.js', '/customize/messages.js', '/common/common-util.js', + '/common/common-hash.js', '/common/common-interface.js', '/common/common-thumbnail.js', '/common/common-feedback.js', @@ -27,6 +28,7 @@ define([ SFCommon, Messages, Util, + Hash, UI, Thumb, Feedback, @@ -286,7 +288,12 @@ define([ evOnReady.fire(newPad); if (AppConfig.textAnalyzer && textContentGetter) { - AppConfig.textAnalyzer(textContentGetter); + var privateData = common.getMetadataMgr().getPrivateData(); + var channelHashes = privateData.availableHashes; + var hash = channelHashes.editHash || channelHashes.viewHash; + var href = privateData.pathname + '#' + hash; + var channelId = Hash.hrefToHexChannelId(href); + AppConfig.textAnalyzer(textContentGetter, channelId); } UI.removeLoadingScreen(emitResize);