New Hotkey Request
Old 08-23-2018, 07:34 PM   #1
Boss Hunter
 
Anubis is offline
Join Date: Jul 2016
Posts: 378
Default New Hotkey Request

Building this into the hotkey Current.

Replace R, or Use W.

Code:
document.addEventListener("keydown", (event) => {
  if (HK) {
    if (event.keyCode === 87) {
      event.preventDefault();
      for (let line of top.OldChat) {
        if (line.indexOf("<u>PM from</u>") > -1) {
          let target = line.substring(parseInt(line.indexOf(")>") + 2, 10), parseInt(line.indexOf("</a"), 10));
          document.getElementById("chattybox").value = `/m ${target}:`;
          document.getElementById("chattybox").focus();
          break;
        }
      }
    }
  }
});
Scans chat for last pm. Automatically fills in /m target: and focues chat.
  Reply With Quote
Reply



All times are GMT -5. The time now is 08:01 PM
Boards live since 05-21-2008