Created
January 17, 2013 08:21
-
-
Save teramako/4554515 to your computer and use it in GitHub Desktop.
はてなブックマークコメントでタイトルと同じ無意味なコメントを除去するスクリプト
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== | |
// @id hateb_rm_sameTitleComemnts | |
// @name hateb_rm_sameTitleComemnts.js | |
// @version 1.0 | |
// @namespace teramako | |
// @author teramako | |
// @description | |
// @include http://b.hatena.ne.jp/entry/* | |
// @run-at document-end | |
// ==/UserScript== | |
function $id (id) { | |
return document.getElementById(id); | |
} | |
var title = $id("head-entry-link").title.trim(); | |
var commentList = document.querySelectorAll(".bookmark-list > li > .comment"); | |
for (var comment of commentList) { | |
if (comment.textContent.trim() === title) { | |
comment.parentNode.parentNode.removeChild(comment.parentNode); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment