Skip to content

Instantly share code, notes, and snippets.

@shotasenga
Created October 2, 2013 19:08
Show Gist options
  • Save shotasenga/6798927 to your computer and use it in GitHub Desktop.
Save shotasenga/6798927 to your computer and use it in GitHub Desktop.
WordPressの投稿画面のショートカットを全部無効にするuser script http://senta.me/blog/wordpress/wp-post-is-bad/
// ==UserScript==
// @name WP Remove Accesskeys
// @namespace senta.me
// @description WordPressのアクセスキーを削除する。
// @include http://*/wp-admin/post.php*
// @include http://*/wp-admin/post-new.php*
// ==/UserScript==
(function(){
window.addEventListener("load",function(){
var els = document.getElementsByTagName("input");
for(var i=0,m=els.length; i<m; i++){
if (els[i].hasAttribute("accesskey"))
els[i].removeAttribute("accesskey");
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment