mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 13:53:43 -04:00
Set up tracking of site search for Google Analytics
This commit is contained in:
@@ -253,7 +253,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
/* Close search and jump to anchor when on same page */
|
||||
var parts = link.href.split('#');
|
||||
if (parts[0] == window.location.href.split('#')[0]) {
|
||||
if (parts[0] == document.location.href.split('#')[0]) {
|
||||
link.addEventListener('click', function(e) {
|
||||
document.body.classList.remove('toggle-search');
|
||||
document.body.classList.remove('locked');
|
||||
|
||||
Reference in New Issue
Block a user