@@ -50,6 +50,7 @@
}
}
$('span.div_br,a.div_br').remove();
+$('.skin-entryBody span:has(span),.skin-entryBody span:has(a),.skin-entryBody span:has(br)').contents().unwrap();
$('.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>');
@@ -66,7 +67,7 @@
}
}
$('.i_ren:empty,.sand_text:empty').remove();
-$('.sand_text~a').addClass("sand_a");
+$('.sand_text~a,.n_text~a').addClass("sand_a");
var result3 = document.evaluate('//*[./a[contains(@class,"sand_a")][not(./following-sibling::span)]]', document, null, 7, null);
for (var y = 0; y < result3.snapshotLength; y++) {
result3.snapshotItem(y).classList.add("sand_last_a");
// ==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");
}
}
$('span.div_br,a.div_br').remove();
$('.skin-entryBody span:has(span),.skin-entryBody span:has(a),.skin-entryBody span:has(br)').contents().unwrap();
$('.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>');
});
$('.i_ren:has(br.in_ele:only-child)').wrap("<div class='div_br'></div>");
$('.in_ele').removeClass("in_ele");
$('.skin-entryBody>p:not(.div_br):has(br),.skin-entryBody>div:not(.div_br):has(br)').addClass("sand");
$(".sand").contents().filter(function () {
return this.nodeType === 3;
}).wrap("<span class='sand_text'></span>");
for (var l = 0; l < $(".sand_text:contains(' ')").length; l++) {
if ($(".sand_text:contains(' ')").eq(k).text().length < 2) {
$(".sand_text:contains(' ')").remove();
}
}
$('.i_ren:empty,.sand_text:empty').remove();
$('.sand_text~a,.n_text~a').addClass("sand_a");
var result3 = document.evaluate('//*[./a[contains(@class,"sand_a")][not(./following-sibling::span)]]', document, null, 7, null);
for (var y = 0; y < result3.snapshotLength; y++) {
result3.snapshotItem(y).classList.add("sand_last_a");
}
$('.div_br').not('.div_br+.div_br').each(function () {
$(this).nextUntil(':not(.div_br)').andSelf().wrapAll('<div class="div_ren"></div>');
});
$('.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");
$('.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");