Files
remark42/web/app/common/settings.js
T
Igor AdamenkoandUmputun 6f1b9037d5 Dark theme (#228)
* add with-theme hoc

* add dark theme styles for components

* add toggle theme button to the dev demo page

* add info about widget themes to README
2018-12-15 17:10:41 -06:00

18 lines
532 B
JavaScript

import { THEMES } from './constants';
const querySettings =
window.location.search
.substr(1)
.split('&')
.reduce((acc, param) => {
const pair = param.split('=');
acc[pair[0]] = decodeURIComponent(pair[1]);
return acc;
}, {}) || {};
export const siteId = querySettings['site_id'];
export const url = querySettings['url'];
export const maxShownComments = querySettings['max_shown_comments'];
export const token = querySettings['token'];
export const theme = querySettings['theme'] || THEMES[0];