Run custom js on page load to modify awesomebar, not content

Hi all,

I would like to modify the awesomebar in the top right of every page with a custom js.
The custom js is not the problem. But how would I load this js on every rendering of a page in my frappe system?

Thanks!
DoCa

1 Like

Use app_include_js hook

https://frappeframework.com/docs/user/en/basics/asset-bundling#including-assets-in-app-html

What kind of features will you add ?

Awesomebar seems to be a hidden gem in fact. Lots of features can be implemented.

Thanks ankush,

I was rather wondering how to trigger my code on every setup of a new page in the browser.

My could should always get loaded, not only on specific doctypes.

Regards
DoCa

I need to remove certain special characters automatically from the search, because the data of the field I search for is stored without that characters.

You can add a field for that doctype with removed characters. Set that new field in the search fields for the doctype.

Then global search should work without that characters.

Thanks! That’s a good Idea!

1 Like