[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Proposal - Optional JavaScript include in "Powered by Apache Subversion..." pages

From: Paul Hammant <paul_at_hammant.org>
Date: Mon, 17 Jul 2017 08:29:55 -0400

The page I'm talking about is the skinny one that presents directory
listings:

<html><head><title>svnRepo1 - Revision 195: /</title></head>
<body>
 <h2>svnRepo1 - Revision 195: /</h2>
 <ul>
  <li>..</li>
  <li>a/</li>
 </ul>
 <hr noshade><em>Powered by <a href="http://subversion.apache.org/">Apache
Subversion</a> version 1.9.5 (r1770682).</em>
</body></html>

It would be super awesome to be able to administrators of Subversion to
inject JavaScript into the pages presenting subversion directory listings
to regular user agents. And configure that injection via something in a
config file, that would end up like this in the browser:

<html><head><title>svnRepo1 - Revision 195: /</title>
<script src="foo.com/something.js"></script></head>
<body>
 <h2>svnRepo1 - Revision 195: /</h2>
 <ul>
  <li>..</li>
  <li>a</li>
 </ul>
 <hr noshade><em>Powered by <a href="http://subversion.apache.org/">Apache
Subversion</a> version 1.9.5 (r1770682).</em>
</body></html>

Or better still be able to override the template used for the page in
question - again in config.

It would also be nice to be able to insert something into the resource as
served to humans too, but right now that's served raw. It would be nice to
have a serving of the same resource via a template. The default would be
raw as it is now in the absence of the config setting.

I're looked but I can't see config for this that already exists.

With the consent of the developer team, I'd like to raise a Jira feature
request.

*History*

Here's me doing something similar a year ago for RhodeCode -
https://paulhammant.com/2016/06/26/using-rhodecode-and-angular1-as-an-editor-for-a-config-as-code-system/

And a year before that for GitHub (as a Chrome Extension)
https://paulhammant.com/2015/06/07/custom-json-editors-for-github/

Now those two are for enhanced *editing* experience, but right now for base
subversion, I'm proposing something that may only affect *viewing* experience.
I have shown a single <script/> insert, when in reality it would be
insert-n-lines-into the <head/> tag, or override the the template thing.
Received on 2017-07-17 14:30:01 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.