Orion31Dev / Kami-Shortcut-Enhancer

// ==UserScript==
// @name         Kami-Shortcut-Enhancer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Ctrl + , and Ctrl + . shortcuts for Kami (imagine using Kami, cringe)
// @author       You
// @match        https://web.kamihq.com/*
// @license      MIT
// @grant        none
// @require      https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.5/mousetrap.min.js
// ==/UserScript==

Mousetrap.prototype.stopCallback = () => {
  return false;
};

(function () {
  'use strict';

  Mousetrap.bind('ctrl+.', () => {
    document.querySelector('button[title="superscript"]').click();
    console.log('sub');
  });
  Mousetrap.bind('ctrl+,', () => {
    document.querySelector('button[title="subscript"]').click()
  });
})();