allow ID of container node to optionally be provided in remark_config

This commit is contained in:
John Puddephatt
2019-08-01 20:08:06 +01:00
parent f0750c2433
commit 95168041b9
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -15,6 +15,7 @@ export interface CommentsConfig {
max_shown_comments?: number;
theme?: Theme;
page_title?: string;
node?: string;
}
export interface LastCommentsConfig {
+1 -1
View File
@@ -19,7 +19,7 @@ async function init(): Promise<void> {
__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.");