Last active
March 17, 2021 07:20
-
-
Save kenzo-tanaka/011287ceffb5e6a01569c5b716aaa333 to your computer and use it in GitHub Desktop.
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
javascript: (function () { | |
const title = document.title; | |
const textArea = document.createElement("textarea"); | |
textArea.setAttribute("id", "copyTarget"); | |
textArea.value = title; | |
document.body.appendChild(textArea); | |
const copyText = document.querySelector("#copyTarget"); | |
copyText.select(); | |
document.execCommand("copy"); | |
textArea.remove(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment