From 95168041b9819957e18ca42d60a0be7e8aba66bd Mon Sep 17 00:00:00 2001 From: John Puddephatt Date: Thu, 1 Aug 2019 20:08:06 +0100 Subject: [PATCH] allow ID of container node to optionally be provided in remark_config --- frontend/app/common/config-types.ts | 1 + frontend/app/embed.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/common/config-types.ts b/frontend/app/common/config-types.ts index 369e5db2..078d1e3e 100644 --- a/frontend/app/common/config-types.ts +++ b/frontend/app/common/config-types.ts @@ -15,6 +15,7 @@ export interface CommentsConfig { max_shown_comments?: number; theme?: Theme; page_title?: string; + node?: string; } export interface LastCommentsConfig { diff --git a/frontend/app/embed.ts b/frontend/app/embed.ts index f86e6397..1e5f01f9 100644 --- a/frontend/app/embed.ts +++ b/frontend/app/embed.ts @@ -19,7 +19,7 @@ async function init(): Promise { __webpack_public_path__ = HOST + '/web/'; await loadPolyfills(); - const node = document.getElementById(NODE_ID); + const node = document.getElementById( remark_config.node || NODE_ID); if (!node) { console.error("Remark42: Can't find root node.");