From 87f8ed401f169167e86d0db73ce80a53ed138193 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 29 Jun 2017 10:18:40 -0300 Subject: [PATCH 1/9] Using CommentId by queryParam --- client/coral-embed/src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/coral-embed/src/index.js b/client/coral-embed/src/index.js index 82eea8ef7..3f3c63ba3 100644 --- a/client/coral-embed/src/index.js +++ b/client/coral-embed/src/index.js @@ -190,7 +190,10 @@ Talk.render = function(el, opts) { // Compose the query to send down to the Talk API so it knows what to load. let query = {}; - query.comment_id = window.location.hash.slice(1); + let urlParams = new URLSearchParams(window.location.search); + + query.comment_id = urlParams.get('commentId'); + query.asset_id = opts.asset_id; query.asset_url = opts.asset_url; From 0312530b86e25699c1388454e3c77a8a761824ba Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 29 Jun 2017 10:20:33 -0300 Subject: [PATCH 2/9] Modifying permalink plugin --- .../talk-plugin-permalink/client/components/PermalinkButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/talk-plugin-permalink/client/components/PermalinkButton.js b/plugins/talk-plugin-permalink/client/components/PermalinkButton.js index 68406472e..fc8561bdc 100644 --- a/plugins/talk-plugin-permalink/client/components/PermalinkButton.js +++ b/plugins/talk-plugin-permalink/client/components/PermalinkButton.js @@ -83,7 +83,7 @@ export default class PermalinkButton extends React.Component { className={cn(styles.input, `${name}-copy-field`)} type='text' ref={(input) => this.permalinkInput = input} - defaultValue={`${asset.url}#${this.props.commentId}`} + defaultValue={`${asset.url}?commentId=${this.props.commentId}`} />