Last active
December 16, 2019 09:55
-
-
Save sahajamit/722a332a3b12d3c5d714446874a3d6e3 to your computer and use it in GitHub Desktop.
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
async function getCBContents() { | |
try { | |
window.cb = await navigator.clipboard.readText(); | |
console.log("Pasted content: ", window.cb); | |
} catch (err) { | |
console.error("Failed to read clipboard contents: ", err); | |
window.cb = "Error : " + err; | |
} | |
} | |
getCBContents(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment