Skip to content

Instantly share code, notes, and snippets.

@WANGJIEKE
Created July 6, 2020 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WANGJIEKE/2d202bdf8469ef2c1c0c6a97e816735e to your computer and use it in GitHub Desktop.
Save WANGJIEKE/2d202bdf8469ef2c1c0c6a97e816735e to your computer and use it in GitHub Desktop.
Ignore Ctrl/Cmd-S when using Grammarly, so no more annoying saving webpage dialog
// ==UserScript==
// @name Ignore Ctrl/Cmd-S on Grammarly
// @namespace https://wangjieke.github.io/
// @version 0.1
// @description Ignore Ctrl/Cmd-S on Grammarly
// @author WANGJIEKE
// @match https://app.grammarly.com/ddocs/*
// @grant none
// ==/UserScript==
(function() {
'use strict'
window.addEventListener('keydown', event => {
if ((event.ctrlKey || event.metaKey) && event.key == 's') {
console.info('Ctrl-S or Cmd-S')
event.preventDefault()
}
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment