Commits

Anonymous committed 1fa3972

Updated the no-accesskey greasemonkey script.

Comments (0)

Files changed (1)

t2/open-source/bits-and-bobs/greasemonkey/no-accesskey.user.js

+/*
+no-accesskey - remove Access Keys.
+
+Changelog:
+* 2005-04-28 - First version.
+
+* 2006-01-12 - 
+    1. Converted elems[i].accessKey = "" to 
+    elems[i].setAttribute('accesskey', '').
+    2. Calling the function directly instead of using window.onload.
+*/
 function accesskeys()
 {
     var elems = document.getElementsByTagName("*");
     for (var i=0; i<elems.length; i++)
     {
-        elems[i].accessKey = "";
+        elems[i].setAttribute('accesskey','');
     }
 }
-window.onload = accesskeys;
+accesskeys();
+// window.onload = accesskeys;