remove unused const, move single used var to chunk
This commit is contained in:
@@ -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,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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user