Created
December 13, 2011 01:40
-
-
Save paulirish/1470003 to your computer and use it in GitHub Desktop.
get gyazo hotlink quickly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fix gyazo links | |
// @author Paul Irish <http://paulirish.com/> | |
// @namespace https://gist.github.com/1470003 | |
// @include http://gyazo.com/* | |
// ==/UserScript== | |
/* http://gyazo.com/573de7754542176dc406bec2b7c92e53 | |
to | |
http://cache.gyazo.com/573de7754542176dc406bec2b7c92e53.png | |
*/ | |
if (/\/\/gyazo\.com\/[0-9a-fA-F]{15}/.test(location.href)){ | |
location.href = location.protocol + '//cache.' + location.host + location.pathname + '.png' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! I modified it a little to put the link in the clipboard, and close the tab automatically (after 500ms since big uploads seem to break if its closed faster).
I'm pasting it here in case I ever lose it, since this is the first place google brings me for gyazo userscripts