Diff
Not logged in

Differences From Artifact [699559120f]:

To Artifact [2cbfe6e90a]:


670
671
672
673
674
675
676
677
678




679
680


681
682
683
684
685
686
687
670
671
672
673
674
675
676


677
678
679
680


681
682
683
684
685
686
687
688
689







-
-
+
+
+
+
-
-
+
+







      animate: function f(e,a,cb){
        if(!f.$disabled){
          D.addClassBriefly(e, a, 0, cb);
        }
        return this;
      }
    };
    if(!D.attr(cs.e.inputField,'contenteditable','plaintext-only').isContentEditable){
      /* Only the Chrome family supports contenteditable=plaintext-only,
    if(D.attr(cs.e.inputField,'contenteditable','plaintext-only').isContentEditable){
      cs.$browserHasPlaintextOnly = true;
    }else{
      /* Only the Chrome family supports contenteditable=plaintext-only */
         but Chrome is the only engine for which we need this flag: */
        D.attr(cs.e.inputField,'contenteditable','true');
      cs.$browserHasPlaintextOnly = false;
      D.attr(cs.e.inputField,'contenteditable','true');
    }
    cs.animate.$disabled = true;
    F.fetch.beforesend = ()=>cs.ajaxStart();
    F.fetch.aftersend = ()=>cs.ajaxEnd();
    cs.pageTitleOrig = cs.e.pageTitle.innerText;
    const qs = (e)=>document.querySelector(e);
    const argsToArray = function(args){
1322
1323
1324
1325
1326
1327
1328





1329
1330




1331
1332
1333
1334
1335


1336
1337
1338
1339







1340
1341


1342
1343
1344
1345
1346
1347
1348
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335


1336
1337
1338
1339





1340
1341




1342
1343
1344
1345
1346
1347
1348


1349
1350
1351
1352
1353
1354
1355
1356
1357







+
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+







        event.stopPropagation();
        event.preventDefault(true);
        return false;
      }
      /* else continue propagating */
    };
    document.addEventListener('paste', pasteListener, true);
    if(window.Selection && window.Range && !Chat.$browserHasPlaintextOnly){
      /* Acrobatics to keep *some* installations of Firefox
         from pasting formatting into contenteditable fields.
         This also works on Chrome, but chrome has the
         contenteditable=plaintext-only property which does this
    if(0){
      const onPastePlainText = function(ev){
         for us. */
      Chat.inputElement().addEventListener(
        'paste',
        function(ev){
        var pastedText = undefined;
        if (window.clipboardData && window.clipboardData.getData) { // IE
          pastedText = window.clipboardData.getData('Text');
        }else if (ev.clipboardData && ev.clipboardData.getData) {
          pastedText = ev.clipboardData.getData('text/plain');
          if (ev.clipboardData && ev.clipboardData.getData) {
            const pastedText = ev.clipboardData.getData('text/plain');
        }
        ev.target.textContent += pastedText;
        ev.preventDefault();
        return false;
            const selection = window.getSelection();
            if (!selection.rangeCount) return false;
            selection.deleteFromDocument(/*remove selected content*/);
            selection.getRangeAt(0).insertNode(document.createTextNode(pastedText));
            selection.collapseToEnd(/*deselect pasted text and set cursor at the end*/);
            ev.preventDefault();
            return false;
      };
      Chat.e.inputField.addEventListener('paste', onPastePlainText, false);
          }
        }, false);
    }
    const noDragDropEvents = function(ev){
      /* contenteditable tries to do its own thing with dropped data,
         which is not compatible with how we use it, so... */
      ev.dataTransfer.effectAllowed = 'none';
      ev.dataTransfer.dropEffect = 'none';
      ev.preventDefault();