Skip to content

Instantly share code, notes, and snippets.

@shinespark
Last active November 10, 2021 20:26
Show Gist options
  • Save shinespark/fc1e10538a963cbbba0ff42e90ef70b9 to your computer and use it in GitHub Desktop.
Save shinespark/fc1e10538a963cbbba0ff42e90ef70b9 to your computer and use it in GitHub Desktop.
Kindleの購入済み書籍から、未読の本のみを抽出するBookmarklet
// Amazon.co.jp: コンテンツと端末の管理 - https://www.amazon.co.jp/hz/mycd/myx#/home/content/booksAll/dateDsc/ にて
// あらかじめブックマークしておいた、下記のBookmarkletを実行する
//
// pagination未考慮のため、もっと読むごとに実行する必要あり
javascript: !((t) => {const a = document.createElement("textarea"), s = document.getSelection();(a.textContent = t), document.body.appendChild(a), s.removeAllRanges(), a.select(), document.execCommand("copy"), s.removeAllRanges(), document.body.removeChild(a);})([...document.querySelectorAll(".myx-spacing-small.inline_myx")].filter(r => !r.innerText.match(/\n%E8%AA%AD%E3%82%93%E3%81%A0%E6%9C%AC/)).map(r => r.querySelector("[id^=title]").innerText).join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment