getHTMLsource

    @@ -1,6 +1,6 @@ /* * @title getHTMLsource - * @description get selected HTML source + * @description 選択した範囲のHTMLのソースを整形して表示してくれるWEBサービスに飛ばします。 * @license MIT License */ var source = "";
  • /*
     * @title getHTMLsource
     * @description 選択した範囲のHTMLのソースを整形して表示してくれるWEBサービスに飛ばします。
     * @license MIT License
     */
    var source = "";
    if(window.getSelection){
      var con = window.getSelection().getRangeAt(0).cloneContents();
      var div = document.createElement('div');
      div.appendChild(con);
      source = div.innerHTML
    } else if(document.selection){
      source = document.selection.createRange().htmlText;
    }
    
    var form = document.createElement("form");
    form.action = "http://get-source.nog.cc/get";
    form.method = "POST";
    
    var source_input = document.createElement('input');
    source_input.type = 'hidden';
    source_input.name = 'source';
    source_input.value = source;
    form.appendChild(source_input);
    
    var title_input = document.createElement('input');
    title_input.type = 'hidden';
    title_input.name = 'title';
    title_input.value = document.title;
    form.appendChild(title_input);
    
    var url_input = document.createElement('input');
    url_input.type = 'hidden';
    url_input.name = 'url'
    url_input.value = document.location.href;
    form.appendChild(url_input);
    
    var charset_input = document.createElement('input');
    charset_input.type = 'hidden';
    charset_input.name = 'charset';
    charset_input.value = (document.charset ? document.charset : document.characterSet)
    form.appendChild(charset_input);
    
    form.submit();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/06/25 22:49:28 - 2010-06-25
  2. 2010/06/25 22:48:56 - 2010-06-25
  3. 2010/06/25 22:45:32 - 2010-06-25
  4. 2010/06/25 22:40:04 - 2010-06-25
  5. 2010/06/25 03:34:42 - 2010-06-25
  6. 2010/06/25 03:15:36 - 2010-06-25
  7. 2010/06/25 03:14:22 - 2010-06-25
  8. 2010/06/25 03:14:06 - 2010-06-25
  9. 2010/06/25 01:03:37 - 2010-06-25
  10. 2010/06/25 01:02:09 - 2010-06-25
  11. 2010/06/25 00:55:48 - 2010-06-25
  12. 2010/06/25 00:54:13 - 2010-06-25
  13. 2010/06/25 00:53:16 - 2010-06-25
  14. 2010/06/25 00:44:26 - 2010-06-25
  15. 2010/06/25 00:43:45 - 2010-06-25
  16. 2010/06/25 00:36:29 - 2010-06-25
  17. 2010/06/25 00:28:42 - 2010-06-25
  18. 2010/06/25 00:26:12 - 2010-06-25
  19. 2010/06/24 23:07:46 - 2010-06-24