irc submit

    @@ -5,7 +5,6 @@ * @include https://* * @license MIT License http://nrm.mit-license.org/2012 * @require http://code.jquery.com/jquery-2.0.3.min.js - * @private */ (function() {
  • /*
     * @title irc submit
     * @description test
     * @include http://*
     * @include https://*
     * @license MIT License http://nrm.mit-license.org/2012
     * @require http://code.jquery.com/jquery-2.0.3.min.js
     */
    
    (function() {
      $.ajax({
        url: "https://www.kmc.gr.jp/irclog/ircweb.pl"
      }).done(function(data) {
        var data = $("<div>").html(data),
          channels = $("<div>").css({
            background: "gray",
            width: 300,
            padding: 10,
            margin: "0 auto"
          }).appendTo(
            $("<div>")
            .css({
              position: "absolute",
              top: 10,
              left: 0,
              width: "100%"
            }).appendTo("body")
          );
    
        data.find("a").filter(function() {
          return $(this).attr("href").match(/^\?channel/);
        }).css({
          display: "block"
        }).click(function() {
          var body = prompt("発言内容:"),
            channel = $(this).attr("href").match(/^\?channel=(.*)/)[1];
    
          $.ajax({
            url: "https://www.kmc.gr.jp/irclog/ircweb.pl",
            type: "POST",
            data: {
              channel: decodeURIComponent(channel),
              body: body
            }
          });
    
          return false;
        }).appendTo(channels);
      });
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/07/16 21:37:43 - 2013-07-16
  2. 2013/07/16 21:16:36 - 2013-07-16
  3. 2013/07/16 21:15:15 - 2013-07-16
  4. 2013/07/16 21:04:20 - 2013-07-16
  5. 2013/07/16 21:01:42 - 2013-07-16
  6. 2013/07/16 20:50:59 - 2013-07-16
  7. 2013/07/16 20:49:48 - 2013-07-16
  8. 2013/07/16 20:34:49 - 2013-07-16
  9. 2013/07/16 20:34:15 - 2013-07-16
  10. 2013/07/16 20:32:46 - 2013-07-16
  11. 2013/07/16 20:26:39 - 2013-07-16
  12. 2013/07/16 20:15:33 - 2013-07-16