Version 2 (modified by clay, 10 years ago) (diff)


Flexible JavaScript inclusions for Trac


This is a simple 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:

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 flexjs 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, in order 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.


Download the zipped source from [download:flexjsplugin here].


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


In trac.ini, this configuration:

global = foo.js,bar.js
local = blah.js
ext =,

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

 <script type="text/javascript" src="/chrome/common/js/flex/foo.js"></script>
 <script type="text/javascript" src="/chrome/common/js/flex/bar.js"></script>
 <script type="text/javascript" src=""></script>
 <script type="text/javascript" src=""></script>
 <script type="text/javascript" src="/chrome/site/js/blah.js"></script>

Recent Changes

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

Initial commit

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


Author: clay