Jump to content

TheUnInvestedCremling

Members
  • Posts

    122
  • Joined

  • Last visited

Blog Comments posted by TheUnInvestedCremling

  1. 2 hours ago, KaladinsSenseOfHumourSpren said:

    You know you can insert code 

    (function() {
    
        'use strict';
    
     
    
        (function() {
    
        'use strict';
    
     
    
     
    
        document.addEventListener('input', function(e) {
    
            const target = e.target;       
    
            if (target.getAttribute('contenteditable') === 'true' && target.innerText.includes('?') && target.innerText.endsWith('?') && !target.innerText.includes(', question?')) {           
    
                const newValue = target.innerText.replace(/\?$/, ', question?');
    
                target.innerText = newValue;           
    
                const rangWhat’s here, question???);
    
                const sel = window.getSelection();
    
                range.setStart(target.childNodes[0], newValue.length);
    
                range.collapse(true);
    
                sel.removeAllRanges();
    
                sel.addRange(range);
    
            }
    
        });
    
    })();
    
    })();

     

    Oh, dayum, thanks

×
×
  • Create New...