// ==UserScript==
// @title nishino_ameblo_easy
// @name nishino_ameblo_easy
// @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 result = document.evaluate('//div[@class="skin-entryBody"]//br/ancestor::*[./ancestor::div[@class="skin-entryBody"]]', document, null, 7, null);
for (var i = 0; i < result.snapshotLength; i++) {
result.snapshotItem(i).classList.add("anc");
}
var result2 = document.evaluate('//div[@class="skin-entryBody"]//*[./text()]/ancestor::*[./ancestor::div[@class="skin-entryBody"] and not(self::a)]', document, null, 7, null);
for (var j = 0; j < result2.snapshotLength; j++) {
result2.snapshotItem(j).classList.add("anc");
}
$('.anc').replaceWith(function () {
return $(this).contents();
});
var listArray = document.querySelectorAll('.skin-entryBody>font+br');
for (var a = 0; a < listArray.length; a++) {
listArray[a].insertAdjacentHTML("beforebegin", "<div></div>");
}
var listArray2 = document.querySelectorAll('.skin-entryBody>iframe+font');
for (var b = 0; b < listArray2.length; b++) {
listArray2[b].insertAdjacentHTML("beforebegin", "<div></div>");
}
var listArray3 = document.querySelectorAll('.skin-entryBody>i+br');
for (var c = 0; c < listArray3.length; c++) {
listArray3[c].insertAdjacentHTML("beforebegin", "<div></div>");
}
var listArray4 = document.querySelectorAll('.skin-entryBody>a+br+br');
for (var x = 0; x < listArray4.length; x++) {
listArray4[x].insertAdjacentHTML("beforebegin", "<div></div>");
}
var listArray5 = document.querySelectorAll('.skin-entryBody>b+br');
for (var y = 0; y < listArray4.length; y++) {
listArray5[y].insertAdjacentHTML("beforebegin", "<div></div>");
}
var listArray6 = document.querySelectorAll('.skin-entryBody>iframe+br');
for (var z = 0; z < listArray6.length; z++) {
listArray6[z].insertAdjacentHTML("beforebegin", "<div></div>");
}