File: day2section.rb

package info (click to toggle)
tdiary-contrib 5.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,576 kB
  • ctags: 1,957
  • sloc: ruby: 16,900; lisp: 514; xml: 451; php: 61; sql: 40; sh: 35; makefile: 33
file content (20 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# day2section.rb - tDiary plugin
#
# When a visitor accesses to day page without section anchor, navigate to first section.
#
# Copyright (c) MATSUOKA Kohei <http://www.machu.jp/>
# Distributed under the GPL
#
add_footer_proc do
	if @mode == 'day'
		<<-SCRIPT
		<script type="text/javascript">
		if(!location.hash) {
			location.replace(location.hash + "#p01");
		}
		</script>
		SCRIPT
	end
end