+A

    @@ -1,6 +1,6 @@ /* * @title +A - * @description add page to Hatena Antenna + * @description add page to Hatena Antenna in new tab/window * @include http://* * @include https://* * @contributor Hatena http://www.hatena.ne.jp/tool/bookmarklet#scripts @@ -9,5 +9,13 @@ */ (function () { - location.href = 'http://a.hatena.ne.jp/append?' + encodeURIComponent(location.href); + // canonicalize c.f. + // http://let.hatelabo.jp/noromanba/let/hLHVzOTQjfYH + var canonical = (document.head.querySelector('meta[property="og:url"][content]') || {}).content || + (document.head.querySelector('link[rel="canonical"][href]') || {}).href || + location.href; + + var antenna = 'http://a.hatena.ne.jp/append?' + encodeURIComponent(canonical); + window.open(antenna, '_blank'); })(); +
  • /*
     * @title +A
     * @description add page to Hatena Antenna in new tab/window
     * @include http://*
     * @include https://*
     * @contributor Hatena  http://www.hatena.ne.jp/tool/bookmarklet#scripts
     * @license MIT License http://developer.hatena.ne.jp/ja/license art. 2(4)
     * @javascript_url
     */
    
    (function () {
        // canonicalize c.f.
        // http://let.hatelabo.jp/noromanba/let/hLHVzOTQjfYH
        var canonical = (document.head.querySelector('meta[property="og:url"][content]') || {}).content ||
            (document.head.querySelector('link[rel="canonical"][href]') || {}).href ||
            location.href;
    
        var antenna = 'http://a.hatena.ne.jp/append?' + encodeURIComponent(canonical);
        window.open(antenna, '_blank');
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/02/03 02:33:00 - 2015-02-03
  2. 2014/08/24 07:28:51 - 2014-08-24
  3. 2014/08/24 03:03:07 - 2014-08-24
  4. 2014/08/24 02:55:20 - 2014-08-24
  5. 2014/08/24 02:54:22 - 2014-08-24