nishino_ameblo_only
by
jigendaddy
2021-01-25 [2021/01/25 11:00:42]
try to take over the world!
@@ -38,15 +38,15 @@
$('.fbi').contents().unwrap();
$('.skin-entryBody span>span').parent().contents().unwrap();
$('.skin-entryBody span>br').parent().contents().unwrap();
-var result4 = document.evaluate('//div[@class="skin-entryBody"]//*[self::div or self::p][contains(text(),"━") or contains(text(),"==")]|//div[@class="skin-entryBody"]//*[self::div or self::p][./span[contains(text(),"━") or contains(text(),"==")]]', document, null, 7, null);
+var result4 = document.evaluate('id("entryBody")//*[self::div or self::p][contains(text(),"━") or contains(text(),"==")]|id("entryBody")//*[self::div or self::p][./span[contains(text(),"━") or contains(text(),"==")]]', document, null, 7, null);
for (var a = 0; a < result4.snapshotLength; a++) {
result4.snapshotItem(a).classList.add("l_yoko");
}
-var result6 = document.evaluate('//div[@class="skin-entryBody"]//*[self::div or self::p][./text()=" "][not(./*)]|//div[@class="skin-entryBody"]//*[self::div or self::p][./span[./text()=" "][not(./*)]]', document, null, 7, null);
+var result6 = document.evaluate('id("entryBody")//*[self::div or self::p][./text()=" "][not(./*)]|id("entryBody")//*[self::div or self::p][./span[./text()=" "][not(./*)]]', document, null, 7, null);
for (var c = 0; c < result6.snapshotLength; c++) {
result6.snapshotItem(c).classList.add("div_br");
}
-var result = document.evaluate('//div[@class="skin-entryBody"]//*[self::div or self::p]/br[not(./preceding-sibling::*) and string-length(./preceding-sibling::text())<1]', document, null, 7, null);
+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");
}
@@ -58,5 +58,5 @@
return this.nodeType === 3;
}).wrap("<span class='n_text'></span>");
$(".skin-entryBody div+br").wrap("<div class='div_br'></div>");
-var result3 = document.evaluate('//div[@class="skin-entryBody"]/*[not(@class="div_br")][last()]', document, null, 7, null);
+var result3 = document.evaluate('id("entryBody")/*[not(@class="div_br")][last()]', document, null, 7, null);
result3.snapshotItem(0).classList.add("node_last");
// ==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 listArray3 = document.querySelectorAll('.skin-entryBody b,.skin-entryBody i,.skin-entryBody font,.skin-entryBody u');
for (var k = 0; k < listArray3.length; k++) {
listArray3[k].classList.add("fbi");
}
var result5 = document.evaluate('//div[@class="skin-entryBody"]//text()', document, null, 7, null);
for (var b = 0; b < result5.snapshotLength; b++) {
if (/^\s+$/g.test(result5.snapshotItem(b).nodeValue)) {
if (/ /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 h1>font[size]').parent().addClass("fbi");
$('.fbi').wrap("<span class='s_fbi'></span>");
$('.fbi').contents().unwrap();
$('.skin-entryBody span>span').parent().contents().unwrap();
$('.skin-entryBody span>br').parent().contents().unwrap();
var result4 = document.evaluate('id("entryBody")//*[self::div or self::p][contains(text(),"━") or contains(text(),"==")]|id("entryBody")//*[self::div or self::p][./span[contains(text(),"━") or contains(text(),"==")]]', document, null, 7, null);
for (var a = 0; a < result4.snapshotLength; a++) {
result4.snapshotItem(a).classList.add("l_yoko");
}
var result6 = document.evaluate('id("entryBody")//*[self::div or self::p][./text()=" "][not(./*)]|id("entryBody")//*[self::div or self::p][./span[./text()=" "][not(./*)]]', document, null, 7, null);
for (var c = 0; c < result6.snapshotLength; c++) {
result6.snapshotItem(c).classList.add("div_br");
}
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 div>span:empty,.skin-entryBody p>span:empty').remove();
$('.skin-entryBody div:empty,.skin-entryBody p:empty').remove();
$(".skin-entryBody").contents().filter(function () {
return this.nodeType === 3;
}).wrap("<span class='n_text'></span>");
$(".skin-entryBody div+br").wrap("<div class='div_br'></div>");
var result3 = document.evaluate('id("entryBody")/*[not(@class="div_br")][last()]', document, null, 7, null);
result3.snapshotItem(0).classList.add("node_last");
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。