Created
June 14, 2011 12:06
-
-
Save littlefolk/1024776 to your computer and use it in GitHub Desktop.
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 Pixiv stacc link cleaner | |
// @namespace littlefolk | |
// @description スタックフィードでのリンクアドレスから不要な部分を削除することで、一度訪問したリンクを判別出来るようにする。 | |
// @include http://www.pixiv.net/stacc/* | |
// @version 1.0 | |
// ==/UserScript== | |
// via. [AutoPagerize_DOMNodeInserted 使用時のテンプレート - twwp](http://d.hatena.ne.jp/taizooo/20101105/1288920138) | |
(function(){ | |
var cleaner = function (node) { | |
unsafeWindow.jQuery("a[href*='from_sid']", node).each(function (index, elem) { | |
elem["href"] = elem["href"].replace(/[&|\?]from_sid=\d+$/, ""); | |
}); | |
}; | |
var addFilterHandler = function (evt) { | |
cleaner(evt.target); | |
}; | |
cleaner(document.body); | |
document.body.addEventListener("AutoPagerize_DOMNodeInserted", addFilterHandler, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment