The version of vichan running on lainchan.org
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

45 行
1.1KB

  1. if (active_page === "thread" || active_page === "index" || active_page === "ukko") {
  2. $(document).on("ready", function() {
  3. if (window.Options && Options.get_tab('general')) {
  4. Options.extend_tab("general",
  5. "<fieldset><legend>Editor Dialog </legend>"
  6. + ("<label class='quillc' id='quill'><input type='checkbox' /> Enable Quill WYSIWYG Editor</label>")
  7. + "</fieldset>");
  8. }
  9. $('.quillc').on('change', function(){
  10. var setting = $(this).attr('id');
  11. localStorage[setting] = $(this).children('input').is(':checked');
  12. location.reload();
  13. });
  14. if (!localStorage.quill) {
  15. localStorage.quill = 'false';
  16. }
  17. function getSetting(key) {
  18. return (localStorage[key] == 'true');
  19. }
  20. if (getSetting('quill')) $('#quill>input').prop('checked', 'checked');
  21. function initquill() {
  22. if (!getSetting("quill")) {return;}
  23. var quill = new Quill('#body', {
  24. modules: {
  25. toolbar: [
  26. [{ header: [1, 2, false] }],
  27. ['bold', 'italic', 'underline'],
  28. ['image', 'code-block']
  29. ]
  30. },
  31. placeholder: 'Compose an epic...',
  32. theme: 'snow' // or 'bubble'
  33. });
  34. }
  35. initquill();
  36. });
  37. }