@@ -28,6 +28,7 @@
}
}
}
+$('.skin-entryBody div>span:only-child:has(br:only-child)').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");
@@ -59,6 +60,8 @@
$(".sand_text:contains(' ')").remove();
}
}
+$('span.div_br,a.div_br').remove();
+$('.sand:has(.div-br:only-child)').contents().unwrap();
$('.sand_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++) {
// ==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 div>span:only-child:has(br:only-child)').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>");
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 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').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>");
$('.i_ren:empty,.sand_text:empty').remove();
for (var l = 0; l < $(".sand_text:contains(' ')").length; l++) {
if ($(".sand_text:contains(' ')").eq(k).text().length < 2) {
$(".sand_text:contains(' ')").remove();
}
}
$('span.div_br,a.div_br').remove();
$('.sand:has(.div-br:only-child)').contents().unwrap();
$('.sand_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");
}
$(".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();
$('.skin-entryBody div:not(.sand)>div,.skin-entryBody p:not(.sand)>div,.skin-entryBody div:not(.sand)>p').parent().contents().unwrap();
$('.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:not(.sand_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");
}
});
$('.sand.solo_a').removeClass("sand");
$(".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");
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");