---
# System prepended metadata

title: Adobe search bar handling

---

# Adobe search bar handling

```

console.log("before hash chek")
if (window.location.hash) {

    console.log("after hash chek")

    var allQueryParams = window.location.hash.split("&").map(function (r) {
      var [key, value] = r.split("=");
      return {
        key,
        value,
      };
    });
    console.log("allQueryParams chek",allQueryParams)
    

    var qQueryParam = allQueryParams.find(function (r) {
      return r.key === "#q" || r.key === "q";
    });
    console.log("qQueryParam chek",qQueryParam)
    
    if (qQueryParam && qQueryParam.value && qQueryParam.value.length > 0) {
      EnableSearch();
    }

}



```