Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syoichi/1033628 to your computer and use it in GitHub Desktop.
Save syoichi/1033628 to your computer and use it in GitHub Desktop.
gyazo.comの画像にアクセスすると広告ページへリダイレクトするようになっていたので、cache.gyazo.comの画像にリダイレクトするように修正した。
// ==UserScript==
// @name Gyazo.com: Redirect to image
// @namespace http://buycheapviagraonlinenow.com/
// @include http://gyazo.com/*
// @include http://cache.gyazo.com/*
// @author youpy
// @compatibility Firefox 5.0(Scriptish 0.1.3), Chrome 12.0.742.122, Safari 5.0.5(NinjaKit 0.8), Opera 11.50 on Windows 7 Enterprise 32bit
// @charset UTF-8
// @version 0.0.3.20110715134929
// ==/UserScript==
/* jslint browser: true, maxerr: 50, maxlen: 80, indent: 4 */
// Edition 2011-07-13
(function (lc) {
'use strict';
var pathname = lc.pathname,
hostname = lc.hostname;
if (/^\/[0-9a-f]{32}$/.test(pathname)) {
if (/^g/.test(hostname)) {
lc.href = 'http://cache.' + hostname + pathname + '.png';
} else {
lc.pathname += '.png';
}
}
}(location));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment