ʕ•ᴥ•ʔ wall

    @@ -7,8 +7,33 @@ * @javascript_url */ +// e.g. +// http://anond.hatelabo.jp/ +// http://qiita.com/ (function () { - var style = document.body.style; - style.backgroundImage = 'url(http://bkuma.hatena.ne.jp/images/girls/entry_default_image.png)'; - style.backgroundRepeat = 'repeat'; + var addStyle = (function () { + var parent = document.head || document.body || document.documentElement; + + var style = document.createElement('style'); + style.type = 'text/css'; + parent.appendChild(style); + + return function (css) { + style.appendChild(document.createTextNode(css + '\n')); + }; + })(); + + var selector = [ + 'body', + '#body', + //'.body', + '.hatena-body' + ].join(); + + addStyle([ + selector, + '{', + 'background-image: url(http://bkuma.hatena.ne.jp/images/girls/entry_default_image.png);', + '}' + ].join('\n')); })();
  • /*
     * @title B!KUMA wall
     * @description B!KUMA wall on the whole world
     * @include http://*
     * @include https://*
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // e.g.
    // http://anond.hatelabo.jp/
    // http://qiita.com/
    (function () {
        var addStyle = (function () {
            var parent = document.head || document.body || document.documentElement;
    
            var style = document.createElement('style');
            style.type = 'text/css';
            parent.appendChild(style);
    
            return function (css) {
                style.appendChild(document.createTextNode(css + '\n'));
            };
        })();
    
        var selector = [
            'body',
            '#body',
            //'.body',
            '.hatena-body'
        ].join();
    
        addStyle([
            selector,
            '{',
            'background-image: url(http://bkuma.hatena.ne.jp/images/girls/entry_default_image.png);',
            '}'
        ].join('\n'));
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/12/17 03:40:23 - 2014-12-17
  2. 2014/12/04 07:05:13 - 2014-12-04
  3. 2014/12/04 06:49:16 - 2014-12-04
  4. 2014/12/04 05:43:32 - 2014-12-04