# Copyright (C) 2013 Alex Schroeder # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . use strict; use v5.10; use utf8; AddModuleDescription('toc-js.pl', 'Javascript Table of Contents Extension'); our ($HtmlHeaders, @MyInitVariables); our ($TocOutlineLibrary); $TocOutlineLibrary = 'http://h5o.googlecode.com/files/outliner.0.5.0.62.js'; # Add the dojo script to edit pages. push (@MyInitVariables, \&TocScript); sub TocScript { # cookie is not initialized yet so we cannot use GetParam # Cross browser compatibility: http://www.tek-tips.com/faqs.cfm?fid=4862 # HTML5 Outlines: http://blog.tremily.us/posts/HTML5_outlines/ # Required library: http://code.google.com/p/h5o/ if (GetParam('action', 'browse') eq 'browse') { $HtmlHeaders .= qq{ }; } }