nishino_gamp

    @@ -60,4 +60,13 @@ result3.snapshotItem(0).classList.add("node_last"); var result4 = document.evaluate('//div[@class="entry-text"]/*[not(@class="div_br")][1]', document, null, 7, null); result4.snapshotItem(0).classList.add("node_first"); -$('.node_first').prevAll().addClass("cork"); +$('.node_first').prevAll().addClass("cork"); +$('.entry-text>a:has(amp-img),.entry-text>amp-youtube').addClass("i_pic"); +$('.div_br').not('.div_br+.div_br').each(function(){ + $(this).nextUntil(':not(.div_br)').andSelf().wrapAll('<div class="div_ren"></span>'); +}); +$('.i_pic').prev().filter('.div_ren').addClass("waku"); +$('.i_pic').next().filter('.div_ren').addClass("waku"); +$('.i_pic+.waku+.i_pic').prev().removeClass("waku"); +$('.div_ren:not(.waku)').contents().unwrap(); +$('.div_ren').removeClass("div_ren");
  • // ==UserScript==
    // @title        nishino_gamp
    // @name         nishino_gamp
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://gamp.ameblo.jp/nishino-akihiro*
    // @grant        none
    // @require      http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
    // ==/UserScript==
    var result2 = document.evaluate('//div[@class="entry-text"]//td/ancestor::*[./ancestor::div[@class="entry-text"]]', document, null, 7, null);
    for (var i = 0; i < result2.snapshotLength; i++) {
      result2.snapshotItem(i).classList.add("anc");
    }
    $('.anc').replaceWith(function () {
      return $(this).contents();
    });
    $(function () {
      do {
        $(".entry-text").children("td:lt(2)").wrapAll('<div class="tb_cell"></div>')
      } while ($(".entry-text").children("td").length);
    });
    $('.entry-text b,.entry-text i,.entry-text font,.entry-text u,.entry-text em').addClass("fbi");
    $('.fbi,.entry-text span').contents().unwrap();
    $('.entry-text a+br').remove();
    $('.entry-text div>div,.entry-text p>div,.entry-text div>p,.entry-text p>p').parent().contents().unwrap();
    $('.entry-text div:empty,.entry-text p:empty').remove();
    $('.entry-text div,.entry-text p').removeClass();
    var result5 = document.evaluate('//div[@class="entry-text"]//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, "");
        }
      }
    }
    var result6 = document.evaluate('//div[@class="entry-text"]//*[self::div or self::p][./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="entry-text"]//*[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>");
    $('.entry-text div>.div_br,.entry-text p>.div_br').parent().contents().unwrap();
    $(".entry-text").contents().filter(function () {
      return this.nodeType === 3;
    }).wrap("<span class='n_text'></span>");
    $('.entry-text span:empty').remove();
    $('.entry-text>div+br,.entry-text>p+br').wrap("<div class='div_br'></div>");
    var result8 = document.evaluate('//div[@class="entry-text"]/*[self::div or self::p][contains(text(),"━") or contains(text(),"==")]', document, null, 7, null);
    for (var a = 0; a < result8.snapshotLength; a++) {
      result8.snapshotItem(a).classList.add("l_yoko");
    }
    var result3 = document.evaluate('//div[@class="entry-text"]/*[not(@class="div_br")][last()]', document, null, 7, null);
    result3.snapshotItem(0).classList.add("node_last");
    var result4 = document.evaluate('//div[@class="entry-text"]/*[not(@class="div_br")][1]', document, null, 7, null);
    result4.snapshotItem(0).classList.add("node_first");
    $('.node_first').prevAll().addClass("cork");
    $('.entry-text>a:has(amp-img),.entry-text>amp-youtube').addClass("i_pic");
    $('.div_br').not('.div_br+.div_br').each(function(){
      $(this).nextUntil(':not(.div_br)').andSelf().wrapAll('<div class="div_ren"></span>');
    });
    $('.i_pic').prev().filter('.div_ren').addClass("waku");
    $('.i_pic').next().filter('.div_ren').addClass("waku");
    $('.i_pic+.waku+.i_pic').prev().removeClass("waku");
    $('.div_ren:not(.waku)').contents().unwrap();
    $('.div_ren').removeClass("div_ren");
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2020/07/24 14:18:14 - 2020-07-24
  2. 2020/01/31 08:39:58 - 2020-01-31
  3. 2020/01/10 10:58:04 - 2020-01-10
  4. 2019/11/23 08:25:38 - 2019-11-23
  5. 2019/11/17 11:10:38 - 2019-11-17
  6. 2019/11/17 11:06:40 - 2019-11-17
  7. 2019/11/16 15:48:51 - 2019-11-16
  8. 2019/11/15 11:18:37 - 2019-11-15
  9. 2019/06/29 09:22:23 - 2019-06-29
  10. 2019/06/25 20:57:20 - 2019-06-25
  11. 2019/06/21 10:13:24 - 2019-06-21
  12. 2019/05/08 14:51:11 - 2019-05-08
  13. 2019/05/08 14:50:02 - 2019-05-08
  14. 2019/05/08 14:35:02 - 2019-05-08
  15. 2019/05/08 14:32:23 - 2019-05-08
  16. 2019/05/03 10:05:14 - 2019-05-03
  17. 2019/05/03 10:04:25 - 2019-05-03
  18. 2019/05/02 10:44:44 - 2019-05-02
  19. 2019/05/02 10:44:10 - 2019-05-02
  20. 2019/05/02 08:30:04 - 2019-05-02
  21. 2019/05/02 08:29:20 - 2019-05-02
  22. 2019/04/22 11:58:29 - 2019-04-22
  23. 2019/04/20 11:22:21 - 2019-04-20
  24. 2019/04/20 11:11:53 - 2019-04-20
  25. 2019/04/19 13:28:04 - 2019-04-19
  26. 2019/04/18 10:06:19 - 2019-04-18
  27. 2019/04/16 10:06:20 - 2019-04-16
  28. 2019/04/11 10:46:35 - 2019-04-11
  29. 2019/04/10 12:30:52 - 2019-04-10
  30. 2019/04/10 11:54:57 - 2019-04-10
  31. 2019/04/10 10:25:46 - 2019-04-10
  32. 2019/04/09 11:55:41 - 2019-04-09
  33. 2019/04/03 11:20:13 - 2019-04-03
  34. 2019/04/03 11:19:21 - 2019-04-03
  35. 2019/04/03 10:50:40 - 2019-04-03
  36. 2019/03/30 09:48:53 - 2019-03-30
  37. 2019/03/29 08:20:06 - 2019-03-29
  38. 2019/03/27 10:53:53 - 2019-03-27
  39. 2019/03/27 10:45:11 - 2019-03-27
  40. 2019/03/24 21:59:02 - 2019-03-24
  41. 2019/03/24 21:53:44 - 2019-03-24
  42. 2019/03/24 21:53:11 - 2019-03-24