Remy Blank committed 3fc7aad

0.13dev: Added the option `[trac] jquery_location` to load jQuery from a CDN.

Thanks to Peter Suter for the patch. Closes #10244.

Comments (0)

Files changed (1)


         will not be made available this way and additional rewrite 
         rules will be needed in the web server.""")
+    jquery_location = Option('trac', 'jquery_location', '',
+        """Location of the jQuery JavaScript library.
+        An empty value loads jQuery from the copy bundled with Trac.
+        Alternatively, jQuery could be loaded from a CDN, for example:
+         *
+         *
+         *
+        (''since 0.13'')""")
     metanav_order = ListOption('trac', 'metanav',
                                'login, logout, prefs, help, about', doc=
         """Order of the items to display in the `metanav` navigation bar,
         add_link(req, 'search',
         add_link(req, 'help','TracGuide'))
         add_stylesheet(req, 'common/css/trac.css')
-        add_script(req, 'common/js/jquery.js')
+        add_script(req, self.jquery_location or 'common/js/jquery.js')
         # Only activate noConflict mode if requested to by the handler
         if handler is not None and \
            getattr(handler.__class__, 'jquery_noconflict', False):