@@ -51,12 +51,11 @@
}
$('.skin-entryBody>*:has(a:has(img)),.skin-entryBody>*:has(iframe),.skin-entryBody>*:has(table)').contents().unwrap();
$('.skin-entryBody>a:has(img),.skin-entryBody>iframe,.skin-entryBody>table').addClass("i_pic");
-$('.skin-entryBody>span,.skin-entryBody>a:not(:has(img))').addClass("in_ele");
+$('.skin-entryBody>span,.skin-entryBody>a:not(:has(img)),.skin-entryBody>br').addClass("in_ele");
$('.in_ele').not('.in_ele+.in_ele').each(function () {
$(this).nextUntil(':not(.in_ele)').andSelf().wrapAll('<span class="i_ren"></span>');
});
$(".skin-entryBody>*:not(.i_ren)+br").wrap("<div class='div_br'></div>");
-$(".skin-entryBody>.i_ren+br").remove();
$('.div_br').not('.div_br+.div_br').each(function () {
$(this).nextUntil(':not(.div_br)').andSelf().wrapAll('<div class="div_ren"></div>');
});
// ==UserScript==
// @title nishino_ameblo_only
// @name nishino_ameblo_only
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://ameblo.jp/nishino-akihiro*
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// ==/UserScript==
var listArray = document.querySelectorAll('.skin-entryBody *[style]');
for (var i = 0; i < listArray.length; i++) {
listArray[i].removeAttribute("style");
}
var listArray2 = document.querySelectorAll('.skin-entryBody font[color],.skin-entryBody font[face]');
for (var j = 0; j < listArray2.length; j++) {
listArray2[j].removeAttribute("color");
listArray2[j].removeAttribute("face");
}
var result5 = document.evaluate('id("entryBody")//text()', document, null, 7, null);
for (var b = 0; b < result5.snapshotLength; b++) {
if (/^(\s| )+$/g.test(result5.snapshotItem(b).nodeValue)) {
if (/ |\u00A0/g.test(result5.snapshotItem(b).nodeValue)) {
result5.snapshotItem(b).nodeValue = " ";
} else {
result5.snapshotItem(b).nodeValue = result5.snapshotItem(b).nodeValue.replace(/^\s+/g, "");
}
}
}
$('.skin-entryBody a:not([href])').contents().unwrap();
$('.skin-entryBody section,.skin-entryBody h1,.skin-entryBody h2,.skin-entryBody h3,.skin-entryBody h4,.skin-entryBody h5,.skin-entryBody h6').wrap("<div></div>");
$('.skin-entryBody section,.skin-entryBody h1,.skin-entryBody h2,.skin-entryBody h3,.skin-entryBody h4,.skin-entryBody h5,.skin-entryBody h6').contents().unwrap();
$('.skin-entryBody b,.skin-entryBody i,.skin-entryBody font,.skin-entryBody u').addClass("fbi");
$('.fbi,.skin-entryBody span').contents().unwrap();
var result = document.evaluate('id("entryBody")//*[self::div or self::p]/br[not(./preceding-sibling::*) and string-length(./preceding-sibling::text())<1]', document, null, 7, null);
for (var x = 0; x < result.snapshotLength; x++) {
result.snapshotItem(x).classList.add("br_first");
}
$(".br_first").wrap("<div class='div_br'></div>");
$('.skin-entryBody div>div,.skin-entryBody p>div,.skin-entryBody div>p').parent().contents().unwrap();
$(".skin-entryBody").contents().filter(function () {
return this.nodeType === 3;
}).wrap("<span class='n_text'></span>");
$('.skin-entryBody span:empty').remove();
$('.skin-entryBody div:empty,.skin-entryBody p:empty').remove();
for (var k = 0; k < $("#entryBody *:contains(' ')").length; k++) {
if ($("#entryBody *:contains(' ')").eq(k).text().length < 2) {
$("#entryBody *:contains(' ')").eq(k).addClass("div_br");
}
}
$('.skin-entryBody>*:has(a:has(img)),.skin-entryBody>*:has(iframe),.skin-entryBody>*:has(table)').contents().unwrap();
$('.skin-entryBody>a:has(img),.skin-entryBody>iframe,.skin-entryBody>table').addClass("i_pic");
$('.skin-entryBody>span,.skin-entryBody>a:not(:has(img)),.skin-entryBody>br').addClass("in_ele");
$('.in_ele').not('.in_ele+.in_ele').each(function () {
$(this).nextUntil(':not(.in_ele)').andSelf().wrapAll('<span class="i_ren"></span>');
});
$(".skin-entryBody>*:not(.i_ren)+br").wrap("<div class='div_br'></div>");
$('.div_br').not('.div_br+.div_br').each(function () {
$(this).nextUntil(':not(.div_br)').andSelf().wrapAll('<div class="div_ren"></div>');
});
$('.i_pic').prev().filter('.div_ren').addClass("waku");
$('.i_pic').next().filter('.div_ren').addClass("waku");
$(".i_pic+.waku+.i_pic").prev().addClass("frame_pad");
$('.div_ren:not(.waku)').contents().unwrap();
$('.div_ren').removeClass("div_ren");
$("iframe.i_pic").wrap("<div class='div_iframe'></div>");
$('.skin-entryBody>*:has(a)').each(function () {
if ($(this).text().length - $(this).children('a').text().length < 3) {
$(this).addClass("solo_a");
}
});
$(".skin-entryBody>*:not(.div_br):not(.waku)").last().addClass("node_last");
$(".skin-entryBody>*:not(.div_br):not(.waku)").first().addClass("node_first");
$('.node_first').prevAll().addClass("cork");
var result8 = document.evaluate('//*[contains(@class,"node_last")][count(./a)=1]', document, null, 7, null);
if (result8.snapshotItem(0)) {
if ($(".node_last").text().length - $(".node_last>a").text().length > 1) {
$('.node_last').addClass("uni_a");
}
} else {
if ($(".node_last").text().length == 1) {
$('.node_last').remove();
$(".skin-entryBody>*:not(.div_br):not(.waku)").last().addClass("node_last");
}
}
$('.node_last+.waku').contents().unwrap();
$('.skin-entryBody figure div').contents().unwrap();
$('.skin-entryBody figure>a:first-child').text("オンラインサロン | 西野亮廣エンタメ研究所");
$('a.i_pic[href="http://twitter.com/nishinoakihiro"]').removeClass("i_pic");