1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-26 01:13:41 +02:00

Added hashchange listener

This commit is contained in:
Dan Leech 2015-10-28 15:53:06 +00:00
parent 90cd897230
commit c150947e4c
3 changed files with 30 additions and 9 deletions

View File

@ -388,9 +388,16 @@
search();
});
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
hashSearch();
window.addEventListener('hashchange', function (evt) {
hashSearch();
});
function hashSearch() {
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
}
function search() {
var searchTerm = searchField.value.toLowerCase();

View File

@ -388,9 +388,16 @@
search();
});
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
hashSearch();
window.addEventListener('hashchange', function (evt) {
hashSearch();
});
function hashSearch() {
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
}
function search() {
var searchTerm = searchField.value.toLowerCase();

View File

@ -11,9 +11,16 @@
search();
});
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
hashSearch();
window.addEventListener('hashchange', function (evt) {
hashSearch();
});
function hashSearch() {
var query = window.location.hash.substring(1);
document.getElementById("search").value = query;
search();
}
function search() {
var searchTerm = searchField.value.toLowerCase();