Skip to content

Instantly share code, notes, and snippets.

@javascripter
Created December 14, 2008 10:38
Show Gist options
  • Save javascripter/35666 to your computer and use it in GitHub Desktop.
Save javascripter/35666 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name fc2_img_referer_hack
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http*
// ==/UserScript==
function refhack(parent) {
Array.forEach(
parent.querySelectorAll('a[href^="http://blog-imgs-"]'),
function (a) {
a.href = 'data:text/html,' +
<head>
<meta http-equiv="Refresh" content={"0;url=" + a.href} />
</head>.toXMLString();
});
}
refhack(document.body);
if (window.AutoPagerize) {
window.AutoPagerize.addFilter(function (docs) {
docs.forEach(refhack);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment