15:16 dat1260115358284.jpg

05:28 Tombloo で Femo にポストするときにデフォルトで日付タグと public タグをつける

20_model.js の Femo の部分

o-

models.register({
      name: 'Femo',
      ICON: 'http://femo.jp/favicon.ico',
      POST_URL: 'http://femo.jp/create/post',
      
      check: function(ps) {
              return (/(regular|photo|quote|link|conversation|video)/).test(ps.type) && !ps.file;
      },
      
      post: function(ps) {
              return this.addMemo(ps);
      },
      
      addMemo : function(ps){
              return request(this.POST_URL, {
                      sendContent: {
                              title   : ps.item,
                              text    : joinText([ps.itemUrl, ps.body, ps.description], '\n'),
                              tagtext : joinText(ps.tags, ' '),
                      },
              });
      },
});

o-

models.register({
      name: 'Femo',
      ICON: 'http://femo.jp/favicon.ico',
      POST_URL: 'http://femo.jp/create/post',
      
      check: function(ps) {
              return (/(regular|photo|quote|link|conversation|video)/).test(ps.type) && !ps.file;
      },
      
      post: function(ps) {
              return this.addMemo(ps);
      },
      
      addMemo : function(ps){
              var tags = [].concat(ps.tags);
              if (getPref('femo.appendDateTag')) {
                      var d = new Date();
                      var dtag = d.getFullYear() + '-' + [ d.getMonth() + 1, d.getDate() ].map(function(n) {
                              return ('' + n).pad(2, '0');
                      }).join('-');
                      if (tags.indexOf(dtag) == -1) tags.push(dtag);
              }
              if (getPref('femo.appendPublicTag')) {
                      var isPrivate = false;
                      for(i=0;i<tags.length;i++) {
                              if (tags[i].match(/^private$/)) isPrivate = true;
                      }
                      if (isPrivate == false) tags.push('public');
              }
              return request(this.POST_URL, {
                      sendContent: {
                              title   : ps.item,
                              text    : joinText([ps.itemUrl, ps.body, ps.description], '\n'),
                              tagtext : joinText(tags, ' '),
                      },
              });
      },
});

あとは about:config から extensions.tombloo.femo.appendDateTag と extensions.tombloo.femo.appendPublicTag を新規作成して true にする。

タグに private と入れると public タグは付かない。

o- 参考

05:11 test_title

test_text