Created
August 22, 2023 15:38
-
-
Save valtusovs/677c6ef26a9af8d00c82efeec62b2bf4 to your computer and use it in GitHub Desktop.
Create tab data URL with defined text as title, to be used as bookmarklet
This file contains 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
let t = prompt("Title?"); | |
let r = `data:text/html, <!DOCTYPE html><html><head><meta charset='utf-8'><style>h1{text-align:center;}</style><title>${t}</title></head><body><h1>${t}</h1></body></html>`; | |
alert(r); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment