1300

移行用のテストです

西野ブログ対策

後方空白対策

// ==UserScript==
// @name         nishino_ameblo
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/nishino-akihiro/entry*
// @grant        none
// ==/UserScript==
var result = document.evaluate('//div[@class="skin-entryBody"]//div[not(@contenteditable)]',document, null, 7, null);
for(var i=0;i<result.snapshotLength;i++)
{
result.snapshotItem(i).removeAttribute("style");
 }
document.body.innerHTML=document.body.innerHTML.replace(/<div><br><\/div>/g, '<br>');
/*var result2 = document.evaluate('//div[@class="skin-entryBody"]/descendant::div[1][string-length(./preceding-sibling::text()[1])>8][not(.//img or ./span or ./preceding-sibling::iframe)]',document, null, 7, null);
result2.snapshotItem(0).classList.add("top_dir");*/
@-moz-document url-prefix("https://ameblo.jp/nishino-akihiro/") {
.skin-entryBody br+br{display:none;}
/*.skin-entryBody br:last-of-type:first-of-type{display:none;}
.skin-entryBody div:last-of-type>br:first-child{display:none;}*/
.skin-entryBody div:last-of-type:not(:first-of-type)>br:first-child{display:none;}
.skin-entryBody div:last-of-type:not(:first-of-type)+br{display:none;}
.skin-entryBody br+div>br:first-child:not(:last-of-type){display:none;}
.skin-entryBody br+div>br:only-of-type{display:none;}
.skin-entryBody span br{display:none;}
.skin-entryBody>iframe+br{margin-bottom:1.6em;}
div[contenteditable]+br{display:none;}
/*.top_dir{margin-top:1.6em;}
.top_dir>br:first-child{display:none;}*/
.LazyLoad{display:none;}
.js-blogGenreRank{display:none;}
.skin-entryBody{margin:0;padding:0;}
.skin-entryHead{margin:0;padding:0;}
.hashtag-module-borderTop{margin:0;padding:0;}
}

空div対策

// ==UserScript==
// @name         nishino_ameblo_kdiv
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/nishino-akihiro/entry*
// @grant        none
// ==/UserScript==
var result = document.evaluate('//div[@class="skin-entryBody"]//div[string-length(text())=1][not(./*)]',document, null, 7, null);
for(var i=0;i<result.snapshotLength;i++)
	{
  		result.snapshotItem(i).classList.add("k_div");
    }
.k_div+.k_div{display:none;}
br+.k_div{display:none;}
.k_div+br{display:none;}

lastdiv削除

// ==UserScript==
// @name         nishino_ameblo_ldiv
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/nishino-akihiro/entry*
// @grant        none
// ==/UserScript==
var result = document.evaluate('//div[@class="skin-entryBody"]/descendant::div[last()][not(.//text() or .//img or .//iframe)]',document, null, 7, null);
result.snapshotItem(0).remove();

空span削除

// ==UserScript==
// @name         nishino_ameblo_kspan
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/nishino-akihiro/entry*
// @grant        none
// ==/UserScript==
var result = document.evaluate('//div[@class="skin-entryBody"]//div[./span[not(.//text())]]',document, null, 7, null);
for(var i=0;i<result.snapshotLength;i++)
	{
result.snapshotItem(i).remove();
    }

画像回りの改行復元

// ==UserScript==
// @name         nishino_ameblo_imgbr
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/nishino-akihiro/entry*
// @grant        none
// ==/UserScript==
window.onload = function() {
var result2 = document.evaluate('//div[@class="skin-entryBody"]//a[./following-sibling::br]/img[./ancestor::div[1][not(@class)][not(./following-sibling::br) or ./following-sibling::div]]',document, null, 7, null);
for(var i=0;i<result2.snapshotLength;i++)
{
result2.snapshotItem(i).classList.add("img_br");
 }
var result3 = document.evaluate('//div[@class="skin-entryBody"]/descendant::img[last()][not(./descendant::div)][@class="img_br"]',document, null, 7, null);
    result3.snapshotItem(0).removeAttribute("class");
}
.img_br{margin-bottom:1.6em;}
.skin-entryBody div:last-of-type:not(:first-of-type)>a>.img_br{margin:0;}
.skin-entryBody div:only-of-type+br{display:inline !important;}
/*div[contenteditable]+br{display:inline !important;}
.skin-entryBody>div:last-of-type:not(:first-of-type) div[contenteditable]+br{display:none !important;}*/