+B!

    @@ -5,17 +5,26 @@ * @include https://* * @contributor dankogai http://let.hatelabo.jp/dankogai/let/gYC-xpO_j7qpDw * @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-y5_1hrbuWA (Fork of) - * @author noromanba - * @license MIT License http://opensource.org/licenses/MIT + * @license MIT License http://opensource.org/licenses/MIT * @javascript_url */ -// via http://nyaos.org/d/index.cgi?p=%282013.02.16%29#p1 -(function () { - // canonicalize for https; e.g. https://www.youtube.com/watch?v=OKOrkLxOBoY - //* - var url = (document.head.querySelector('link[href][rel=canonical]') || {}).href || location.href; - //*/ +// for view/append c.f. +// http://let.hatelabo.jp/noromanba/let/gYC-y5_1hrbuWA + +// via +// http://nyaos.org/d/index.cgi?p=%282013.02.16%29#p1 + +// side-effect; fragment due to canonical +(() => { + // https://gist.github.com/noromanba/d730ccf3ae5e6916cd60 + // https://gist.github.com/noromanba/3705f2e9ebb8538328b2f3f9a6f1a9b3 + const canonical = () => { + return (document.querySelector('head meta[property="og:url"][content]') || {}).content || + (document.querySelector('head link[rel="canonical"][href]') || {}).href || + location.href; + }; + const url = canonical(); window.open('http://b.hatena.ne.jp/my/add.confirm?url=' + url, '_blank'); })();
  • /*
     * @title +B!
     * @description add Hatena::Bookmark in new tab/window
     * @include http://*
     * @include https://*
     * @contributor dankogai  http://let.hatelabo.jp/dankogai/let/gYC-xpO_j7qpDw
     * @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-y5_1hrbuWA (Fork of)
     * @license MIT License   http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // for view/append c.f.
    // http://let.hatelabo.jp/noromanba/let/gYC-y5_1hrbuWA
    
    // via
    // http://nyaos.org/d/index.cgi?p=%282013.02.16%29#p1
    
    // side-effect; fragment due to canonical
    (() => {
        // https://gist.github.com/noromanba/d730ccf3ae5e6916cd60
        // https://gist.github.com/noromanba/3705f2e9ebb8538328b2f3f9a6f1a9b3
        const canonical = () => {
            return (document.querySelector('head meta[property="og:url"][content]') || {}).content ||
                (document.querySelector('head link[rel="canonical"][href]') || {}).href ||
                location.href;
        };
        const url = canonical();
    
        window.open('http://b.hatena.ne.jp/my/add.confirm?url=' + url, '_blank');
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/02/19 18:25:42 - 2017-02-19
  2. 2016/05/27 05:24:15 - 2016-05-27
  3. 2013/09/26 02:13:54 - 2013-09-26
  4. 2013/05/10 01:07:26 - 2013-05-10
  5. 2013/05/10 00:59:06 - 2013-05-10