refactor to not need jquery and add metadata function

reading-list
aundus 2021-03-05 10:42:00 -05:00
parent cc7cb81a1b
commit 604fb66403
1 changed files with 10 additions and 1 deletions

View File

@ -62,7 +62,6 @@ Gutenberg metadata much faster than by scraping.
.qrcode { background: transparent url(${os.qrcode_url}) 0 0 no-repeat; }
</style>
<meta name="google" content="notranslate" />
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
</head>
<body>
@ -385,6 +384,16 @@ ${site_top()}
</div>
<script>
function getBookMetadata(){
return {
bookId: "${os.id}",
title: "${os.title}",
imgSrc: "${os.cover_image_url}",
url: window.location.href
}
}
</script>
<script src="http://cdn.jsdelivr.net/gh/EbookFoundation/reading-lists/ebooks/book.js"></script>
</body>