Hatena::Let self fork

    @@ -1,16 +1,19 @@ /* - * @title addforklink - * @description Add a fork link in my bookmarklet page of hatena::let (for userscript) + * @title Hatena::Let Selffork + * @description supply self-fork on Hatena::Let (useable as userscript) * @include http://let.hatelabo.jp/* - * @license MIT License + * @contributor taizooo http://let.hatelabo.jp/taizooo/let/gYC-ydPttrvedg (Fork of) + * @author noromanba + * @license MIT License http://opensource.org/licenses/MIT */ (function () { - a = document.querySelector("a.edit-link[href*='let.edit']"); + var a = document.querySelector("a.edit-link[href*='let.edit']"); if (!a) return; - b = a.cloneNode(); + + var b = a.cloneNode(); b.href = a.href.replace("edit", "fork"); b.textContent = "Fork"; - //a.parentNode.insertBefore(b, a.nextSibling); - a.parentNode.insertBefore(b); -})() + // Fx must be needs 2nd args c.f. https://developer.mozilla.org/en/DOM/element.insertBefore + a.parentNode.insertBefore(b, null); +})();
  • /*
     * @title Hatena::Let Selffork
     * @description supply self-fork on Hatena::Let (useable as userscript)
     * @include http://let.hatelabo.jp/*
     * @contributor taizooo     http://let.hatelabo.jp/taizooo/let/gYC-ydPttrvedg (Fork of)
     * @author      noromanba
     * @license MIT License http://opensource.org/licenses/MIT
     */
    
    (function () {
      var a = document.querySelector("a.edit-link[href*='let.edit']");
      if (!a) return;
    
      var b = a.cloneNode();
      b.href = a.href.replace("edit", "fork");
      b.textContent = "Fork";
      // Fx must be needs 2nd args c.f. https://developer.mozilla.org/en/DOM/element.insertBefore
      a.parentNode.insertBefore(b, null);
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/03/03 03:39:31 - 2017-03-03
  2. 2017/03/02 07:58:50 - 2017-03-02
  3. 2017/03/02 07:48:56 - 2017-03-02
  4. 2013/03/19 06:16:47 - 2013-03-19
  5. 2013/03/19 06:14:01 - 2013-03-19
  6. 2013/03/19 05:57:38 - 2013-03-19