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>
</div>
<div class="body">
My content
<ul id="book-list">
</ul>
</div>
</div>

View File

@ -1,5 +1,20 @@
(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);

View File

@ -1,445 +1,514 @@
<!DOCTYPE html>
<!--
DON'T USE THIS PAGE FOR SCRAPING.
Seriously. You'll only get your IP blocked.
Read http://www.gutenberg.org/feeds/ to learn how to download Project
Gutenberg metadata much faster than by scraping.
--><html lang="en">
DON'T USE THIS PAGE FOR SCRAPING.
Seriously. You'll only get your IP blocked.
Read http://www.gutenberg.org/feeds/ to learn how to download Project
Gutenberg metadata much faster than by scraping.
-->
<html lang="en">
<head>
<style>
.icon { background: transparent url(/pics/sprite.png?1600787134) 0 0 no-repeat; }
</style>
<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">
<link rel="stylesheet" type="text/css" href="/gutenberg/style.css?1600787134">
<script>//
var json_search = "/ebooks/suggest/";
var canonical_url = "http://www.gutenberg.org/ebooks/2542";
var lang = "en";
var fb_lang = "en_US"; /* FB accepts only xx_XX */
var msg_load_more = "Load More Results…";
var page_mode = "screen";
var dialog_title = "";
var dialog_message = "";
//</script>
<script src="https://www.gutenberg.org/js/pg-desktop-one.js?1600787134"></script>
<link rel="shortcut icon" href="/gutenberg/favicon.ico">
<link rel="canonical" href="http://www.gutenberg.org/ebooks/2542">
<link rel="search" type="application/opensearchdescription+xml" title="Search Project Gutenberg" href="https://www.gutenberg.org/catalog/osd-books.xml">
<link rel="alternate nofollow" type="application/atom+xml;profile=opds-catalog" title="OPDS feed" href="/ebooks/2542.opds">
<link rel="apple-touch-icon" href="/gutenberg/apple-icon.png">
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="default-style" content="text/css">
<meta name="title" content="A Doll's House : a play by Henrik Ibsen">
<meta name="description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta name="keywords" content="ebook, ebooks, free ebooks, free books, book, books, audio books">
<meta name="classification" content="public">
<meta property="og:title" content="A Doll's House : a play by Henrik Ibsen">
<meta property="og:description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta property="og:type" content="book">
<meta property="og: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 property="og:site_name" content="Project Gutenberg">
<meta property="fb:app_id" content="115319388529183">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@gutenberg_new">
<meta name="twitter:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg">
<meta name="twitter:image:alt" content="book cover image">
<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">
<style>
.icon {
background: transparent url(/pics/sprite.png?1600787134) 0 0 no-repeat;
}
</style>
<link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/pg-desktop-one.css?1600787134">
<link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/new_nav.css?1600787134">
<link rel="stylesheet" type="text/css" href="https://www.gutenberg.org/gutenberg/style.css?1600787134">
<script>//
var json_search = "/ebooks/suggest/";
var canonical_url = "http://www.gutenberg.org/ebooks/2542";
var lang = "en";
var fb_lang = "en_US"; /* FB accepts only xx_XX */
var msg_load_more = "Load More Results…";
var page_mode = "screen";
var dialog_title = "";
var dialog_message = "";
//
</script>
<script src="https://www.gutenberg.org/js/pg-desktop-one.js?1600787134"></script>
<link rel="shortcut icon" href="/gutenberg/favicon.ico">
<link rel="canonical" href="http://www.gutenberg.org/ebooks/2542">
<link rel="search" type="application/opensearchdescription+xml" title="Search Project Gutenberg"
href="https://www.gutenberg.org/catalog/osd-books.xml">
<link rel="alternate nofollow" type="application/atom+xml;profile=opds-catalog" title="OPDS feed"
href="/ebooks/2542.opds">
<link rel="apple-touch-icon" href="/gutenberg/apple-icon.png">
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="default-style" content="text/css">
<meta name="title" content="A Doll's House : a play by Henrik Ibsen">
<meta name="description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta name="keywords" content="ebook, ebooks, free ebooks, free books, book, books, audio books">
<meta name="classification" content="public">
<meta property="og:title" content="A Doll's House : a play by Henrik Ibsen">
<meta property="og:description" content="Free kindle book and epub digitized and proofread by Project Gutenberg.">
<meta property="og:type" content="book">
<meta property="og: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 property="og:site_name" content="Project Gutenberg">
<meta property="fb:app_id" content="115319388529183">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@gutenberg_new">
<meta name="twitter:image" content="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.medium.jpg">
<meta name="twitter:image:alt" content="book cover image">
<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>
<body>
<div class="container">
<nav>
<!--<div id="main_logo"> -->
<a id="main_logo" href="/" class="no-hover">
<img src="https://www.gutenberg.org/gutenberg/pg-logo-129x80.png" alt="Project Gutenberg" draggable="false">
</a>
<!-- </div>-->
<div id="menu">
<label for="tm" id="toggle-menu">Menu<span class="drop-icon"></span></label>
<input type="checkbox" id="tm">
<ul class="main-menu cf">
<li>
<a href="/about/">About
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm0"></label>
<input type="checkbox" id="sm0">
<ul class="sub-menu">
<li><a href="/about/">About Project Gutenberg</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/background/">History &amp; Philosophy</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/terms_of_use.html">Terms of Use</a></li>
</ul>
</li>
<li>
<a href="/ebooks/">Search and Browse
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm8"></label>
<input type="checkbox" id="sm8">
<ul class="sub-menu">
<li><a href="/ebooks/">Book Search</a></li>
<li><a href="/ebooks/bookshelf/">Bookshelves</a></li>
<li><a href="/browse/scores/top">Frequently Downloaded</a></li>
<li><a href="/ebooks/offline_catalogs.html">Offline Catalogs</a></li>
</ul>
</li>
<li>
<a href="/help/">Help
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm3"></label>
<input type="checkbox" id="sm3">
<ul class="sub-menu">
<li><a href="/help/">All help topics →</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/file_formats.html">File Formats</a></li>
<li><a href="/help/faq.html">Frequently Asked Questions</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/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="/attic/">The Attic →</a></li>
</ul>
</li>
<li><a href="/donate/">Donate</a></li>
</ul>
</div>
<div class="donate">
<div class="searchbox">
<form method="get" action="/ebooks/search/" accept-charset="utf-8" enctype="multipart/form-data" class="searchbox">
<input type="text" value="" id="menu-book-search" name="query" class="searchInput" title="Quick search" tabindex="20" size="20" maxlength="80" placeholder=" Quick search">
<input type="submit" name="submit_search" value="Go!" style="vertical-align:middle;">
</form>
</div>
<form class="donatelink" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="new">
<p><a href="/donate/">Donation</a></p>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XKAL6BZL3YPSN">
<input class="donbtn" type="image" src="https://www.gutenberg.org/pics/en_US.gif" name="submit" alt="Donate via PayPal">
</form>
</div>
</nav>
<div class="page_content" id="content" itemscope="itemscope" itemtype="http://schema.org/Book">
<div class="breadcrumbs noprint">
<ul>
<li class="breadcrumb first" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/" title="Go to the Main page." itemprop="url"><span itemprop="title">Project Gutenberg</span></a>
</li>
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/ebooks/" title="Start a new search." itemprop="url"><span itemprop="title">63,327 free ebooks</span></a>
</li>
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/ebooks/author/861" title="Find more ebooks by the same author." itemprop="url"><span itemprop="title">52 by Henrik Ibsen</span></a>
</li>
</ul>
</div>
<h1 itemprop="name">A Doll's House : a play by Henrik Ibsen</h1>
<div class="page-body">
<div property="dcterms:publisher" itemprop="publisher" content="Project Gutenberg"></div>
<div itemprop="bookFormat" content="EBook"></div>
<div id="cover-social-wrapper">
<div id="cover">
<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>
<div id="social" class="noprint">
<ul>
<li>
<!-- tweet without javascript -->
<div class="social-button twitter-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" title="Share on Twitter" onclick="open_share_popup(this.href, this.target, 640, 320)" target="_top">
<span class="icon icon_twitter"></span>
</a>
</div>
</li>
<li>
<div class="social-button fb-share-button">
<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">
<span class="icon icon_facebook"></span>
</a>
</div>
</li>
<li>
<a onclick="printpage()" title="Print this page"><span class="icon icon_print"></span></a>
</li>
</ul>
</div>
<div id="qr">
<span class="qrcode qrcode-desktop" title="Scan QR Code for this page."></span>
</div>
</div>
<div id="tabs-wrapper">
<div id="tabs">
<div id="download">
<div about="[ebook:2542]" rel="dcterms:hasFormat">
<h2>Download This eBook</h2>
<table class="files">
<colgroup>
<col class="narrow">
<col>
<col>
<col>
<col class="narrow noprint">
<col class="narrow noprint">
<col class="narrow noprint">
</colgroup>
<tr>
<th></th>
<th>Format <span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Format" title="Explain Format."><span class="icon icon_help noprint"></span></a>
</span></th>
<th class="noscreen">Url</th>
<th class="right">Size</th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Dropbox" title="Explain Dropbox."><span class="icon icon_help noprint"></span></a>
</span></th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Google_Drive" title="Explain Google Drive."><span class="icon icon_help noprint"></span></a>
</span></th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#OneDrive" title="Explain OneDrive."><span class="icon icon_help noprint"></span></a>
</span></th>
</tr>
<tr class="even" about="https://www.gutenberg.org/files/2542/2542-h/2542-h.htm" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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>
<td class="noscreen">https://www.gutenberg.org/files/2542/2542-h/2542-h.htm</td>
<td class="right" property="dcterms:extent" content="259276">253 kB</td>
<td class="noprint">
</td>
<td class="noprint">
</td>
<td class="noprint">
<a href="/ebooks/send/megaupload/2542.html" title="Send to MegaUpload." rel="nofollow"></a>
</td>
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.epub.images" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.images</td>
<td class="right" property="dcterms:extent" content="115185">112 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.epub.images" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.epub.images" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.epub.images" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a>
</td>
</tr><tr class="odd" about="https://www.gutenberg.org/ebooks/2542.epub.noimages" typeof="pgterms:file">
<td><span class="icon icon_book"></span></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="noscreen">https://www.gutenberg.org/ebooks/2542.epub.noimages</td>
<td class="right" property="dcterms:extent" content="115186">112 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.epub.noimages" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.epub.noimages" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.epub.noimages" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a>
</td>
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.kindle.images" typeof="pgterms:file">
<td><span class="icon icon_book"></span></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="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.images</td>
<td class="right" property="dcterms:extent" content="501389">490 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.kindle.images" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.kindle.images" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.kindle.images" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a>
</td>
</tr><tr class="odd" about="https://www.gutenberg.org/ebooks/2542.kindle.noimages" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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 class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.noimages</td>
<td class="right" property="dcterms:extent" content="501378">490 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.kindle.noimages" title="Send to Dropbox." rel="nofollow"><span class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.kindle.noimages" title="Send to Google Drive." rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.kindle.noimages" title="Send to OneDrive." rel="nofollow"><span class="icon icon_msdrive"></span></a>
</td>
</tr><tr class="even" about="https://www.gutenberg.org/ebooks/2542.txt.utf-8" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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 class="noscreen">https://www.gutenberg.org/ebooks/2542.txt.utf-8</td>
<td class="right" property="dcterms:extent" content="165572">162 kB</td>
<td class="noprint">
</td>
<td class="noprint">
</td>
<td class="noprint">
</td>
</tr>
<tr class="even">
<td><span class="icon icon_folder"></span></td>
<td class="unpadded icon_file"><a href="/files/2542/" class="link">More Files…</a></td>
<td class="noscreen">https://www.gutenberg.org/files/2542/</td>
<td></td>
<td class="noprint"></td>
<td class="noprint"></td>
<td class="noprint"></td>
</tr>
</table>
</div>
</div> <!-- download -->
<div id="more_stuff">
<h2 class="header">Similar Books</h2>
<div class="navlink noprint grayed">
<a rel="nofollow" href="/ebooks/2542/also/" accesskey="1">
<span class="cell leftcell">
<span class="icon icon_suggestion"></span>
</span>
<span class="cell content">
<span class="title">Readers also downloaded…</span>
</span>
<span class="hstrut"></span>
</a>
</div>
<div class="navlink grayed">
<a rel="nofollow" href="/ebooks/bookshelf/13" accesskey="2">
<span class="cell leftcell">
<span class="icon icon_bookshelf"></span>
</span>
<span class="cell content">
<span class="title">In Best Books Ever Listings</span>
</span>
<span class="hstrut"></span>
</a>
</div>
</div> <!-- more stuff -->
<div id="bibrec">
<div typeof="pgterms:ebook" about="[ebook:2542]">
<h2>Bibliographic Record <span>
<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>
</span></h2>
<table class="bibrec">
<colgroup>
<col class="narrow">
<col>
</colgroup>
<tr>
<th>Author</th>
<td>
<a href="/ebooks/author/861" rel="marcrel:aut" about="/authors/861" typeof="pgterms:agent" itemprop="creator">Ibsen, Henrik, 1828-1906</a></td>
</tr>
<tr>
<th>Uniform Title</th>
<td itemprop="alternativeHeadline">
Et dukkehjem. English
</td>
</tr><tr>
<th>Title</th>
<td itemprop="headline">
A Doll's House : a play
</td>
</tr><tr>
<th>Note</th>
<td>
Translation of: Et dukkehjem
</td>
</tr>
<tr property="dcterms:language" datatype="dcterms:RFC4646" itemprop="inLanguage" content="en">
<th>Language</th>
<td>English</td>
</tr>
<tr property="dcterms:subject" datatype="dcterms:LCC" content="PT">
<th>LoC Class</th>
<td>
<a href="/browse/loccs/pt">PT: Language and Literatures: Germanic, Scandinavian, and Icelandic literatures</a>
</td>
</tr>
<tr>
<th>Subject</th>
<td property="dcterms:subject" datatype="dcterms:LCSH">
<a class="block" href="/ebooks/subject/2655">
Marriage -- Drama
</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>
<div class="container">
<nav>
<!--<div id="main_logo"> -->
<a id="main_logo" href="/" class="no-hover">
<img src="https://www.gutenberg.org/gutenberg/pg-logo-129x80.png" alt="Project Gutenberg" draggable="false">
</a>
<!-- </div>-->
<div id="menu">
<label for="tm" id="toggle-menu">Menu<span class="drop-icon"></span></label>
<input type="checkbox" id="tm">
<ul class="main-menu cf">
<li>
<a href="/about/">About
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm0"></label>
<input type="checkbox" id="sm0">
<ul class="sub-menu">
<li><a href="/about/">About Project Gutenberg</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/background/">History &amp; Philosophy</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/terms_of_use.html">Terms of Use</a></li>
</ul>
</li>
<li>
<a href="/ebooks/">Search and Browse
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm8"></label>
<input type="checkbox" id="sm8">
<ul class="sub-menu">
<li><a href="/ebooks/">Book Search</a></li>
<li><a href="/ebooks/bookshelf/">Bookshelves</a></li>
<li><a href="/browse/scores/top">Frequently Downloaded</a></li>
<li><a href="/ebooks/offline_catalogs.html">Offline Catalogs</a></li>
</ul>
</li>
<li>
<a href="/help/">Help
<span class="drop-icon"></span>
</a>
<label title="Toggle Drop-down" class="drop-icon" for="sm3"></label>
<input type="checkbox" id="sm3">
<ul class="sub-menu">
<li><a href="/help/">All help topics →</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/file_formats.html">File Formats</a></li>
<li><a href="/help/faq.html">Frequently Asked Questions</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/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="/attic/">The Attic →</a></li>
</ul>
</li>
<li><a href="/donate/">Donate</a></li>
</ul>
</div>
<div class="donate">
<div class="searchbox">
<form method="get" action="/ebooks/search/" accept-charset="utf-8" enctype="multipart/form-data"
class="searchbox">
<input type="text" value="" id="menu-book-search" name="query" class="searchInput" title="Quick search"
tabindex="20" size="20" maxlength="80" placeholder=" Quick search">
<input type="submit" name="submit_search" value="Go!" style="vertical-align:middle;">
</form>
</div>
<form class="donatelink" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="new">
<p><a href="/donate/">Donation</a></p>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XKAL6BZL3YPSN">
<input class="donbtn" type="image" src="https://www.gutenberg.org/pics/en_US.gif" name="submit"
alt="Donate via PayPal">
</form>
</div>
</nav>
<div class="page_content" id="content" itemscope="itemscope" itemtype="http://schema.org/Book">
<div class="breadcrumbs noprint">
<ul>
<li class="breadcrumb first" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/" title="Go to the Main page." itemprop="url"><span itemprop="title">Project Gutenberg</span></a>
</li>
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/ebooks/" title="Start a new search." itemprop="url"><span itemprop="title">63,327 free
ebooks</span></a>
</li>
<li class="breadcrumb next" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="breadcrumb-separator"></span>
<a href="/ebooks/author/861" title="Find more ebooks by the same author." itemprop="url"><span
itemprop="title">52 by Henrik Ibsen</span></a>
</li>
</ul>
</div>
<h1 itemprop="name">A Doll's House : a play by Henrik Ibsen</h1>
<div class="page-body">
<div property="dcterms:publisher" itemprop="publisher" content="Project Gutenberg"></div>
<div itemprop="bookFormat" content="EBook"></div>
<div id="cover-social-wrapper">
<div id="cover">
<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>
<div id="social" class="noprint">
<ul>
<li>
<!-- tweet without javascript -->
<div class="social-button twitter-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"
title="Share on Twitter" onclick="open_share_popup(this.href, this.target, 640, 320)" target="_top">
<span class="icon icon_twitter"></span>
</a>
</div>
</li>
<li>
<div class="social-button fb-share-button">
<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">
<span class="icon icon_facebook"></span>
</a>
</div>
</li>
<li>
<a onclick="printpage()" title="Print this page"><span class="icon icon_print"></span></a>
</li>
</ul>
</div>
<div id="qr">
<span class="qrcode qrcode-desktop" title="Scan QR Code for this page."></span>
</div>
</div>
<div id="tabs-wrapper">
<div id="tabs">
<div id="download">
<div about="[ebook:2542]" rel="dcterms:hasFormat">
<h2>Download This eBook</h2>
<button id="add-to-booklist"
style="float: right;padding: 3px 5px;margin-top: -50px;background-color: cornflowerblue;">Add to My
Book List</button>
<table class="files">
<colgroup>
<col class="narrow">
<col>
<col>
<col>
<col class="narrow noprint">
<col class="narrow noprint">
<col class="narrow noprint">
</colgroup>
<tr>
<th></th>
<th>Format <span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Format" title="Explain Format."><span
class="icon icon_help noprint"></span></a>
</span>
</th>
<th class="noscreen">Url</th>
<th class="right">Size</th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Dropbox"
title="Explain Dropbox."><span class="icon icon_help noprint"></span></a>
</span>
</th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#Google_Drive"
title="Explain Google Drive."><span class="icon icon_help noprint"></span></a>
</span>
</th>
<th class="noprint"><span>
<a href="/wiki/Gutenberg:Help_on_Bibliographic_Record_Page#OneDrive"
title="Explain OneDrive."><span class="icon icon_help noprint"></span></a>
</span>
</th>
</tr>
<tr class="even" about="https://www.gutenberg.org/files/2542/2542-h/2542-h.htm" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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>
<td class="noscreen">https://www.gutenberg.org/files/2542/2542-h/2542-h.htm</td>
<td class="right" property="dcterms:extent" content="259276">253 kB</td>
<td class="noprint"></td>
<td class="noprint"></td>
<td class="noprint">
<a href="/ebooks/send/megaupload/2542.html" title="Send to MegaUpload." rel="nofollow"></a>
</td>
</tr>
<tr class="even" about="https://www.gutenberg.org/ebooks/2542.epub.images" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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>
<td class="noscreen">https://www.gutenberg.org/ebooks/2542.epub.images</td>
<td class="right" property="dcterms:extent" content="115185">112 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.epub.images" title="Send to Dropbox." rel="nofollow"><span
class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.epub.images" title="Send to Google Drive." rel="nofollow"><span
class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.epub.images" title="Send to OneDrive." rel="nofollow"><span
class="icon icon_msdrive"></span></a>
</td>
</tr>
<tr class="odd" about="https://www.gutenberg.org/ebooks/2542.epub.noimages" typeof="pgterms:file">
<td><span class="icon icon_book"></span></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="noscreen">https://www.gutenberg.org/ebooks/2542.epub.noimages</td>
<td class="right" property="dcterms:extent" content="115186">112 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.epub.noimages" title="Send to Dropbox." rel="nofollow"><span
class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.epub.noimages" title="Send to Google Drive."
rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.epub.noimages" title="Send to OneDrive." rel="nofollow"><span
class="icon icon_msdrive"></span></a>
</td>
</tr>
<tr class="even" about="https://www.gutenberg.org/ebooks/2542.kindle.images" typeof="pgterms:file">
<td><span class="icon icon_book"></span></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="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.images</td>
<td class="right" property="dcterms:extent" content="501389">490 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.kindle.images" title="Send to Dropbox." rel="nofollow"><span
class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.kindle.images" title="Send to Google Drive."
rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.kindle.images" title="Send to OneDrive." rel="nofollow"><span
class="icon icon_msdrive"></span></a>
</td>
</tr>
<tr class="odd" about="https://www.gutenberg.org/ebooks/2542.kindle.noimages" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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 class="noscreen">https://www.gutenberg.org/ebooks/2542.kindle.noimages</td>
<td class="right" property="dcterms:extent" content="501378">490 kB</td>
<td class="noprint">
<a href="/ebooks/send/dropbox/2542.kindle.noimages" title="Send to Dropbox." rel="nofollow"><span
class="icon icon_dropbox"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/gdrive/2542.kindle.noimages" title="Send to Google Drive."
rel="nofollow"><span class="icon icon_gdrive"></span></a>
</td>
<td class="noprint">
<a href="/ebooks/send/msdrive/2542.kindle.noimages" title="Send to OneDrive." rel="nofollow"><span
class="icon icon_msdrive"></span></a>
</td>
</tr>
<tr class="even" about="https://www.gutenberg.org/ebooks/2542.txt.utf-8" typeof="pgterms:file">
<td><span class="icon icon_book"></span></td>
<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 class="noscreen">https://www.gutenberg.org/ebooks/2542.txt.utf-8</td>
<td class="right" property="dcterms:extent" content="165572">162 kB</td>
<td class="noprint"></td>
<td class="noprint"></td>
<td class="noprint"></td>
</tr>
<tr class="even">
<td><span class="icon icon_folder"></span></td>
<td class="unpadded icon_file"><a href="/files/2542/" class="link">More Files…</a></td>
<td class="noscreen">https://www.gutenberg.org/files/2542/</td>
<td></td>
<td class="noprint"></td>
<td class="noprint"></td>
<td class="noprint"></td>
</tr>
</table>
</div>
</div>
<!-- download -->
<div id="more_stuff">
<h2 class="header">Similar Books</h2>
<div class="navlink noprint grayed">
<a rel="nofollow" href="/ebooks/2542/also/" accesskey="1">
<span class="cell leftcell">
<span class="icon icon_suggestion"></span>
</span>
<span class="cell content">
<span class="title">Readers also downloaded…</span>
</span>
<span class="hstrut"></span>
</a>
</div>
<div class="navlink grayed">
<a rel="nofollow" href="/ebooks/bookshelf/13" accesskey="2">
<span class="cell leftcell">
<span class="icon icon_bookshelf"></span>
</span>
<span class="cell content">
<span class="title">In Best Books Ever Listings</span>
</span>
<span class="hstrut"></span>
</a>
</div>
</div>
<!-- more stuff -->
<div id="bibrec">
<div typeof="pgterms:ebook" about="[ebook:2542]">
<h2>Bibliographic Record <span>
<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>
</span>
</h2>
<table class="bibrec">
<colgroup>
<col class="narrow">
<col>
</colgroup>
<tr>
<th>Author</th>
<td>
<a href="/ebooks/author/861" rel="marcrel:aut" about="/authors/861" typeof="pgterms:agent"
itemprop="creator">Ibsen, Henrik, 1828-1906</a>
</td>
</tr>
<tr>
<th>Uniform Title</th>
<td itemprop="alternativeHeadline">
Et dukkehjem. English
</td>
</tr>
<tr>
<th>Title</th>
<td itemprop="headline">
A Doll's House : a play
</td>
</tr>
<tr>
<th>Note</th>
<td>
Translation of: Et dukkehjem
</td>
</tr>
<tr property="dcterms:language" datatype="dcterms:RFC4646" itemprop="inLanguage" content="en">
<th>Language</th>
<td>English</td>
</tr>
<tr property="dcterms:subject" datatype="dcterms:LCC" content="PT">
<th>LoC Class</th>
<td>
<a href="/browse/loccs/pt">PT: Language and Literatures: Germanic, Scandinavian, and Icelandic
literatures</a>
</td>
</tr>
<tr>
<th>Subject</th>
<td property="dcterms:subject" datatype="dcterms:LCSH">
<a class="block" href="/ebooks/subject/2655">
Marriage -- Drama
</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>
</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>
</li>
<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">
<img class="cover-thumb"
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>
</a>
</li>
<li class="booklink">
<a class="link" href="/ebooks/2542" accesskey="1">
<li class="booklink" style=" border: 1px red solid">
<a class="link" href="./ebooks/2542.html" accesskey="1">
<span class="cell leftcell with-cover">
<img class="cover-thumb"
src="https://www.gutenberg.org/cache/epub/2542/pg2542.cover.small.jpg" alt="">