Javascript Bookmarklet Button

I want to make a button with Javascript code that people can drag into their bookmark bar to run the code. How do you add the code to the button?

You won’t be able to do it through Wix using javascript, however you can look at doing it through a combination of html, css and js in either a html iframe or as a custom tool in tracking and analytics.

See here for an example.
https://www.thewebflash.com/how-to-add-a-cross-browser-add-to-favorites-bookmark-button-to-your-website/
https://mreidsma.github.io/bookmarklets/installing.html

As for bookmark icon see here.
https://support.wix.com/en/article/setting-the-homescreen-icon-for-iphones-ipads-and-android-devices
https://support.wix.com/en/article/bookmarking-your-site-on-a-mobile-device-or-tablet

I mean that I do not know how to make a button with Javascript code as the URL. I want people to be able to drag the URL to their bookmarks bar.