I will have a geographic coordinates in my clipboard and wish to open a google maps link with those coordinates. I am trying to create either a bookmarklet or a script that is triggered by a keyboard shortcut.
I was trying to turn this into a bookmarklet but was not sure where I was messing up.
coords = window.clipboardData.getData('Text')
window.open('https://google.com/maps/search/${coords}', '_blank');
navigator
navigator.clipboard.readText().then(
clipText => window.open(
'https://google.com/maps/search/'+clipText, '_blank'
)
);