【Google Calendar】Googleカレンダーの背景;日曜日を赤,土曜日を青にする
Googleカレンダーの日曜日の行を赤,土曜日の行を青で表示したいときは,
Stylishで次を追加すれば良い:
(If you want to color background of Sundays for red, Saturdays for blue in Google Calendar,
you can add the following code in Stylish:)
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix("http://www.google.com/calendar/"), url-prefix("https://www.google.com/calendar/"){ /* background color for day cells; Sundays. */ div.month-row:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } div.month-row:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } div.month-row:nth-child(3) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } div.month-row:nth-child(4) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } div.month-row:nth-child(5) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } div.month-row:nth-child(6) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { background: #ffe5e5; } /* background color for day numbers; Sundays. */ div.month-row:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } div.month-row:nth-child(2) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } div.month-row:nth-child(3) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } div.month-row:nth-child(4) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } div.month-row:nth-child(5) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } div.month-row:nth-child(6) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1){ background: #ffe5e5; } /* background color for day cells; Saturdays. */ div.month-row:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(3) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(4) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(5) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(6) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } /* background color for day numbers; Saturdays. */ div.month-row:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(2) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(3) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(4) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(5) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } div.month-row:nth-child(6) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7){ background: #e5e5ff; } }
ちなみに,これは月ビューの一番左の行を赤,右の行を青にしているだけなので,「日曜始まり」かつ「月ごと」の表示にしていないと意味なし.
(Note: because this code simply color the most left to red and most right to blue in monthly-view, please use "monthly-view" and "Sundays most left view".)