A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
760 B

  1. /*
  2. * Copyright © 2016-2021 Musing Studio LLC.
  3. *
  4. * This file is part of WriteFreely.
  5. *
  6. * WriteFreely is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License, included
  8. * in the LICENSE file in this source code package.
  9. */
  10. function showModal(id) {
  11. document.getElementById('overlay').style.display = 'block';
  12. document.getElementById('modal-'+id).style.display = 'block';
  13. }
  14. var closeModals = function(e) {
  15. e.preventDefault();
  16. document.getElementById('overlay').style.display = 'none';
  17. var modals = document.querySelectorAll('.modal');
  18. for (var i=0; i<modals.length; i++) {
  19. modals[i].style.display = 'none';
  20. }
  21. };
  22. H.getEl('overlay').on('click', closeModals);