save url to be opened in local storage

instead of saving the function on a local variable