Created
August 5, 2008 00:52
-
-
Save miyagawa/4008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kill hotkeys on Mediawiki | |
// @namespace miyagawa | |
// @description Unbinds Mediawiki hotkeys that conflicts with Emacs key-binding on Safari | |
// @creator Tatsuhiko Miyagawa | |
// @include https://example.com/wiki/* | |
// ==/UserScript== | |
window.addEventListener("load", function(e) { | |
for (var id in window.ta) { | |
var n = document.getElementById(id); | |
if (n) { | |
var a = null; | |
if (ta[id][0].length > 0) { | |
if (n.nodeName.toLowerCase() == "a") { | |
a = n; | |
} else { | |
a = n.childNodes[0]; | |
} | |
if (a) { | |
a.accessKey = undefined; | |
} | |
} | |
} | |
} | |
}, false); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment