functional prototype

pull/1/head
Adam Undus 2020-10-07 20:55:50 -04:00
parent 543897a3e8
commit 8790635973
5 changed files with 584 additions and 441 deletions

View File

@ -149,7 +149,9 @@
<h1><span class="icon icon_"></span>My Booklist</h1> <h1><span class="icon icon_"></span>My Booklist</h1>
</div> </div>
<div class="body"> <div class="body">
My content <ul id="book-list">
</ul>
</div> </div>
</div> </div>

View File

@ -1,5 +1,20 @@
(function ($) { (function ($) {
const list = JSON.parse(localStorage.getItem('booklist'))
console.log(list)
const body = $('#book-list');
console.log()
Object.keys(list).forEach((bookId) => {
console.log(bookId)
body.append(makeListItem(list[bookId]));
});
function makeListItem(book) {
const a = `<a href="${book.url}"><h3>${book.title}</h3></a>`;
const li = `<li><div class="list-item"><img src="${book.imgSrc}"/>${a}<span>Author: ${book.author}</span><div></li>`;
console.log(li)
return li;
}
})(jQuery); })(jQuery);

View File

@ -1,445 +1,514 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <!--
DON'T USE THIS PAGE FOR SCRAPING. DON'T USE THIS PAGE FOR SCRAPING.
Seriously. You'll only get your IP blocked. Seriously. You'll only get your IP blocked.
Read http://www.gutenberg.org/feeds/ to learn how to download Project Read http://www.gutenberg.org/feeds/ to learn how to download Project
Gutenberg metadata much faster than by scraping. Gutenberg metadata much faster than by scraping.
--><html lang="en"> -->
<html lang="en">
<head> <head>
<style> <style>
.icon { background: transparent url(/pics/sprite.png?1600787134) 0 0 no-repeat; } .icon {
</style> background: transparent url(/pics/sprite.png?1600787134) 0 0 no-repeat;
<link rel="stylesheet" type="text/css" href="/gutenberg/pg-desktop-one.css?1600787134"> }
<link rel="stylesheet" type="text/css" href="/gutenberg/new_nav.css?1600787134"> </style>
<link rel="stylesheet" type="text/css" href="/gutenberg/style.css?1600787134"> <link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/pg-desktop-one.css?1600787134">
<script>// <link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/new_nav.css?1600787134">
var json_search = "/ebooks/suggest/"; <link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/style.css?1600787134">
var canonical_url = "http://www.gutenberg.org/ebooks/2542"; <script>//
var lang = "en"; var json_search = "/ebooks/suggest/";
var fb_lang = "en_US"; /* FB accepts only xx_XX */ var canonical_url = "http://www.gutenberg.org/ebooks/2542";
var msg_load_more = "Load More Results…"; var lang = "en";
var page_mode = "screen"; var fb_lang = "en_US"; /* FB accepts only xx_XX */
var dialog_title = ""; var msg_load_more = "Load More Results…";
var dialog_message = ""; var page_mode = "screen";
//</script> var dialog_title = "";
<script src="https://www.gutenberg.org/js/pg-desktop-one.js?1600787134"></script> var dialog_message = "";
<link rel="shortcut icon" href="/gutenberg/favicon.ico"> //
<link rel="canonical" href="http://www.gutenberg.org/ebooks/2542"> </script>
<link rel="search" type="application/opensearchdescription+xml" title="Search Project Gutenberg" href="https://www.gutenberg.org/catalog/osd-books.xml"> <script src="https://www.gutenberg.org/js/pg-desktop-one.js?1600787134"></script>
<link rel="alternate nofollow" type="application/atom+xml;profile=opds-catalog" title="OPDS feed" href="/ebooks/2542.opds"> <link rel="shortcut icon" href="/gutenberg/favicon.ico">
<link rel="apple-touch-icon" href="/gutenberg/apple-icon.png"> <link rel="canonical" href="http://www.gutenberg.org/ebooks/2542">
<meta name="viewport" content="width=device-width"> <link rel="search" type="application/opensearchdescription+xml" title="Search Project Gutenberg"
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> href="https://www.gutenberg.org/catalog/osd-books.xml">
<meta http-equiv="default-style" content="text/css"> <link rel="alternate nofollow" type="application/atom+xml;profile=opds-catalog" title="OPDS feed"
<meta name="title" content="A Doll's House : a play by Henrik Ibsen"> href="/ebooks/2542.opds">
<meta name="description" content="Free kindle book and epub digitized and proofread by Project Gutenberg."> <link rel="apple-touch-icon" href="/gutenberg/apple-icon.png">
<meta name="keywords" content="ebook, ebooks, free ebooks, free books, book, books, audio books"> <meta name="viewport" content="width=device-width">
<meta name="classification" content="public"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="og:title" content="A Doll's House : a play by Henrik Ibsen"> <meta http-equiv="default-style" content="text/css">
<meta property="og:description" content="Free kindle book and epub digitized and proofread by Project Gutenberg."> <meta name="title" content="A Doll's House : a play by Henrik Ibsen">
<meta property="og:type" content="book"> <meta name="description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta property="og:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg"> <meta name="keywords" content="ebook, ebooks, free ebooks, free books, book, books, audio books">
<meta property="og:url" content="http://www.gutenberg.org/ebooks/2542"> <meta name="classification" content="public">
<meta property="og:site_name" content="Project Gutenberg"> <meta property="og:title" content="A Doll's House : a play by Henrik Ibsen">
<meta property="fb:app_id" content="115319388529183"> <meta property="og:description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta name="twitter:card" content="summary"> <meta property="og:type" content="book">
<meta name="twitter:site" content="@gutenberg_new"> <meta property="og:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg">
<meta name="twitter:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg"> <meta property="og:url" content="http://www.gutenberg.org/ebooks/2542">
<meta name="twitter:image:alt" content="book cover image"> <meta property="og:site_name" content="Project Gutenberg">
<title>A Doll's House : a play by Henrik Ibsen - Free Ebook</title> <meta property="fb:app_id" content="115319388529183">
<link rel="alternate nofollow" type="application/rdf+xml" href="/ebooks/2542.rdf"> <meta name="twitter:card" content="summary">
<style> <meta name="twitter:site" content="@gutenberg_new">
.qrcode { background: transparent url(/cache/epub/2542/pg2542.qrcode.png) 0 0 no-repeat; } <meta name="twitter:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg">
</style> <meta name="twitter:image:alt" content="book cover image">
<meta name="google" content="notranslate"> <title>A Doll's House : a play by Henrik Ibsen - Free Ebook</title>
<link rel="alternate nofollow" type="application/rdf+xml" href="/ebooks/2542.rdf">
<style>
.qrcode {
background: transparent url(/cache/epub/2542/pg2542.qrcode.png) 0 0 no-repeat;
}
</style>
<meta name="google" content="notranslate">
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<nav> <nav>
<!--<div id="main_logo"> --> <!--<div id="main_logo"> -->
<a id="main_logo" href="/" class="no-hover"> <a id="main_logo" href="/" class="no-hover">
<img src="https://www.gutenberg.org/gutenberg/pg-logo-129x80.png" alt="Project Gutenberg" draggable="false"> <img src="https://www.gutenberg.org/gutenberg/pg-logo-129x80.png" alt="Project Gutenberg" draggable="false">
</a> </a>
<!-- </div>--> <!-- </div>-->
<div id="menu"> <div id="menu">
<label for="tm" id="toggle-menu">Menu<span class="drop-icon"></span></label> <label for="tm" id="toggle-menu">Menu<span class="drop-icon"></span></label>
<input type="checkbox" id="tm"> <input type="checkbox" id="tm">
<ul class="main-menu cf"> <ul class="main-menu cf">
<li> <li>
<a href="/about/">About <a href="/about/">About
<span class="drop-icon"></span> <span class="drop-icon"></span>
</a> </a>
<label title="Toggle Drop-down" class="drop-icon" for="sm0"></label> <label title="Toggle Drop-down" class="drop-icon" for="sm0"></label>
<input type="checkbox" id="sm0"> <input type="checkbox" id="sm0">
<ul class="sub-menu"> <ul class="sub-menu">
<li><a href="/about/">About Project Gutenberg</a></li> <li><a href="/about/">About Project Gutenberg</a></li>
<li><a href="/policy/collection_development.html">Collection Development</a></li> <li><a href="/policy/collection_development.html">Collection Development</a></li>
<li><a href="/about/contact_information.html">Contact Us</a></li> <li><a href="/about/contact_information.html">Contact Us</a></li>
<li><a href="/about/background/">History &amp; Philosophy</a></li> <li><a href="/about/background/">History &amp; Philosophy</a></li>
<li><a href="/policy/permission.html">Permissions &amp; License</a></li> <li><a href="/policy/permission.html">Permissions &amp; License</a></li>
<li><a href="/policy/privacy_policy.html">Privacy Policy</a></li> <li><a href="/policy/privacy_policy.html">Privacy Policy</a></li>
<li><a href="/policy/terms_of_use.html">Terms of Use</a></li> <li><a href="/policy/terms_of_use.html">Terms of Use</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="/ebooks/">Search and Browse <a href="/ebooks/">Search and Browse
<span class="drop-icon"></span> <span class="drop-icon"></span>
</a> </a>
<label title="Toggle Drop-down" class="drop-icon" for="sm8"></label> <label title="Toggle Drop-down" class="drop-icon" for="sm8"></label>
<input type="checkbox" id="sm8"> <input type="checkbox" id="sm8">
<ul class="sub-menu"> <ul class="sub-menu">
<li><a href="/ebooks/">Book Search</a></li> <li><a href="/ebooks/">Book Search</a></li>
<li><a href="/ebooks/bookshelf/">Bookshelves</a></li> <li><a href="/ebooks/bookshelf/">Bookshelves</a></li>
<li><a href="/browse/scores/top">Frequently Downloaded</a></li> <li><a href="/browse/scores/top">Frequently Downloaded</a></li>
<li><a href="/ebooks/offline_catalogs.html">Offline Catalogs</a></li> <li><a href="/ebooks/offline_catalogs.html">Offline Catalogs</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="/help/">Help <a href="/help/">Help
<span class="drop-icon"></span> <span class="drop-icon"></span>
</a> </a>
<label title="Toggle Drop-down" class="drop-icon" for="sm3"></label> <label title="Toggle Drop-down" class="drop-icon" for="sm3"></label>
<input type="checkbox" id="sm3"> <input type="checkbox" id="sm3">
<ul class="sub-menu"> <ul class="sub-menu">
<li><a href="/help/">All help topics →</a></li> <li><a href="/help/">All help topics →</a></li>
<li><a href="/help/copyright.html">Copyright Procedures</a></li> <li><a href="/help/copyright.html">Copyright Procedures</a></li>
<li><a href="/help/errata.html">Errata, Fixes and Bug Reports</a></li> <li><a href="/help/errata.html">Errata, Fixes and Bug Reports</a></li>
<li><a href="/help/file_formats.html">File Formats</a></li> <li><a href="/help/file_formats.html">File Formats</a></li>
<li><a href="/help/faq.html">Frequently Asked Questions</a></li> <li><a href="/help/faq.html">Frequently Asked Questions</a></li>
<li><a href="/policy/">Policies →</a></li> <li><a href="/policy/">Policies →</a></li>
<li><a href="/help/public_domain_ebook_submission.html">Public Domain eBook Submission</a></li> <li><a href="/help/public_domain_ebook_submission.html">Public Domain eBook Submission</a></li>
<li><a href="/help/submitting_your_own_work.html">Submitting Your Own Work</a></li> <li><a href="/help/submitting_your_own_work.html">Submitting Your Own Work</a></li>
<li><a href="/help/mobile.html">Tablets, Phones and eReaders</a></li> <li><a href="/help/mobile.html">Tablets, Phones and eReaders</a></li>
<li><a href="/attic/">The Attic →</a></li> <li><a href="/attic/">The Attic →</a></li>
</ul> </ul>
</li> </li>
<li><a href="/donate/">Donate</a></li> <li><a href="/donate/">Donate</a></li>
</ul> </ul>
</div> </div>
<div class="donate"> <div class="donate">
<div class="searchbox"> <div class="searchbox">
<form method="get" action="/ebooks/search/" accept-charset="utf-8" enctype="multipart/form-data" class="searchbox"> <form method="get" action="/ebooks/search/" accept-charset="utf-8" enctype="multipart/form-data"
<input type="text" value="" id="menu-book-search" name="query" class="searchInput" title="Quick search" tabindex="20" size="20" maxlength="80" placeholder=" Quick search"> class="searchbox">
<input type="submit" name="submit_search" value="Go!" style="vertical-align:middle;"> <input type="text" value="" id="menu-book-search" name="query" class="searchInput" title="Quick search"
</form> tabindex="20" size="20" maxlength="80" placeholder=" Quick search">
</div> <input type="submit" name="submit_search" value="Go!" style="vertical-align:middle;">
<form class="donatelink" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="new"> </form>
<p><a href="/donate/">Donation</a></p> </div>
<input type="hidden" name="cmd" value="_s-xclick"> <form class="donatelink" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="new">
<input type="hidden" name="hosted_button_id" value="XKAL6BZL3YPSN"> <p><a href="/donate/">Donation</a></p>
<input class="donbtn" type="image" src="https://www.gutenberg.org/pics/en_US.gif" name="submit" alt="Donate via PayPal"> <input type="hidden" name="cmd" value="_s-xclick">
</form> <input type="hidden" name="hosted_button_id" value="XKAL6BZL3YPSN">
</div> <input class="donbtn" type="image" src="https://www.gutenberg.org/pics/en_US.gif" name="submit"
</nav> alt="Donate via PayPal">
<div class="page_content" id="content" itemscope="itemscope" itemtype="http://schema.org/Book"> </form>
<div class="breadcrumbs noprint"> </div>
<ul> </nav>
<li class="breadcrumb first" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"> <div class="page_content" id="content" itemscope="itemscope" itemtype="http://schema.org/Book">
<span class="breadcrumb-separator"></span> <div class="breadcrumbs noprint">
<a href="/" title="Go to the Main page." itemprop="url"><span itemprop="title">Project Gutenberg</span></a> <ul>
</li> <li class="breadcrumb first" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"> <span class="breadcrumb-separator"></span>
<span class="breadcrumb-separator"></span> <a href="/" title="Go to the Main page." itemprop="url"><span itemprop="title">Project Gutenberg</span></a>
<a href="/ebooks/" title="Start a new search." itemprop="url"><span itemprop="title">63,327 free ebooks</span></a> </li>
</li> <li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"> <span class="breadcrumb-separator"></span>
<span class="breadcrumb-separator"></span> <a href="/ebooks/" title="Start a new search." itemprop="url"><span itemprop="title">63,327 free
<a href="/ebooks/author/861" title="Find more ebooks by the same author." itemprop="url"><span itemprop="title">52 by Henrik Ibsen</span></a> ebooks</span></a>
</li> </li>
</ul> <li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
</div> <span class="breadcrumb-separator"></span>
<h1 itemprop="name">A Doll's House : a play by Henrik Ibsen</h1> <a href="/ebooks/author/861" title="Find more ebooks by the same author." itemprop="url"><span
<div class="page-body"> itemprop="title">52 by Henrik Ibsen</span></a>
<div property="dcterms:publisher" itemprop="publisher" content="Project Gutenberg"></div> </li>
<div itemprop="bookFormat" content="EBook"></div> </ul>
<div id="cover-social-wrapper"> </div>
<div id="cover"> <h1 itemprop="name">A Doll's House : a play by Henrik Ibsen</h1>
<img class="cover-art" src="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg" title="Book Cover" alt="Book Cover" itemprop="image"> <div class="page-body">
</div> <div property="dcterms:publisher" itemprop="publisher" content="Project Gutenberg"></div>
<div id="social" class="noprint"> <div itemprop="bookFormat" content="EBook"></div>
<ul> <div id="cover-social-wrapper">
<li> <div id="cover">
<!-- tweet without javascript --> <img class="cover-art" src="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg"
<div class="social-button twitter-share-button"> title="Book Cover" alt="Book Cover" itemprop="image">
<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.gutenberg.org%2Febooks%2F2542&amp;text=A%20Doll%27s%20House%20%3A%20a%20play%20by%20Henrik%20Ibsen&amp;count=none&amp;lang=en&amp;related=gutenberg_new%3AProject%20Gutenberg%20New%20Books" title="Share on Twitter" onclick="open_share_popup(this.href, this.target, 640, 320)" target="_top"> </div>
<span class="icon icon_twitter"></span> <div id="social" class="noprint">
</a> <ul>
</div> <li>
</li> <!-- tweet without javascript -->
<li> <div class="social-button twitter-share-button">
<div class="social-button fb-share-button"> <a href="https://twitter.com/share?url=http%3A%2F%2Fwww.gutenberg.org%2Febooks%2F2542&amp;text=A%20Doll%27s%20House%20%3A%20a%20play%20by%20Henrik%20Ibsen&amp;count=none&amp;lang=en&amp;related=gutenberg_new%3AProject%20Gutenberg%20New%20Books"
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.gutenberg.org%2Febooks%2F2542" title="Share on Facebook" onclick="open_share_popup(this.href, this.target, 640, 320)" target="_top"> title="Share on Twitter" onclick="open_share_popup(this.href, this.target, 640, 320)" target="_top">
<span class="icon icon_facebook"></span> <span class="icon icon_twitter"></span>
</a> </a>
</div> </div>
</li> </li>
<li> <li>
<a onclick="printpage()" title="Print this page"><span class="icon icon_print"></span></a> <div class="social-button fb-share-button">
</li> <a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.gutenberg.org%2Febooks%2F2542"
</ul> title="Share on Facebook" onclick="open_share_popup(this.href, this.target, 640, 320)"
</div> target="_top">
<div id="qr"> <span class="icon icon_facebook"></span>
<span class="qrcode qrcode-desktop" title="Scan QR Code for this page."></span> </a>
</div> </div>
</div> </li>
<div id="tabs-wrapper"> <li>
<div id="tabs"> <a onclick="printpage()" title="Print this page"><span class="icon icon_print"></span></a>
<div id="download"> </li>
<div about="[ebook:2542]" rel="dcterms:hasFormat"> </ul>
<h2>Download This eBook</h2> </div>
<table class="files"> <div id="qr">
<colgroup> <span class="qrcode qrcode-desktop" title="Scan QR Code for this page."></span>
<col class="narrow"> </div>
<col> </div>
<col> <div id="tabs-wrapper">
<col> <div id="tabs">
<col class="narrow noprint"> <div id="download">
<col class="narrow noprint"> <div about="[ebook:2542]" rel="dcterms:hasFormat">
<col class="narrow noprint"> <h2>Download This eBook</h2>
</colgroup> <button id="add-to-booklist"
<tr> style="float: right;padding: 3px 5px;margin-top: -50px;background-color: cornflowerblue;">Add to My
<th></th> Book List</button>
<th>Format <span> <table class="files">
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Format" title="Explain Format."><span class="icon icon_help noprint"></span></a> <colgroup>
</span></th> <col class="narrow">
<th class="noscreen">Url</th> <col>
<th class="right">Size</th> <col>
<th class="noprint"><span> <col>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Dropbox" title="Explain Dropbox."><span class="icon icon_help noprint"></span></a> <col class="narrow noprint">
</span></th> <col class="narrow noprint">
<th class="noprint"><span> <col class="narrow noprint">
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Google_Drive" title="Explain Google Drive."><span class="icon icon_help noprint"></span></a> </colgroup>
</span></th> <tr>
<th class="noprint"><span> <th></th>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#OneDrive" title="Explain OneDrive."><span class="icon icon_help noprint"></span></a> <th>Format <span>
</span></th> <a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Format" title="Explain Format."><span
</tr> class="icon icon_help noprint"></span></a>
<tr class="even" about="https://www.gutenberg.org/files/2542/2542-h/2542-h.htm" typeof="pgterms:file"> </span>
<td><span class="icon icon_book"></span></td> </th>
<td property="dcterms:format" content="text/html; charset=us-ascii" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/files/2542/2542-h/2542-h.htm" type="text/html; charset=us-ascii" class="link" title="Download">Read this book online: HTML</a></td> <th class="noscreen">Url</th>
<td class="noscreen">https://www.gutenberg.org/files/2542/2542-h/2542-h.htm</td> <th class="right">Size</th>
<td class="right" property="dcterms:extent" content="259276">253 kB</td> <th class="noprint"><span>
<td class="noprint"> <a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Dropbox"
</td> title="Explain Dropbox."><span class="icon icon_help noprint"></span></a>
<td class="noprint"> </span>
</td> </th>
<td class="noprint"> <th class="noprint"><span>
<a href="/ebooks/send/megaupload/2542.html" title="Send to MegaUpload." rel="nofollow"></a> <a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Google_Drive"
</td> title="Explain Google Drive."><span class="icon icon_help noprint"></span></a>
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.epub.images" typeof="pgterms:file"> </span>
<td><span class="icon icon_book"></span></td> </th>
<td property="dcterms:format" content="application/epub+zip" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/ebooks/2542.epub.images?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb" type="application/epub+zip" class="link" title="Download">EPUB (with images)</a></td> <th class="noprint"><span>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.images</td> <a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#OneDrive"
<td class="right" property="dcterms:extent" content="115185">112 kB</td> title="Explain OneDrive."><span class="icon icon_help noprint"></span></a>
<td class="noprint"> </span>
<a href="/ebooks/send/dropbox/2542.epub.images" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a> </th>
</td> </tr>
<td class="noprint"> <tr class="even" about="https://www.gutenberg.org/files/2542/2542-h/2542-h.htm" typeof="pgterms:file">
<a href="/ebooks/send/gdrive/2542.epub.images" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a> <td><span class="icon icon_book"></span></td>
</td> <td property="dcterms:format" content="text/html; charset=us-ascii" datatype="dcterms:IMT"
<td class="noprint"> class="unpadded icon_save"><a href="/files/2542/2542-h/2542-h.htm"
<a href="/ebooks/send/msdrive/2542.epub.images" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a> type="text/html; charset=us-ascii" class="link" title="Download">Read this book online: HTML</a>
</td> </td>
</tr><tr class="odd" about="https://www.gutenberg.org/ebooks/2542.epub.noimages" typeof="pgterms:file"> <td class="noscreen">https://www.gutenberg.org/files/2542/2542-h/2542-h.htm</td>
<td><span class="icon icon_book"></span></td> <td class="right" property="dcterms:extent" content="259276">253 kB</td>
<td property="dcterms:format" content="application/epub+zip" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/ebooks/2542.epub.noimages?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb" type="application/epub+zip" class="link" title="Download">EPUB (no images)</a></td> <td class="noprint"></td>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.noimages</td> <td class="noprint"></td>
<td class="right" property="dcterms:extent" content="115186">112 kB</td> <td class="noprint">
<td class="noprint"> <a href="/ebooks/send/megaupload/2542.html" title="Send to MegaUpload." rel="nofollow"></a>
<a href="/ebooks/send/dropbox/2542.epub.noimages" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a> </td>
</td> </tr>
<td class="noprint"> <tr class="even" about="https://www.gutenberg.org/ebooks/2542.epub.images" typeof="pgterms:file">
<a href="/ebooks/send/gdrive/2542.epub.noimages" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a> <td><span class="icon icon_book"></span></td>
</td> <td property="dcterms:format" content="application/epub+zip" datatype="dcterms:IMT"
<td class="noprint"> class="unpadded icon_save"><a
<a href="/ebooks/send/msdrive/2542.epub.noimages" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a> href="/ebooks/2542.epub.images?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb"
</td> type="application/epub+zip" class="link" title="Download">EPUB (with images)</a></td>
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.kindle.images" typeof="pgterms:file"> <td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.images</td>
<td><span class="icon icon_book"></span></td> <td class="right" property="dcterms:extent" content="115185">112 kB</td>
<td property="dcterms:format" content="application/x-mobipocket-ebook" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/ebooks/2542.kindle.images?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb" type="application/x-mobipocket-ebook" class="link" title="Download">Kindle (with images)</a></td> <td class="noprint">
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.images</td> <a href="/ebooks/send/dropbox/2542.epub.images" title="Send to Dropbox." rel="nofollow"><span
<td class="right" property="dcterms:extent" content="501389">490 kB</td> class="icon icon_dropbox"></span></a>
<td class="noprint"> </td>
<a href="/ebooks/send/dropbox/2542.kindle.images" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a> <td class="noprint">
</td> <a href="/ebooks/send/gdrive/2542.epub.images" title="Send to Google Drive." rel="nofollow"><span
<td class="noprint"> class="icon icon_gdrive"></span></a>
<a href="/ebooks/send/gdrive/2542.kindle.images" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a> </td>
</td> <td class="noprint">
<td class="noprint"> <a href="/ebooks/send/msdrive/2542.epub.images" title="Send to OneDrive." rel="nofollow"><span
<a href="/ebooks/send/msdrive/2542.kindle.images" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a> class="icon icon_msdrive"></span></a>
</td> </td>
</tr><tr class="odd" about="https://www.gutenberg.org/ebooks/2542.kindle.noimages" typeof="pgterms:file"> </tr>
<td><span class="icon icon_book"></span></td> <tr class="odd" about="https://www.gutenberg.org/ebooks/2542.epub.noimages" typeof="pgterms:file">
<td property="dcterms:format" content="application/x-mobipocket-ebook" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/ebooks/2542.kindle.noimages?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb" type="application/x-mobipocket-ebook" class="link" title="Download">Kindle (no images)</a></td> <td><span class="icon icon_book"></span></td>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.noimages</td> <td property="dcterms:format" content="application/epub+zip" datatype="dcterms:IMT"
<td class="right" property="dcterms:extent" content="501378">490 kB</td> class="unpadded icon_save"><a
<td class="noprint"> href="/ebooks/2542.epub.noimages?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb"
<a href="/ebooks/send/dropbox/2542.kindle.noimages" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a> type="application/epub+zip" class="link" title="Download">EPUB (no images)</a></td>
</td> <td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.noimages</td>
<td class="noprint"> <td class="right" property="dcterms:extent" content="115186">112 kB</td>
<a href="/ebooks/send/gdrive/2542.kindle.noimages" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a> <td class="noprint">
</td> <a href="/ebooks/send/dropbox/2542.epub.noimages" title="Send to Dropbox." rel="nofollow"><span
<td class="noprint"> class="icon icon_dropbox"></span></a>
<a href="/ebooks/send/msdrive/2542.kindle.noimages" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a> </td>
</td> <td class="noprint">
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.txt.utf-8" typeof="pgterms:file"> <a href="/ebooks/send/gdrive/2542.epub.noimages" title="Send to Google Drive."
<td><span class="icon icon_book"></span></td> rel="nofollow"><span class="icon icon_gdrive"></span></a>
<td property="dcterms:format" content="text/plain" datatype="dcterms:IMT" class="unpadded icon_save"><a href="/ebooks/2542.txt.utf-8" type="text/plain" class="link" title="Download">Plain Text UTF-8</a></td> </td>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.txt.utf-8</td> <td class="noprint">
<td class="right" property="dcterms:extent" content="165572">162 kB</td> <a href="/ebooks/send/msdrive/2542.epub.noimages" title="Send to OneDrive." rel="nofollow"><span
<td class="noprint"> class="icon icon_msdrive"></span></a>
</td> </td>
<td class="noprint"> </tr>
</td> <tr class="even" about="https://www.gutenberg.org/ebooks/2542.kindle.images" typeof="pgterms:file">
<td class="noprint"> <td><span class="icon icon_book"></span></td>
</td> <td property="dcterms:format" content="application/x-mobipocket-ebook" datatype="dcterms:IMT"
</tr> class="unpadded icon_save"><a
<tr class="even"> href="/ebooks/2542.kindle.images?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb"
<td><span class="icon icon_folder"></span></td> type="application/x-mobipocket-ebook" class="link" title="Download">Kindle (with images)</a>
<td class="unpadded icon_file"><a href="/files/2542/" class="link">More Files…</a></td> </td>
<td class="noscreen">https://www.gutenberg.org/files/2542/</td> <td class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.images</td>
<td></td> <td class="right" property="dcterms:extent" content="501389">490 kB</td>
<td class="noprint"></td> <td class="noprint">
<td class="noprint"></td> <a href="/ebooks/send/dropbox/2542.kindle.images" title="Send to Dropbox." rel="nofollow"><span
<td class="noprint"></td> class="icon icon_dropbox"></span></a>
</tr> </td>
</table> <td class="noprint">
</div> <a href="/ebooks/send/gdrive/2542.kindle.images" title="Send to Google Drive."
</div> <!-- download --> rel="nofollow"><span class="icon icon_gdrive"></span></a>
<div id="more_stuff"> </td>
<h2 class="header">Similar Books</h2> <td class="noprint">
<div class="navlink noprint grayed"> <a href="/ebooks/send/msdrive/2542.kindle.images" title="Send to OneDrive." rel="nofollow"><span
<a rel="nofollow" href="/ebooks/2542/also/" accesskey="1"> class="icon icon_msdrive"></span></a>
<span class="cell leftcell"> </td>
<span class="icon icon_suggestion"></span> </tr>
</span> <tr class="odd" about="https://www.gutenberg.org/ebooks/2542.kindle.noimages" typeof="pgterms:file">
<span class="cell content"> <td><span class="icon icon_book"></span></td>
<span class="title">Readers also downloaded…</span> <td property="dcterms:format" content="application/x-mobipocket-ebook" datatype="dcterms:IMT"
</span> class="unpadded icon_save"><a
<span class="hstrut"></span> href="/ebooks/2542.kindle.noimages?session_id=945185eaedb27a3680d733ac7035fc6b3c4209bb"
</a> type="application/x-mobipocket-ebook" class="link" title="Download">Kindle (no images)</a></td>
</div> <td class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.noimages</td>
<div class="navlink grayed"> <td class="right" property="dcterms:extent" content="501378">490 kB</td>
<a rel="nofollow" href="/ebooks/bookshelf/13" accesskey="2"> <td class="noprint">
<span class="cell leftcell"> <a href="/ebooks/send/dropbox/2542.kindle.noimages" title="Send to Dropbox." rel="nofollow"><span
<span class="icon icon_bookshelf"></span> class="icon icon_dropbox"></span></a>
</span> </td>
<span class="cell content"> <td class="noprint">
<span class="title">In Best Books Ever Listings</span> <a href="/ebooks/send/gdrive/2542.kindle.noimages" title="Send to Google Drive."
</span> rel="nofollow"><span class="icon icon_gdrive"></span></a>
<span class="hstrut"></span> </td>
</a> <td class="noprint">
</div> <a href="/ebooks/send/msdrive/2542.kindle.noimages" title="Send to OneDrive." rel="nofollow"><span
</div> <!-- more stuff --> class="icon icon_msdrive"></span></a>
<div id="bibrec"> </td>
<div typeof="pgterms:ebook" about="[ebook:2542]"> </tr>
<h2>Bibliographic Record <span> <tr class="even" about="https://www.gutenberg.org/ebooks/2542.txt.utf-8" typeof="pgterms:file">
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Table:_Bibliographic_Record" title="Explain Table: Bibliographic Record."><span class="icon icon_help noprint"></span></a> <td><span class="icon icon_book"></span></td>
</span></h2> <td property="dcterms:format" content="text/plain" datatype="dcterms:IMT"
<table class="bibrec"> class="unpadded icon_save"><a href="/ebooks/2542.txt.utf-8" type="text/plain" class="link"
<colgroup> title="Download">Plain Text UTF-8</a></td>
<col class="narrow"> <td class="noscreen">https://www.gutenberg.org/ebooks/2542.txt.utf-8</td>
<col> <td class="right" property="dcterms:extent" content="165572">162 kB</td>
</colgroup> <td class="noprint"></td>
<tr> <td class="noprint"></td>
<th>Author</th> <td class="noprint"></td>
<td> </tr>
<a href="/ebooks/author/861" rel="marcrel:aut" about="/authors/861" typeof="pgterms:agent" itemprop="creator">Ibsen, Henrik, 1828-1906</a></td> <tr class="even">
</tr> <td><span class="icon icon_folder"></span></td>
<tr> <td class="unpadded icon_file"><a href="/files/2542/" class="link">More Files…</a></td>
<th>Uniform Title</th> <td class="noscreen">https://www.gutenberg.org/files/2542/</td>
<td itemprop="alternativeHeadline"> <td></td>
Et dukkehjem. English <td class="noprint"></td>
</td> <td class="noprint"></td>
</tr><tr> <td class="noprint"></td>
<th>Title</th> </tr>
<td itemprop="headline"> </table>
A Doll's House : a play </div>
</td> </div>
</tr><tr> <!-- download -->
<th>Note</th> <div id="more_stuff">
<td> <h2 class="header">Similar Books</h2>
Translation of: Et dukkehjem <div class="navlink noprint grayed">
</td> <a rel="nofollow" href="/ebooks/2542/also/" accesskey="1">
</tr> <span class="cell leftcell">
<tr property="dcterms:language" datatype="dcterms:RFC4646" itemprop="inLanguage" content="en"> <span class="icon icon_suggestion"></span>
<th>Language</th> </span>
<td>English</td> <span class="cell content">
</tr> <span class="title">Readers also downloaded…</span>
<tr property="dcterms:subject" datatype="dcterms:LCC" content="PT"> </span>
<th>LoC Class</th> <span class="hstrut"></span>
<td> </a>
<a href="/browse/loccs/pt">PT: Language and Literatures: Germanic, Scandinavian, and Icelandic literatures</a> </div>
</td> <div class="navlink grayed">
</tr> <a rel="nofollow" href="/ebooks/bookshelf/13" accesskey="2">
<tr> <span class="cell leftcell">
<th>Subject</th> <span class="icon icon_bookshelf"></span>
<td property="dcterms:subject" datatype="dcterms:LCSH"> </span>
<a class="block" href="/ebooks/subject/2655"> <span class="cell content">
Marriage -- Drama <span class="title">In Best Books Ever Listings</span>
</a> </span>
</td> <span class="hstrut"></span>
</tr><tr> </a>
<th>Subject</th> </div>
<td property="dcterms:subject" datatype="dcterms:LCSH"> </div>
<a class="block" href="/ebooks/subject/2813"> <!-- more stuff -->
Man-woman relationships -- Drama <div id="bibrec">
</a> <div typeof="pgterms:ebook" about="[ebook:2542]">
</td> <h2>Bibliographic Record <span>
</tr><tr> <a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Table:_Bibliographic_Record"
<th>Subject</th> title="Explain Table: Bibliographic Record."><span class="icon icon_help noprint"></span></a>
<td property="dcterms:subject" datatype="dcterms:LCSH"> </span>
<a class="block" href="/ebooks/subject/13173"> </h2>
Norwegian drama -- Translations into English <table class="bibrec">
</a> <colgroup>
</td> <col class="narrow">
</tr><tr> <col>
<th>Subject</th> </colgroup>
<td property="dcterms:subject" datatype="dcterms:LCSH"> <tr>
<a class="block" href="/ebooks/subject/13507"> <th>Author</th>
Wives -- Drama <td>
</a> <a href="/ebooks/author/861" rel="marcrel:aut" about="/authors/861" typeof="pgterms:agent"
</td> itemprop="creator">Ibsen, Henrik, 1828-1906</a>
</tr> </td>
<tr> </tr>
<th>Category</th> <tr>
<td property="dcterms:type" datatype="dcterms:DCMIType">Text</td> <th>Uniform Title</th>
</tr> <td itemprop="alternativeHeadline">
<tr> Et dukkehjem. English
<th>EBook-No.</th> </td>
<td>2542</td> </tr>
</tr> <tr>
<tr property="dcterms:issued" datatype="xsd:date" content="2001-03-01T00:00:00+00:00"> <th>Title</th>
<th>Release Date</th> <td itemprop="headline">
<td itemprop="datePublished">Mar 1, 2001</td> A Doll's House : a play
</tr> </td>
<tr> </tr>
<th>Copyright Status</th> <tr>
<td property="dcterms:rights">Public domain in the USA.</td> <th>Note</th>
</tr> <td>
<tr> Translation of: Et dukkehjem
<th>Downloads</th> </td>
<td itemprop="interactionCount">27056 downloads in the last 30 days.</td> </tr>
</tr> <tr property="dcterms:language" datatype="dcterms:RFC4646" itemprop="inLanguage" content="en">
<tr itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer"> <th>Language</th>
<th>Price</th> <td>English</td>
<td><span itemprop="priceCurrency" content="USD"></span><span itemprop="price">$0.00</span><span itemprop="availability" content="In Stock"><a href="http://schema.org/InStock"></a></span></td> </tr>
</tr> <tr property="dcterms:subject" datatype="dcterms:LCC" content="PT">
</table> <th>LoC Class</th>
</div> <td>
</div> <a href="/browse/loccs/pt">PT: Language and Literatures: Germanic, Scandinavian, and Icelandic
</div> literatures</a>
</div> </td>
</div> </tr>
</div> <tr>
<div id="dialog" class="hidden"> <th>Subject</th>
</div> <td property="dcterms:subject" datatype="dcterms:LCSH">
<div class="footer"> <a class="block" href="/ebooks/subject/2655">
</div> Marriage -- Drama
</div> </a>
</td>
</tr>
<tr>
<th>Subject</th>
<td property="dcterms:subject" datatype="dcterms:LCSH">
<a class="block" href="/ebooks/subject/2813">
Man-woman relationships -- Drama
</a>
</td>
</tr>
<tr>
<th>Subject</th>
<td property="dcterms:subject" datatype="dcterms:LCSH">
<a class="block" href="/ebooks/subject/13173">
Norwegian drama -- Translations into English
</a>
</td>
</tr>
<tr>
<th>Subject</th>
<td property="dcterms:subject" datatype="dcterms:LCSH">
<a class="block" href="/ebooks/subject/13507">
Wives -- Drama
</a>
</td>
</tr>
<tr>
<th>Category</th>
<td property="dcterms:type" datatype="dcterms:DCMIType">Text</td>
</tr>
<tr>
<th>EBook-No.</th>
<td>2542</td>
</tr>
<tr property="dcterms:issued" datatype="xsd:date" content="2001-03-01T00:00:00+00:00">
<th>Release Date</th>
<td itemprop="datePublished">Mar 1, 2001</td>
</tr>
<tr>
<th>Copyright Status</th>
<td property="dcterms:rights">Public domain in the USA.</td>
</tr>
<tr>
<th>Downloads</th>
<td itemprop="interactionCount">27056 downloads in the last 30 days.</td>
</tr>
<tr itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
<th>Price</th>
<td><span itemprop="priceCurrency" content="USD"></span><span itemprop="price">$0.00</span><span
itemprop="availability" content="In Stock"><a href="http://schema.org/InStock"></a></span></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="dialog" class="hidden"></div>
<div class="footer"></div>
</div>
<script src="./book.js"></script>
</body> </body>
</html> </html>

57
ebooks/book.js Normal file
View File

@ -0,0 +1,57 @@
(function ($) {
const addbtn = $('#add-to-booklist');
const url = window.location && window.location.toString().split('/');
const bookId = url[url.length - 1].match(/(\d+)/)[0];
if (JSON.parse(localStorage.getItem('booklist'))[bookId]) {
// book already in list
addbtn.html('Remove book from My Book List')
addbtn.css("background-color", "indianred");
addbtn.addClass('book-in-list')
}
addbtn.on('click', function (event) {
if (addbtn.hasClass('book-in-list')) {
removeBook();
return;
}
// add book to list
let author = '';
$("tbody>tr").each(function (index) {
const row = $(this)
const rowTitle = row.find('th:first').html();
if (rowTitle === 'Author') {
const tableRow = row.find('td:first')
author = tableRow.find('a:first').html();
}
});
const bookData = {
title: $('h1').html(),
bookId: bookId,
imgSrc: $('img.cover-art').attr('src'),
author: author,
url: window.location
};
const newList = { ...JSON.parse(localStorage.getItem('booklist')) };
newList[bookId] = bookData;
addbtn.addClass('book-in-list')
addbtn.html('Remove book from My Book List')
addbtn.css("background-color", "indianred")
localStorage.setItem('booklist', JSON.stringify(newList));
console.log(localStorage.getItem('booklist'));
});
function removeBook() {
const newlist = JSON.parse(localStorage.getItem('booklist'))
delete newlist[bookId]
localStorage.setItem('booklist', JSON.stringify(newlist));
console.log(localStorage.getItem('booklist'));
addbtn.removeClass('book-in-list')
addbtn.html('Add to My Book List')
addbtn.css("background-color", "cornflowerblue")
}
})(jQuery);

