Last active
March 14, 2023 14:04
-
-
Save eoureo/6c418f7586eb317f9ef7aa5312bb15db to your computer and use it in GitHub Desktop.
ChatGPT를 써서 만든 Bookmarklet [T](U) - HTTP와 HTTPS에서 되도록 해줘.
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() { | |
var markdown = "[" + document.title + "](" + window.location.href + ")"; | |
var fakeElem = document.createElement('textarea'); | |
fakeElem.value = markdown; | |
fakeElem.setAttribute('readonly', ''); | |
fakeElem.style.position = 'absolute'; | |
fakeElem.style.left = '-9999px'; | |
document.body.appendChild(fakeElem); | |
fakeElem.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(fakeElem); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ChatGPT를 써서 만든 Bookmarklet - "페이지 제목과 URL을 마크다운 형식
[T](U)
으로 클립보드에 저장하는 Bookmarklet을 만들어줘"https://gist.github.com/eoureo/e674e8e322db5d57b5c3419710a74137
Bookmarklet-
[T](U)
.js위에서 만든 Bookmarklet은 HTTP 프로토콜에서는 안된다.
그래서 다시 ChatGPT를 이용했다.