Created
June 9, 2012 05:48
-
-
Save lolicsystem/2899668 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 remove plural br-tag from ameblo | |
// @namespace http://lolicsystem.com/gm_scripts/ | |
// @description アメブロ本文中の過剰な改行を削除します | |
// @include http://ameblo.jp/* | |
// @author lolicsystem | |
// @version 1 | |
// ==/UserScript== | |
(function () { | |
var a = document.evaluate('//div[@class="articleText"]', document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < a.snapshotLength; i++) { | |
a.snapshotItem(i).innerHTML = a.snapshotItem(i).innerHTML.replace(/(<br>){3,}/ig, "<br>"); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment