Last active
July 27, 2021 09:05
-
-
Save martyzz1/bad31146fb1a74afa3ffc110f16274dc to your computer and use it in GitHub Desktop.
Make Chrome app for a given url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const startUrl = window.location.href; | |
document.head | |
.querySelector(':first-child') | |
.insertAdjacentHTML( | |
'beforebegin', | |
`<link rel="manifest" href='data:application/manifest+json,{"start_url":"${startUrl}"}' />`, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment