Skip to content

Instantly share code, notes, and snippets.

@azu
Created June 4, 2010 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/425452 to your computer and use it in GitHub Desktop.
Save azu/425452 to your computer and use it in GitHub Desktop.
30分ごとにLDRの未読数を表示するNilScript
// ==NilScript==
// @name LDRUnreadCounter
// @namespace http://efcl.info/
// @description 30分ごとにLDRの未読数を表示する。
// @author azu
// @twitter https://twitter.com/azu_re
// ==/NilScript==
var userName = "";
// アイコンを作成
Main.createNotifyIcon();
// Timer.runが最初に実行されるのは指定時間後
var timer=new Timer((function(){
updateLDRunread();
}) ,1800*1000);// 30分
timer.run();
// 一回目
updateLDRunread();
function updateLDRunread(){
try{
var LDR = require("HTTP").HTTP.getText("http://rpc.reader.livedoor.com/notify?user="+userName);
LDR = LDR.replace("|","","g");
Main.notifyIcon.text = LDR;
}catch(e){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment