crowy 未読解除

    @@ -8,19 +8,24 @@ (function(){ function setHover() { - this.className = this.className + " ui-state-hover"; + this.style.color = '#666'; } function delHover() { - this.className = this.className.substring(0, this.className.length - 15); + this.style.color = '#444'; } - var button = document.createElement('a'); - button.setAttribute('href', 'javascript:(function(){$(\'.new-count\').click()})()'); - button.setAttribute('class', 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only'); - button.setAttribute('role', 'button'); - button.innerHTML = '<span class="ui-button-text">既読</span>'; - button.addEventListener('mouseover', setHover, true); - button.addEventListener('mouseout', delHover, true); + var link = document.createElement('a'); + link .setAttribute('href', 'javascript:(function(){$(\'.new-count\').click()})()'); + link .setAttribute('style', 'text-decoration: none; height: 16px; color: #444; text-shadow: 0 1px 0 white; line-height: 37px;'); + link.innerHTML = '既読'; + link.addEventListener('mouseover', setHover, true); + link.addEventListener('mouseout', delHover, true); - var buttons = document.getElementById('command-menu').firstChild.nextSibling; + var button = document.createElement('div'); + button.setAttribute('id', 'reset-count'); + button.setAttribute('style', 'float: left; height: 37px; font-size: 12px; font-weight: bolder; line-height: 100%; margin: 0 8px; position: relative;'); + button.setAttribute('title', '既読'); + button.appendChild(link); + + var buttons = document.getElementById('tab-tool-bar'); buttons.appendChild(button); })();
  • /*
     * @title crowy 未読解除
     * @description crowy に未読解除ボタンを配置します。 #crowy
     * @include http://www.crowy.net*
     * @license MIT License
     * @require 
     */
    
    (function(){
      function setHover() {
        this.style.color = '#666';
      }
      function delHover() {
        this.style.color = '#444';
      }
      var link = document.createElement('a');
      link .setAttribute('href', 'javascript:(function(){$(\'.new-count\').click()})()');
      link .setAttribute('style', 'text-decoration: none; height: 16px; color: #444; text-shadow: 0 1px 0 white; line-height: 37px;');
      link.innerHTML = '既読';
      link.addEventListener('mouseover', setHover, true);
      link.addEventListener('mouseout', delHover, true);
    
      var button = document.createElement('div');
      button.setAttribute('id', 'reset-count');
      button.setAttribute('style', 'float: left; height: 37px; font-size: 12px; font-weight: bolder; line-height: 100%; margin: 0 8px; position: relative;');
      button.setAttribute('title', '既読');
      button.appendChild(link);
    
      var buttons = document.getElementById('tab-tool-bar');
      buttons.appendChild(button);
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2011/10/07 11:56:20 - 2011-10-07
  2. 2011/10/07 11:51:41 - 2011-10-07
  3. 2011/10/07 11:50:08 - 2011-10-07
  4. 2011/10/07 11:47:30 - 2011-10-07
  5. 2011/10/07 11:45:26 - 2011-10-07
  6. 2011/10/07 11:44:50 - 2011-10-07
  7. 2011/10/07 11:43:53 - 2011-10-07
  8. 2011/10/07 11:42:46 - 2011-10-07
  9. 2011/10/07 11:42:11 - 2011-10-07
  10. 2011/10/07 11:37:51 - 2011-10-07
  11. 2011/10/07 11:37:16 - 2011-10-07
  12. 2011/10/07 11:36:53 - 2011-10-07
  13. 2011/10/07 11:36:17 - 2011-10-07
  14. 2011/10/07 09:59:50 - 2011-10-07
  15. 2011/08/03 11:35:01 - 2011-08-03
  16. 2011/03/18 12:26:30 - 2011-03-18