/usr/share/tdiary/js/highlight.js is in tdiary-plugin 3.1.3-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 27 28 29 30 31 32 33 34 35 36 | /**
* highlight.js: Highlighting the element jumped from other pages.
*
* Copyright (C) 2003 by Ryuji SAKAI
* Copyright (C) 2003 by Kazuhiro NISHIYAMA
* Copyright (C) 2011 by MATSUOKA Kohei <kmachu@gmail.com>
* You can distribute it under GPL.
*/
$(function() {
function highlight(anchor) {
// clear current highlight
$(".highlight").removeClass("highlight");
// change document title
var target = $(anchor).parent();
if (target.filter('h3').size() > 0) {
document.title = target.children("a").attr("title") + " - " + $tDiary.title;
}
target.addClass("highlight");
}
// bind click event to anchors
$(document.anchors)
.filter(function() {
return $(this).attr("name").match(/^[pc]/);
})
.bind("click", function() {
highlight(this);
})
if (document.location.hash) {
highlight($('[name=' + document.location.hash.replace(/[^\w]/g, "") + ']')[0]);
}
});
|