Skip to content

Instantly share code, notes, and snippets.

@nvsofts
Last active June 8, 2018 20:32
Show Gist options
  • Save nvsofts/a2877fc5d29a4ef821bb to your computer and use it in GitHub Desktop.
Save nvsofts/a2877fc5d29a4ef821bb to your computer and use it in GitHub Desktop.
Twitterのキーボードショートカットを無効化する (Stop Twitter Keyboard Shortcuts)
// ==UserScript==
// @name Stop Twitter Keyboard Shortcuts
// @namespace http://www.ns-koubou.com/
// @include http://twitter.com/*
// @include https://twitter.com/*
// @include http://*.twitter.com/*
// @include https://*.twitter.com/*
// @run-at document-start
// @version 3
// @grant none
// ==/UserScript==
document.addEventListener('keydown', function(e) {
e.stopImmediatePropagation();
return false;
}, true);
document.addEventListener('keypress', function(e) {
e.stopImmediatePropagation();
return false;
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment