remove unused const, move single used var to chunk

This commit is contained in:
Pavel Mineev
2021-08-19 12:55:56 -05:00
committed by Umputun
parent fd5df39fe2
commit 5718a699cf
3 changed files with 2 additions and 3 deletions
-1
View File
@@ -2,4 +2,3 @@ export const BASE_URL = window.remark_config.host || process.env.REMARK_URL!;
export const NODE_ID = process.env.REMARK_NODE!;
export const API_BASE = '/api/v1';
export const COMMENT_NODE_CLASSNAME_PREFIX = 'remark42__comment-';
export const COUNTER_NODE_CLASSNAME = 'remark42__counter';
-1
View File
@@ -1,7 +1,6 @@
import { Sorting, Theme } from './types';
export { BASE_URL, API_BASE, NODE_ID, COMMENT_NODE_CLASSNAME_PREFIX } from './constants.config';
export const LAST_COMMENTS_NODE_CLASSNAME = 'remark42__last-comments';
export const MAX_SHOWN_ROOT_COMMENTS = 10;
export const DEFAULT_SORT: Sorting = '-active';
+2 -1
View File
@@ -1,4 +1,4 @@
import { COUNTER_NODE_CLASSNAME, BASE_URL, API_BASE } from 'common/constants.config';
import { BASE_URL, API_BASE } from 'common/constants.config';
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
@@ -7,6 +7,7 @@ if (document.readyState === 'loading') {
}
function init(): void {
const COUNTER_NODE_CLASSNAME = 'remark42__counter';
const nodes = Array.from(document.getElementsByClassName(COUNTER_NODE_CLASSNAME)) as HTMLElement[];
if (!nodes) {