wiki:FlexJsPlugin

Flexible JavaScript inclusions for Trac

Description

This is a plugin that allows you to specify system-wide, per-project and/or external JavaScript files to be included in your Trac pages.

Once installed, add the following section to your trac.ini:

[flexjs]
global = 
ext = 
local =

For each section, you may specify a comma-separated list of JavaScript files. They will be included in the order they are specified.

  • For global JavaScript files, you should create a directory named flex in your chrome/common/js directory, which is typically /usr/share/trac/htdocs/js.
  • For local JavaScript files, create a directory in your project directory called htdocs (if it does not already exist), and then create a js directory within that directory.
  • Finally, for local JavaScript files to work, make sure that your web server has an alias for /chrome/site that points to the htdocs directory within your Trac project.

Bugs/Feature Requests

Existing bugs and feature requests for FlexJsPlugin are here.

If you have any issues, create a new ticket.

defect

0 / 1

enhancement

0 / 1

Download

Download the zipped source from here.

Source

You can check out FlexJsPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

If in your trac.ini file this configuration is added:

[flexjs]
global = foo.js,bar.js
local = blah.js
ext = http://example.com/test1.js,http://example.com/test2.js

Will result in this addition to the <head> of your pages:

Recent Changes

1298 by clay on 2006-09-23 22:27:36
FlexJsPlugin:

Initial commit

1297 by clay on 2006-09-23 22:20:10
New hack FlexJsPlugin, created by clay
(more)

Author/Contributors

Author: clay
Maintainer: clay
Contributors:

Last modified 8 months ago Last modified on Nov 16, 2015, 10:26:01 AM