summaryrefslogtreecommitdiffstats
path: root/js/comments.js
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2017-12-18 21:06:11 +0100
committerDylan William Hardison <dylan@hardison.net>2017-12-18 21:06:11 +0100
commitbc8533f5e9e211f250b5bc3247797feac0f1303b (patch)
treea235a167a4e724490f2e16a28bc732b01c507e66 /js/comments.js
parent334bead74bc9c5e819f14946726eaad40986d636 (diff)
downloadbugzilla-bc8533f5e9e211f250b5bc3247797feac0f1303b.tar.gz
bugzilla-bc8533f5e9e211f250b5bc3247797feac0f1303b.tar.xz
Bug 905763 - Fix named anchors in various pages so that the Sandstone theme header can be set to a fixed position
Diffstat (limited to 'js/comments.js')
-rw-r--r--js/comments.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/js/comments.js b/js/comments.js
index 88ba49364..82c93e561 100644
--- a/js/comments.js
+++ b/js/comments.js
@@ -178,23 +178,3 @@ function getText(element) {
}
return text;
}
-
-/**
- * If the URL contains a comment ID like #c10, scroll down the page to show the
- * entire comment below the fixed global header.
- */
-function scroll_comment_into_view() {
- if (location.hash.match(/^#c\d+$/)) {
- var $header = document.querySelector('#header');
- var $comment = document.querySelector(location.hash);
-
- if ($comment) {
- window.setTimeout(function() {
- window.scrollTo(0, $comment.offsetTop - $header.offsetHeight - 20);
- }, 100);
- }
- }
-}
-
-window.addEventListener('load', scroll_comment_into_view, { once: true });
-window.addEventListener('hashchange', scroll_comment_into_view);