Skip to content

Instantly share code, notes, and snippets.

@esperia
Created May 9, 2011 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save esperia/962309 to your computer and use it in GitHub Desktop.
Save esperia/962309 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name AutoRemove accesskey Attribute
// @namespace http://d.hatena.ne.jp/esperia/
// @description remove "accesskey" attribute for Vimperator
// @include http://*.wikipedia.org/*
// ==/UserScript==
//
(function(doc){
var removeAccesskey = function() {
var r=doc.evaluate("//*[@accesskey]", doc, null, 7, null);
for(var i=0, len=r.snapshotLength; i<len; i++) {
r.snapshotItem(i).removeAttribute("accesskey");
}
};
window.addEventListener('DOMContentLoaded', removeAccesskey, false);
})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment