目障りなはてなの犬め、消え去るがいい!!
Posted at 2006-08-17T22:32+09:00 in Coding |
|
| ![]()
Google の検索エンジンを導入したはてな検索をメインの検索エンジンにしようかな、とか。
でも、検索に何も引っかからないとはてなのマスコット犬が表示されていちいちうざいなぁ、とか。というワケで、しなもん君を消してしまう user.js をでっち上げてみた。
// ==UserScript==
// @name Go home shinamon
// @description Remove shinamon
// @namespace http://xcezx.net/
// @include http://searche.hatena.ne.jp/*
// ==/UserScript==
(function () {
window.addEventListener("load", function (e) {
var shinamon = document.evaluate(
"//img[contains(@src,'shinamon')]//parent::*",
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null
);
shinamon.snapshotItem(0).style.display = 'none';
}, false);
}) ();
いや、本当は XPath の習作のつもりで作っただけなんだけどね。