Copy htmllink

    @@ -14,4 +14,5 @@ bs.position="fixed"; b.value=`<a href="${l.href}">${d.title.replace(/</g,"&lt;").replace(/>/g,"&gt;")}</a>`; d.body.appendChild(b);w,scroll(0,0);b.select(); + document.execCommand("copy"); })(window,document,location);
  • /*
     * @title Copy htmllink
     * @description 現在見ている URL を HTML形式でクリップボードにコピーします
     * @include http://*
     * @license MIT License
     * @require 
     */
    
    (function(w,d,l){
        var b=d.createElement("input"), bs=b.style;
        b.size=120;
        bs.zIndex=99999;
        bs.left=bs.top=0;
        bs.position="fixed";
        b.value=`<a href="${l.href}">${d.title.replace(/</g,"&lt;").replace(/>/g,"&gt;")}</a>`;
        d.body.appendChild(b);w,scroll(0,0);b.select();
        document.execCommand("copy");
    })(window,document,location);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2022/06/27 01:06:00 - 2022-06-27
  2. 2022/02/25 23:02:41 - 2022-02-25