Last active
August 19, 2022 02:33
-
-
Save gonzoooooo/aacc9af6377f994fbbfc33ebc96f9b3f to your computer and use it in GitHub Desktop.
Gyazo から Scrapbox のページを作成するブックマークレット
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 project = 'YOUR_PROJECT_NAME'; | |
var url = `https://scrapbox.io/${project}/`; | |
var gyazoUrl = location.href; | |
var ocrText = document.getElementsByClassName('ocr-desc-text')[0].innerText; | |
var title = document.getElementsByClassName('image-desc-display')[0].innerText; | |
var lines = [`[${gyazoUrl}]`, '', ocrText, '']; | |
var body = encodeURIComponent(lines.join('\n')); | |
window.open(url + encodeURIComponent(title.trim()) + '?body=' + body) | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gyazo のキャプチャ画像のページを開いた状態で実行してください。