// ==UserScript==
// @title mofu_ameblo
// @name mofu_ameblo
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://ameblo.jp/mofu-everyday/entry*
// @grant none
// ==/UserScript==
var result = document.evaluate('//div[@class="skin-entryBody"][.//a[@href="https://ameblo.jp/mofu-everyday/entry-12413675351.html"]]//a/img', document, null, 7, null);
var tmp = [];
for (var i = 0; i < result.snapshotLength; i++) {
tmp[i] = result.snapshotItem(i).src;
}
if (i > 0) {
var result2 = document.evaluate('//div[@class="skin-entryBody"]//*', document, null, 7, null);
for (var j = 0; j < result2.snapshotLength; j++) {
result2.snapshotItem(j).remove();
}
var result3 = document.evaluate('//div[@class="skin-entryBody"]', document, null, 7, null);
result3.snapshotItem(0).classList.add("mofu_div")
for (i = 0; i < tmp.length; i++) {
result3.snapshotItem(0).insertAdjacentHTML('beforeend', '<img src=' + tmp[i] + '>');
}
}
var result4 = document.evaluate('//li[@class="skin-borderQuiet"]//img', document, null, 7, null);
var result5 = document.evaluate('//div[@class="skin-widgetBody"]/div', document, null, 7, null);
result5.snapshotItem(0).insertAdjacentHTML('afterbegin', '<input type="checkbox" id="img_zoom" title="画像拡大用のチェックボックス">');
document.getElementById("img_zoom").addEventListener('change', function () {
if (document.getElementById("img_zoom").checked) {
var tmp2;
var n_src = [];
for (var k = 0; k < result4.snapshotLength; k++) {
tmp2 = result4.snapshotItem(k).dataset.src;
n_src = tmp2.split("?");
result4.snapshotItem(k).src = n_src[0];
}
}
});