How can I save a custom javascript function so that I can use it anytime on Chrome console even after I reboot Windows?
>Solution :
In the developer console, you can go to the Sources tab, and then to the Snippets subtab. Press + New snippet and then type in the code you want and save it.
You can now open and run the snippet whenever you want by right clicking on it and pressing Run.
If this is a function you’d want to run when going to a certain page or website, you might consider using a userscript instead – they’re much more flexible for running your own custom JavaScript on pages, and can run automatically on pageload, or on the click of a button, and so on.
