crowy 未読解除
by
den2sn
2011-10-07 [2011/10/07 11:56:20]
crowy に未読解除ボタンを配置します。 #crowy
/*
* @title crowy 未読解除
* @description crowy に未読解除ボタンを配置します。 #crowy
* @include http://www.crowy.net*
* @license MIT License
* @require
*/
(function(){
function setHover() {
this.className = this.className + " ui-state-hover";
}
function delHover() {
this.className = this.className.substring(0, this.className.length - 15);
}
var button = document.createElement('a');
button.setAttribute('href', 'javascript:$(\'.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 buttons = document.getElementById('command-menu').firstChild.nextSibling;
buttons.appendChild(button);
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。