/*
* @title 過去ログ見てる時に曜日で話されるとコマッチャう
* @description 日付に曜日を付加します。
* @include http://komachi.yomiuri.co.jp/*
* @license MIT License
*/
(function() {
var w = ['日', '月', '火', '水', '木', '金', '土'];
Array.prototype.forEach.call(document.querySelectorAll('td.date'), function (e) {
var n = (e.firstChild.nodeType == 3) ? e.firstChild : e.childNodes[1];
n.nodeValue = n.nodeValue.replace(
/((\d+)年(\d+)月(\d+)日)( (\d+):(\d+))/,
function(s, ymd, y, m, d, hi, h, i) {
var t = new Date(y +'/'+ m +'/'+ d + ' ' + h + ':' + i + ':00');
return(ymd + '(' + w[t.getDay()] + ')' + hi);
});
});
})();