!link

  • /*
     * @title !link
     * @description toggle enable/disable links by CSS
     * @include http://*
     * @include https://*
     * @license MIT License http://opensource.org/licenses/MIT
     * @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-x4-VhvKdWA
     * @contributor rikuba http://let.hatelabo.jp/rikuba/let/gYC-y5Ca8MWVPg (Fork of)
     * @author      noromanba http://flavors.me/noromanba
     * @require 
     */
    
    // TODO toggle UI, state into a closure
    (function (doc) {
        var parent = doc.head || doc.body || doc.documentElement;
        var id = 'bookmarklet-disable-link';
        var style;
        if (!(style = doc.getElementById(id))) {
            style = doc.createElement('style');
            style.id = id;
            style.charset = 'utf8';
            parent.appendChild(style);
        }
    
        if (style.textContent) {
            style.textContent = '';
            return;
        }
        // TODO ignore anchor of hasn't textnode e.g. <a href="/"><img></a>
        style.textContent = [
            'a[href] {',
                'pointer-events: none;',
                'outline-style: dotted;',
                'outline-width: 1px;',
                'outline-color: invert;',
            '}'
        ].join('\n');
    })(document);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/02/04 04:41:57 - 2013-02-04
  2. 2013/02/04 04:40:44 - 2013-02-04
  3. 2013/02/04 04:34:27 - 2013-02-04
  4. 2013/02/03 11:47:29 - 2013-02-03
  5. 2013/01/29 10:50:24 - 2013-01-29
  6. 2013/01/29 10:46:34 - 2013-01-29
  7. 2013/01/29 10:42:34 - 2013-01-29
  8. 2013/01/29 10:42:22 - 2013-01-29
  9. 2013/01/29 10:42:19 - 2013-01-29