Skip to content

Instantly share code, notes, and snippets.

View WillMoggridge's full-sized avatar

Will Moggridge WillMoggridge

View GitHub Profile
@WillMoggridge
WillMoggridge / anti-keygrabber.user.js
Last active March 31, 2016 12:34
Prevent websites stealing keyboard shortcuts I use all the time... Modified from https://gist.github.com/rodneyrehm/5213304.
// ==UserScript==
// @name anti key-grabber
// @description Prevent web apps from capturing and muting vital keyboard shortcuts
// @grant none
// @version 1.2
// ==/UserScript==
(function(){
var isMac = unsafeWindow.navigator.oscpu.toLowerCase().contains("mac os x");
unsafeWindow.document.addEventListener('keydown', function(e) {