View File

@ -198,7 +198,7 @@ which contains *all* Project Gutenberg metadata in one RDF/XML file.
</a> </a>
</li> </li>
<li class="booklink"> <li class="booklink">
<a class="link" href="/ebooks/25344" accesskey="9"> <a class="link" href="./ebooks/25344.html" accesskey="9">
<span class="cell leftcell with-cover"> <span class="cell leftcell with-cover">
<img class="cover-thumb" <img class="cover-thumb"
src="https://www.gutenberg.org/cache/epub/25344/pg25344.cover.small.jpg" alt=""> src="https://www.gutenberg.org/cache/epub/25344/pg25344.cover.small.jpg" alt="">
@ -225,8 +225,8 @@ which contains *all* Project Gutenberg metadata in one RDF/XML file.
<span class="hstrut"></span> <span class="hstrut"></span>
</a> </a>
</li> </li>
<li class="booklink"> <li class="booklink" style=" border: 1px red solid">
<a class="link" href="/ebooks/2542" accesskey="1"> <a class="link" href="./ebooks/2542.html" accesskey="1">
<span class="cell leftcell with-cover"> <span class="cell leftcell with-cover">
<img class="cover-thumb" <img class="cover-thumb"
src="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.small.jpg" alt=""> src="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.small.jpg" alt="">