getHTMLsource

    @@ -6,7 +6,7 @@ */ var source = ""; if(window.getSelection){ - con = windowt.getSelection().getRangeAt(0).cloneContents(); + con = window.getSelection().getRangeAt(0).cloneContents(); div = document.createElement('div'); div.appendChild(con); source = div.innerHTML
  • /*
     * @title getHTMLsource
     * @description get selected HTML source
     * @license MIT License
     * @private
     */
    var source = "";
    if(window.getSelection){
      con = window.getSelection().getRangeAt(0).cloneContents();
      div = document.createElement('div');
      div.appendChild(con);
      source = div.innerHTML
    } else if(document.selection){
      source = document.selection.createRange().htmlText;
    }
    alert(source);
    
    
  • 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