aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteramako2008-07-30 09:41:54 +0000
committerteramako2008-07-30 09:41:54 +0000
commiteb94a9a991615871df424208f43e4a74d9a5c191 (patch)
tree253c50a96eeb06eca5448498938f922f8dcfcbd1
parenta611448eb65bc4743022fe665a922260dff909ea (diff)
downloadvimperator-plugins-eb94a9a991615871df424208f43e4a74d9a5c191.tar.bz2
エンコード失敗したorz
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@16876 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--ldr_unread_counter.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/ldr_unread_counter.js b/ldr_unread_counter.js
index 0288afe..e1564bb 100644
--- a/ldr_unread_counter.js
+++ b/ldr_unread_counter.js
@@ -2,14 +2,14 @@
* ==VimperatorPlugin==
* @name LDR unread counter
* @description Display unread count of LDR to statusbar
- * @description-ja ơСLDR̤ɷɽ
+ * @description-ja ステータスバーにLDRの未読件数を表示
* @version 0.1a
* @author teramako teramako@gmail.com
* ==/VimperatorPlugin==
*
- * ޤǽ
+ * まず最初に
* let livedoor_id = "<livedoor ID>"
- * ȥ桼IDꤷƤ
+ * とユーザIDを設定してください。
*/
liberator.plugins.ldrUnreadCounter = (function(){
@@ -45,7 +45,7 @@ function createStatusButton(){
for (var name in attrs) elm.setAttribute(name, attrs[name]);
return elm;
}
- // FIXME: onclickLDR򳫤褦׽
+ // FIXME: onclick時にLDRを開くように要修正
statusPanel = createElement("statusbarpanel", {
id: "ldr_unread_count_panel",
tooltiptext: "Count: " });
@@ -55,7 +55,7 @@ function createStatusButton(){
},"http://www.w3.org/1999/xhtml");
statusPanel.appendChild(canvas);
- // Iconǽ褬Ƥ
+ // Iconだけ最初に描画がしておく
var ctx = canvas.getContext("2d");
icon_image.onload=function(){ ctx.drawImage(icon_image,0,0); };
//ctx.drawImage(icon_image,0,0);
@@ -77,22 +77,22 @@ function updateCanvasCount(count){
ctx.clearRect(0,0,24,16);
ctx.save();
- // LDR Icon
+ // LDR Icon の描画
ctx.drawImage(icon_image,0,0);
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var len = ctx.mozMeasureText(count);
- // ̤ɷطʤŤ
- // XXX: äɤ罸
+ // 未読件数の背景を暗くする
+ // XXX: もっと良い色募集
ctx.save();
ctx.fillStyle = "rgba(48,48,48,0.75)";
ctx.fillRect(width-len-1,4,len+1,12);
ctx.restore();
- // ̤ɷ
- // XXX: äɤ罸
+ // 未読件数の描画
+ // XXX: もっと良い色募集
ctx.fillStyle = "Cyan";
ctx.mozTextStyle = "12px sans-serif";
ctx.translate(width - len-1 ,height-1);
@@ -107,7 +107,7 @@ function canvasDrawStop(){
ctx.clearRect(0,0,24,16);
ctx.drawImage(icon_image,0,0);
ctx.save();
- //ػߥޡ
+ //禁止マークの描画
ctx.strokeStyle = "Red";
ctx.lineWidth = "2";
ctx.beginPath();
@@ -175,7 +175,7 @@ var manager = {
start: function(){
if (!this.user_id) {
liberator.echoerr("LDR Unread Counter: Please :let "+ userIdName + " = <livedoor ID>");
- // FIXME: ʤ󤫥顼Ф롣ɤʬ
+ // FIXME: なんかエラーが出る。原因が良く分からん
//this.stop();
return;
}