Created
January 12, 2020 11:21
-
-
Save shisama/f427dbf552228e0f3bcad72b282e6c4a to your computer and use it in GitHub Desktop.
Weblioの単語帳画面から単語と意味をカンマ区切りの一覧で引っこ抜いてクリップボードにコピーするスクリプト
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
copy(Object.values(document.getElementsByClassName("tngMainTrOn")).map(el => { | |
const text = el.innerText | |
const textArr = text.split("\n") | |
const en = textArr[0] | |
const ja = textArr[2].split(",").join("、") | |
return `${en}, ${ja}`; | |
}).join("\n")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment