fuzzy match on lookups

This commit is contained in:
smilerz
2021-06-06 14:12:19 -05:00
parent 32c488f4a8
commit b556bed56e
8 changed files with 57 additions and 29 deletions

View File

@@ -171,5 +171,15 @@
token.select();
document.execCommand("copy");
}
// Javascript to enable link to tab
var hash = location.hash.replace(/^#/, ''); // ^ means starting, meaning only match the first hash
if (hash) {
$('.nav-tabs a[href="#' + hash + '"]').tab('show');
}
// Change hash for page-reload
$('.nav-tabs a').on('shown.bs.tab', function (e) {
window.location.hash = e.target.hash;
})
</script>
{% endblock %}