-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfoot.php
More file actions
executable file
·36 lines (33 loc) · 1.06 KB
/
foot.php
File metadata and controls
executable file
·36 lines (33 loc) · 1.06 KB
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
29
30
31
32
33
34
35
36
<?php
$foot = '
<p style="font-size: 75%; margin-top: 5em;">
Copyright Creative Commons Attribution 3.0 - Charles R. Severance
</p>';
$OUTPUT->setAppFooter($foot);
$OUTPUT->footerStart();
?>
<script>$(document).ready(function() {
function filterPath(string) {
return string
.replace(/^\//,'')
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
}
$('a[href*=#]').each(function() {
if ( filterPath(location.pathname) == filterPath(this.pathname)
&& location.hostname == this.hostname
&& this.hash.replace(/#/,'') ) {
var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']');
var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
if ($target) {
var targetOffset = $target.offset().top;
$(this).click(function() {
$('html, body').animate({scrollTop: targetOffset}, 2000);
return false;
});
}
}
});
});</script>
<?php
if ( (! isset($footerEnd)) || $footerEnd ) $OUTPUT->footerEnd();