Guest User

Untitled

a guest
May 13th, 2026
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.85 KB | Source Code | 0 0
  1. diff --git a/home/alexv/Downloads/lorify-ng-3.4.2.txt b/home/alexv/Downloads/lorify-ng-3.4.2_orig.txt
  2. index 5650542..63f6245 100644
  3. --- a/home/alexv/Downloads/lorify-ng-3.4.2.txt
  4. +++ b/home/alexv/Downloads/lorify-ng-3.4.2_orig.txt
  5. @@ -2698,8 +2698,6 @@ function handleCommentForm(form) {
  6.     const FACT_PANNEL  = form.querySelector('.form-actions');
  7.     const NODE_PREVIEW = _cnode('div', { id: 'commentPreview' });
  8.     const MARKUP_PANEL = _cnode('div', { id: 'markup-panel' });
  9. -   const MARKUP_LABEL = _cnode('span', { className: 'markup-mode' });
  10. -   let MARKUP_TITLE = MARKUP_LABEL;
  11.  
  12.     for (let attrs of [
  13.         { lorcode: 'b'  },
  14. @@ -2745,21 +2743,7 @@ function handleCommentForm(form) {
  15.             }
  16.         }
  17.     });
  18. -   const setupMarkupPanel = () => {
  19. -       const control = TEXT_AREA.closest('.control-group') || TEXT_AREA.parentNode;
  20. -       const tab = control.querySelector('.markup-tabs__tab.active');
  21. -       const legacy = TEXT_AREA.parentNode.firstElementChild;
  22. -
  23. -       if (tab) {
  24. -           MARKUP_TITLE = tab;
  25. -           tab.after(MARKUP_PANEL);
  26. -       } else if (legacy && legacy !== TEXT_AREA) {
  27. -           legacy.append(MARKUP_LABEL, MARKUP_PANEL);
  28. -       } else {
  29. -           TEXT_AREA.before(MARKUP_LABEL, MARKUP_PANEL);
  30. -       }
  31. -   };
  32. -   setupMarkupPanel();
  33. +   TEXT_AREA.parentNode.firstElementChild.append(MARKUP_PANEL);
  34.  
  35.     let btn_cancel = form.elements.cancel;
  36.     if(!btn_cancel ) {
  37. @@ -2967,7 +2951,7 @@ function handleCommentForm(form) {
  38.     );
  39.  
  40.     const mode_change = i => {
  41. -       MARKUP_TITLE.textContent = `Разметка ${i ? 'LORCODE' : 'Markdown'}`
  42. +       MARKUP_PANEL.previousSibling.textContent = `Разметка ${i ? 'LORCODE' : 'Markdown'}`
  43.         MARKUP_PANEL.className = i ? 'lorcode' : 'markdown';
  44.     }
  45.     Object.defineProperty(Dynamic_Style, 'Markup Mode', {
  46. @@ -10976,4 +10960,4 @@ function getHLJSStyle(i = -1) {
  47.         }
  48.     ];
  49.     return i === -1 ? styles : styles[i];
  50. -}
  51. \ No newline at end of file
  52. +}
Tags: lorify-ng
Advertisement
Add Comment
Please, Sign In to add comment