initial B

    @@ -9,19 +9,22 @@ // ready to use @run-at document-start -(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')); - }; - })(); - - addStyle(' body { font-size: initial !important; font-family: initial !important; }'); +// TBD extract content javascript +// https://github.com/hatena/extract-content-javascript +// http://let.hatelabo.jp/noromanba/let/gYC-yoLNt8-ANg +(() => { + 'use strict'; + + const wall = document.head || document.body; + + wall.append(Object.assign(document.createElement('style'), { + charset: 'utf-8', + textContent: [ + '* {', + 'font-size: initial !important;', + 'font-family: initial !important;', + '}', + ].join('\n'), + })); })();
  • /*
     * @title initial B
     * @description reset font size/family
     * @include http://*
     * @include https://*
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // ready to use @run-at document-start
    
    // TBD extract content javascript
    // https://github.com/hatena/extract-content-javascript
    // http://let.hatelabo.jp/noromanba/let/gYC-yoLNt8-ANg
    (() => {
        'use strict';
    
        const wall = document.head || document.body;
    
        wall.append(Object.assign(document.createElement('style'), {
            charset: 'utf-8',
            textContent: [
                '* {',
                    'font-size: initial !important;',
                    'font-family: initial !important;',
                '}',
            ].join('\n'),
        }));
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/07/19 05:25:10 - 2018-07-19
  2. 2015/10/18 11:33:22 - 2015-10-18