-
-
Save syoichi/1033628 to your computer and use it in GitHub Desktop.
gyazo.comの画像にアクセスすると広告ページへリダイレクトするようになっていたので、cache.gyazo.comの画像にリダイレクトするように修正した。
This file contains hidden or 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 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