/usr/share/doc/racket/guide/figure.js is in racket-doc 6.7-3.
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 | AddOnLoad(function () {
/* Lift figure targets to the start of the figure's blockquote,
so that clicking on a target reference shows the figure
content, instead of scrolling the figure caption to the
top of the page. */
var targets = document.getElementsByTagName("a");
for (var i = 0; i < targets.length; i++) {
var a = targets[i];
var n = a.attributes["x-target-lift"];
if (n) {
var s = n.value;
var p = a.parentNode;
while (p && (p.className != s)) {
p = p.parentNode;
}
if (p) {
var cs = p.children;
a.parentNode.removeChild(a);
if (cs.length > 0)
p.insertBefore(a, cs[0]);
else
p.appendChild(a);
}
}
}
});
|