ヤフオクの取引ナビ(ベータ版)からクリックポスト用データをコピーする

  • /*
     * @title ヤフオクの取引ナビ(ベータ版)からクリックポスト用データをコピーする
     * @description 「クリックポストの新規発送フォームを一括入力する」と合わせて使用してください
     *
     * ヤフオクの取引ナビベータ版のページで実行すると、プロンプトウィンドウが開きます。
     * 「オークションタイトル,郵便番号(上3桁),郵便番号(下4桁),住所,名前,電話番号」
     * といった形式のテキストが表示されていますので、コピーしてください。
     * タイトルと住所はクリックポスト用に整形しています。
     * タイトル: 半角英数を全角に置き換え、15文字以上は切り捨て
     * 住所: 半角英数を全角に置き換え
     * 
     * クリックポストの新規発送ページに移動後、
     * 「クリックポストの新規発送フォームを一括入力する」
     * http://let.hatelabo.jp/mitsube/let/hJmf08Ws8scO
     * を実行し、コピーしていたものをペーストしてください。
     * 
     * @include https://contact.auctions.yahoo.co.jp/seller/*
     * @license MIT License
     * @javascript_url
     */
    
    // (function(){
    
    //         var table = [];
    //         var i, prmpt;
    
    //         String.prototype.capitalize = function(){
    //                 return this.replace(/[A-Za-z0-9\-]/g, function(s) {
    //                         return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);
    //                 }).replace(/ /g,"");
    //         };
    
    
    //         $('.decCnfWr').each(function(i){
    //                 table.push($(this).text());
    //         });
    
    //         function isClickpost(index_clickpost){
    //                 return table[index_clickpost].indexOf('クリックポスト') === 0;
    //         }
    
    //         if( isClickpost(6) ) {
    //                 i = 1;
    //         } else if ( isClickpost(5) ) {
    //                 i = 0;
    //         }else{
    //                 alert('error!');
    //                 return;
    //         }
    
    //         var bidder = [
    //                 $('.decItmName').text().capitalize().substr(0,15),      // print_title
    //                 table[i+2].substr(1,3),   // zip1
    //                 table[i+2].substr(4,4),   // zip2
    //                 table[i+3].capitalize().paragraph(),    // reciver_adress
    //                 table[i+1],       // receiver_name
    //                 table[i+4],       // receiver_phone
    
    //         ];
            
    //         prmpt = prompt('コピーしてください',bidder.toString());
    //         console.log();
    //         if( prmpt !== null ){
    //                 document.location.href = "//click-post.secure.force.com/";
    //         }
    
    // })();
    
    !function(){function t(t){return 0===n[t].indexOf("クリックポスト")}var r,e,n=[];if(String.prototype.capitalize=function(){return this.replace(/[A-Za-z0-9\-]/g,function(t){return String.fromCharCode(t.charCodeAt(0)+65248)}).replace(/ /g,"")},$(".decCnfWr").each(function(t){n.push($(this).text())}),t(6))r=1;else{if(!t(5))return void alert("error!");r=0}var o=[$(".decItmName").text().capitalize().substr(0,15),n[r+2].substr(1,3),n[r+2].substr(4,4),n[r+3].capitalize().paragraph(),n[r+1],n[r+4]];e=prompt("コピーしてください",o.toString()),console.log(),null!==e&&(document.location.href="//click-post.secure.force.com/")}();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2016/03/08 16:15:50 - 2016-03-08
  2. 2015/08/13 13:48:42 - 2015-08-13
  3. 2015/08/05 14:07:03 - 2015-08-05
  4. 2015/08/05 13:44:55 - 2015-08-05
  5. 2015/08/04 17:20:52 - 2015-08-04
  6. 2015/07/23 14:24:45 - 2015-07-23
  7. 2015/07/23 14:23:57 - 2015-07-23
  8. 2015/07/23 14:18:01 - 2015-07-23
  9. 2015/07/23 14:17:08 - 2015-07-23
  10. 2015/07/23 14:15:39 - 2015-07-23
  11. 2015/07/23 14:14:03 - 2015-07-23
  12. 2015/07/23 14:12:51 - 2015-07-23
  13. 2015/07/23 13:56:25 - 2015-07-23
  14. 2015/07/17 23:41:01 - 2015-07-17
  15. 2015/07/17 23:33:48 - 2015-07-17
  16. 2015/07/17 23:32:28 - 2015-07-17
  17. 2015/07/17 23:19:59 - 2015-07-17
  18. 2015/07/17 22:41:53 - 2015-07-17
  19. 2015/07/17 22:38:44 - 2015-07-17
  20. 2015/07/17 22:36:05 - 2015-07-17