no title [bookmarklet]

  • javascript: (
        function () {
            const USER = "assout";
            const REPO = "dotfiles";
            const BRANCH = "master";
            const FILE = "";
            var user = prompt('user (default : ' + USER + ')');
            if (user == null) {
                return false;
            } else if (user == "") {
                user = USER;
            }
            var repo = prompt('repository (default : ' + REPO + ')');
            if (repo == null) {
                return false;
            } else if (repo == "") {
                repo = REPO;
            }
            var branch = prompt('branch (default : ' + BRANCH + ')');
            if (branch == null) {
                return false;
            } else if (branch == "") {
                branch = BRANCH;
            }
           var file = prompt('file (default : ' + BRANCH + ')');
            if (file == null) {
                return false;
            } else if (file == "") {
                file = FILE;
            }
            window.location.href = "https://raw.github.com/" + user+ "/" + repo + "/" + branch + "/" + file;
        })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/04/20 18:33:21 - 2014-04-20