miyagawa (owner)

Revisions

  • be786c Mon Aug 04 17:52:57 -0700 2008
gist: 4008 Download_button fork
public
Public Clone URL: git://gist.github.com/4008.git
Text only
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// ==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);