Skip to content

Instantly share code, notes, and snippets.

@xulapp
Created April 1, 2010 12:03
Show Gist options
  • Save xulapp/351720 to your computer and use it in GitHub Desktop.
Save xulapp/351720 to your computer and use it in GitHub Desktop.
altTooltip.uc.js
// ==UserScript==
// @name altTooltip.uc.js
// @description title がなければ alt を出す
// @include main
// @compatibility Firefox 3.5+
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2010/04/01 21:00 +09:00
// ==/UserScript==
eval('FillInHTMLTooltip = ' + FillInHTMLTooltip.toString().replace(
/\btipElement\.getAttribute\("title"\)/,
'$& || (let (alt = tipElement.getAttribute("alt")) alt ? "[alt] " + alt : "")'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment