Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created August 5, 2008 00:52
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 miyagawa/4008 to your computer and use it in GitHub Desktop.
Save miyagawa/4008 to your computer and use it in GitHub Desktop.
// ==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