闭社主体 forked from https://github.com/tootsuite/mastodon
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.

21 lines
958 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 displayMedia = getMeta('display_media');
  7. export const expandSpoilers = getMeta('expand_spoilers');
  8. export const unfollowModal = getMeta('unfollow_modal');
  9. export const boostModal = getMeta('boost_modal');
  10. export const deleteModal = getMeta('delete_modal');
  11. export const me = getMeta('me');
  12. export const searchEnabled = getMeta('search_enabled');
  13. export const invitesEnabled = getMeta('invites_enabled');
  14. export const version = getMeta('version');
  15. export const mascot = getMeta('mascot');
  16. export const profile_directory = getMeta('profile_directory');
  17. export const isStaff = getMeta('is_staff');
  18. export default initialState;