You can't. Javascript buttons aren't supported by Lightning. Lightning pages are single page applications. Most everything in Lightning is done using Actions.
See Page Layouts in Lightning Experience from Salesforce Help where it explicitly says:
Custom buttons that call JavaScript aren’t supported in Lightning Experience.
UPDATE - Use the Lightning Experience Configuration Converter recreates your org’s JavaScript buttons as Lightning components, quick actions, or other solutions — all without touching your original buttons.
See Salesforce blog about this.