You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
771 B

  1. const element = document.getElementById('initial-state');
  2. const initialState = element && JSON.parse(element.textContent);
  3. const getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];
  4. export const reduceMotion = getMeta('reduce_motion');
  5. export const autoPlayGif = getMeta('auto_play_gif');
  6. export const displaySensitiveMedia = getMeta('display_sensitive_media');
  7. export const unfollowModal = getMeta('unfollow_modal');
  8. export const boostModal = getMeta('boost_modal');
  9. export const deleteModal = getMeta('delete_modal');
  10. export const me = getMeta('me');
  11. export const searchEnabled = getMeta('search_enabled');
  12. export const invitesEnabled = getMeta('invites_enabled');
  13. export const version = getMeta('version');
  14. export default initialState;