Skip to content

Instantly share code, notes, and snippets.

@shuuji3
Last active February 10, 2019 04:07
Show Gist options
  • Save shuuji3/74dcb4b3cbb5b1d65d380c53441505d4 to your computer and use it in GitHub Desktop.
Save shuuji3/74dcb4b3cbb5b1d65d380c53441505d4 to your computer and use it in GitHub Desktop.
「HPCS Lab. SS Team リソース一覧」の「書籍」シートのための情報をCalilのページから簡単にコピーするためのブックマークレット
// 動作確認: Google Chrome 73.0.3683.27(Official Build)beta (64 ビット)
var authors = [...$('[itemprop="author"]')].map(a => a.textContent.trim()).join(' / ').replace(/\s+/g, ' '); var title = $('.book_title').text().trim(); var pubdate = $('[itemprop="datePublished"]').text().replace(/[()]/g, '').trim(); var publisher = $('[itemprop="publisher"]').text().trim(); var isbn = [...$('[href*="isbn"]')][0].href.split('=')[1]; var text = [authors, title, publisher, pubdate, isbn].join('\t'); alert(text); console.log(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment