| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/usr/share/doc/freetype-devel/reference/javascripts/ |
Upload File : |
/*
Internal link topbar offest adjust Javascript
Code provided by @makshh on GitHub
Bug report on material-mkdocs
https://github.com/squidfunk/mkdocs-material/issues/791
*/
// Offset top helper
function offsetY(elem) {
if(!elem) elem = this;
var y = elem.offsetTop;
while (elem = elem.offsetParent) {
y += elem.offsetTop;
}
return y;
}
// If a link on the same page is clicked, calculate the
// correct offset and scroll to that part of the page.
//
var links = document.getElementsByTagName('a');
for(var i = 0; i < links.length; i++) {
links[i].onclick = function (event) {
if (this.pathname == window.location.pathname &&
this.protocol == window.location.protocol &&
this.host == window.location.host) {
event.preventDefault();
if(this.hash.substr(1)){
var o = document.getElementById(this.hash.substr(1));
var sT = offsetY(o) - document.getElementsByClassName('md-header')[0].clientHeight;
window.location.hash = this.hash;
window.scrollTo(0, sT);
}
}
}
}
// Slugify supplied text
function slugify(text){
text = text.toLowerCase();
text = text.replace(" ", "-");
return text;
}
// If there is a hash in the url, slugify it
// and replace
if(window.location.hash) {
// Fragment exists
slug = slugify(window.location.hash);
history.replaceState(undefined, undefined, slug)
//window.location.hash = slug;
document.location.replace(window.location.href);
}