闭社主体 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.

33 lines
1.5 KiB

  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 repository = getMeta('repository');
  15. export const source_url = getMeta('source_url');
  16. export const version = getMeta('version');
  17. export const mascot = getMeta('mascot');
  18. export const profile_directory = getMeta('profile_directory');
  19. export const isStaff = getMeta('is_staff');
  20. export const forceSingleColumn = !getMeta('advanced_layout');
  21. export const useBlurhash = getMeta('use_blurhash');
  22. export const usePendingItems = getMeta('use_pending_items');
  23. export const showTrends = getMeta('trends');
  24. export const title = getMeta('title');
  25. export const cropImages = getMeta('crop_images');
  26. export const disableSwiping = getMeta('disable_swiping');
  27. export const treeRoot = getMeta('tree_root');
  28. export const treeAcct = getMeta('tree_acct')
  29. export default initialState;