jQueryã£ã¦å大ã ãª
ã¨ããããã§ãtwitjst:Twitterの時刻表示を○年○月○日(△) ×時×分×秒にするユーザサイドスクリプト&ブックマークレット - 風柳メモã§ã¯å¤§ãããªãã¨ãã£ã¦ã¾ãããããã調ã¹ãã¨å¤é¨ã¹ã¯ãªããèªã¿è¾¼ã¿ããªãæ¸ãããã¨ãå¤æã
javascript:(function(C){updateTimeAgo=function(){setTimeout(C,100)};C()})(function(W,B,T){W='æ¥æç«æ°´æ¨éå';$(".timestamp").each(function(){B=$(this);T=new Date(Date.parse(B.meta().time.replace(/([+\-])/,'UTC$1')));if(T&&B.find("*").length==0){B.html(T.getFullYear()+'å¹´'+(1+T.getMonth())+'æ'+T.getDate()+'æ¥('+W.substr(T.getDay(),1)+') '+T.getHours()+'æ'+T.getMinutes()+'å'+T.getSeconds()+'ç§')}})})
ããã¯ãã¼ã¯ã¬ããå®è¡å¾ã¯ãããã£ã¨èªãããæ¼ãã¦ç¶ã足ããããã¼ã¸ã§ãã¡ããã¨å¤æãããããã«ãªãã¾ã(AutoPagerize対å¿ã¾ã§ã¯ãã£ã¦ã¾ãã)ã
追è¨
ã¡ãã£ã¨å¹çåï¼AutoPagerizeç³»ã«å¯¾å¿ããç(ãã ãwindow.AutoPagerizeãå¤ããè¦ããªãã¨ã ããªã®ã§ãæ¬å®¶Firefoxçãªã©ã¯NGï¼ã
javascript:(function(C,U){C();U=updateTimeAgo=function(){setTimeout(C,100)};if(window.AutoPagerize)AutoPagerize.addDocumentFilter(U)})(function(W,B,T){W='æ¥æç«æ°´æ¨éå'.split('');$("#content span.timestamp:not(.done)").each(function(){this.className+=' done';B=$(this);T=new Date(Date.parse(B.meta().time.replace(/([+\-])/,'UTC$1')));if(T)B.html(T.getFullYear()+'å¹´'+(1+T.getMonth())+'æ'+T.getDate()+'æ¥('+W[T.getDay()]+') '+T.getHours()+'æ'+T.getMinutes()+'å'+T.getSeconds()+'ç§')})})
ã¦ã¼ã¶ãµã¤ãã¹ã¯ãªãã
Firefoxç¨ã«ãGreasemonkeyçã
ãããã前回の記事ã®ã¯å¥ã«JSTã«ãããããããªã(localetimeã«ãªãã¨æããå¤å)ã®ã§ãååããããã£ããªããã¾ãããããã