MTurk Submit Orange Buttons with Hotkey (`)

Grave/tilde key to submit HITs. Works with newer HIT templates that use the orange submit buttons.

// ==UserScript==
// @name         MTurk Submit Orange Buttons with Hotkey (`)
// @namespace    https://www.mturkcrowd.com/members/aveline.7/
// @version      1.7
// @description  Grave/tilde key to submit HITs. Works with newer HIT templates that use the orange submit buttons.
// @author       aveline
// @icon         https://i.imgur.com/jsju8Wy.png
// @include      /^https://(www\.mturkcontent|s3\.amazonaws)\.com/
// ==/UserScript==

document.addEventListener('keydown', function(e) {
  if (e.keyCode == 192){ // `
    let crowd =
        document.querySelector(`crowd-button[form-action="submit"]`) ||
        document.querySelector(`crowd-classifier`) ||
        document.querySelector(`crowd-image-classifier`) ||
        document.querySelector(`crowd-bounding-box`) ||
        document.querySelector(`crowd-keypoint`) ||
        document.querySelector(`crowd-polygon`) ||
        document.querySelector(`crowd-instance-segmentation`) ||
        document.querySelector(`crowd-semantic-segmentation`) ||
        document.querySelector(`body > crowd-form`);
    if (crowd){
      e.preventDefault();
      crowd.shadowRoot.querySelector(`[type='submit']`).click();
    } else {
      e.preventDefault();
      document.querySelector(`[type='submit']`).click();
    }
  }
});