/usr/share/pyshared/tracrpc/htdocs/rpc.js is in trac-xmlrpc 1.1.2+r10706-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | (function($) {
$(document).ready(function () {
// Create a Table of Contents (TOC)
$('#content .wikipage')
.prepend('<div id="rpc-toc" class="wiki-toc"><h4>Contents</h4><ul /></div>');
function toc_entry(_this, item) {
return $('<li><a href="#' + _this.id + '" title="'
+ $(item).text().replace(/^\s+|\s+$/g, '')
+ '">' + _this.id.replace(/^rpc\./, '') + '</a></li>');
}
var ul = $('#rpc-toc ul');
$("#content").find("*[id]").each(function(index, item) {
var elem = undefined;
if (this.tagName == 'H2') {
elem = toc_entry(this, item);
elem.css('padding-top', '0.5em');
}
if (this.tagName == 'H3') {
elem = toc_entry(this, item);
elem.css('padding-left', '1.2em');
}
ul.append(elem);
});
$('#rpc-toc').toggle();
// Add anchors to headings
$("#content").find("h2,h3").addAnchor("Link here");
});
})(jQuery);
|