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

27 lines
662 B

  1. import emojify from './components/emoji'
  2. $(() => {
  3. $.each($('.entry .content, .entry .status__content, .status__display-name, .display-name, .name, .account__header__content'), (_, content) => {
  4. const $content = $(content);
  5. $content.html(emojify($content.html()));
  6. });
  7. $('.video-player video').on('click', e => {
  8. if (e.target.paused) {
  9. e.target.play();
  10. } else {
  11. e.target.pause();
  12. }
  13. });
  14. $('.media-spoiler').on('click', e => {
  15. $(e.target).hide();
  16. });
  17. $('.webapp-btn').on('click', e => {
  18. if (e.button === 0) {
  19. e.preventDefault();
  20. window.location.href = $(e.target).attr('href');
  21. }
  22. });
  23. });