code: function(ev) {
          var rightClick;
  
          ev = ev || window.event;
  
          if (ev.which) {
              rightClick = ev.which === 3;
          } else if (ev.button) {
              rightClick = ev.button === 2;
          }
  
          return rightClick;
      }
docs: Detect right button by mouse event
  @param {object} ev - Mouse event
  @returns {boolean} State