Now playing さんを軽くする

    @@ -8,10 +8,10 @@ (( d = document, - target = d.querySelector('.columns-area') || d.body, - r = ({ target }, x, i, n = null) => { + t = _ => d.querySelector('.columns-area') || d.body, + r = (s, x, i, n = null) => { - x = d.evaluate('.//div[@class="status__info"][./a[@data-id="3646"]]/following-sibling::div[contains(@class,"widget")]', target, n, 6, n); + x = d.evaluate('.//div[@class="status__info"][./a[@data-id="3646"]]/following-sibling::div[contains(@class,"widget")]', t(), n, 6, n); for (i = 0; i < x.snapshotLength; i++) { @@ -27,9 +27,9 @@ } ) => ( -new MutationObserver(s => s.forEach(r)).observe(target, { +new MutationObserver(r).observe(t(), { childList: 1, subtree: 1 -}), r({ target }) +}), r() -))(); +))();
  • /*
     * @title Now playing さんを軽くする
     * @description @now_playing@music.pawoo.net の埋め込みだけ除去します。
     * @include https://music.pawoo.net/web/*
     * @license MIT License
     * @javascript_url
     */
    
    ((
     d = document,
     t = _ => d.querySelector('.columns-area') || d.body,
     r = (s, x, i, n = null) => {
    
    	x = d.evaluate('.//div[@class="status__info"][./a[@data-id="3646"]]/following-sibling::div[contains(@class,"widget")]', t(), n, 6, n);
    
    	for (i = 0; i < x.snapshotLength; i++) {
    
    		n = x.snapshotItem(i);
    		// これしないとスクロールがガッタガタになる
    		n.style.height = n.scrollHeight + 'px';
    		// booth のは完全に消すと復活するからジャケット部分だけ消す
    		if (n.firstChild) n.removeChild(n.firstChild);
    		n.className = 'removed';
    
    	}
    
     }
    ) => (
    
    new MutationObserver(r).observe(t(), {
     childList: 1,
     subtree: 1
    }), r()
    
    ))();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/08/06 23:24:24 - 2017-08-06
  2. 2017/06/25 22:51:13 - 2017-06-25
  3. 2017/06/23 20:36:28 - 2017-06-23
  4. 2017/06/23 16:46:05 - 2017-06-23