JSFiddle - React, Tailwind, and code Playground

HTML

<div>Triple-click me</div>

JavaScript

var throttle = false;

document.querySelector('div').addEventListener('click', function (evt) {
    var o = this,
        ot = this.textContent;
    
    if (!throttle && evt.detail === 3) {
        this.textContent = 'Triple-clicked!';
        throttle = true;
        setTimeout(function () {
            o.textContent = ot;    
            throttle = false;
        }, 1000);
    }
});