Skip to content

Instantly share code, notes, and snippets.

@os0x
Created July 30, 2008 01:51
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 os0x/3213 to your computer and use it in GitHub Desktop.
Save os0x/3213 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name accessible user.js
// @namespace http://ss-o.net/
// @include http://*
// @include https://*
// @require http://gist.github.com/3242.txt
// ==/UserScript==
$X('//a[substring(@href, string-length(@href) - string-length(".user.js") + 1) = ".user.js"]')
.forEach(function(a){
var href = a.href;
a.setAttribute("href", href + "#" );
var gmlink = document.createElement("a");
gmlink.href = href;
gmlink.title = "Install Greasemonkey Script";
gmlink.textContent = "[G]";
a.parentNode.insertBefore(gmlink, a);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment