@internetarchive/bookreader 5.0.0-94 → 5.0.0-96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BookReader/BookReader.js +1 -1
- package/BookReader/hypothesis/LICENSE +50 -0
- package/BookReader/hypothesis/README.md +55 -0
- package/BookReader/hypothesis/build/boot.js +1 -0
- package/BookReader/hypothesis/build/manifest.json +20 -0
- package/BookReader/hypothesis/build/scripts/annotator.bundle.js +184 -0
- package/BookReader/hypothesis/build/scripts/annotator.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/scripts/sidebar.bundle.js +798 -0
- package/BookReader/hypothesis/build/scripts/sidebar.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js +711 -0
- package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/styles/annotator.css +2235 -0
- package/BookReader/hypothesis/build/styles/annotator.css.map +1 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/highlights.css +2 -0
- package/BookReader/hypothesis/build/styles/highlights.css.map +1 -0
- package/BookReader/hypothesis/build/styles/katex.min.css +2 -0
- package/BookReader/hypothesis/build/styles/katex.min.css.map +1 -0
- package/BookReader/hypothesis/build/styles/pdfjs-overrides.css +2 -0
- package/BookReader/hypothesis/build/styles/pdfjs-overrides.css.map +1 -0
- package/BookReader/hypothesis/build/styles/sidebar.css +2731 -0
- package/BookReader/hypothesis/build/styles/sidebar.css.map +1 -0
- package/BookReader/hypothesis/build/styles/ui-playground.css +2659 -0
- package/BookReader/hypothesis/build/styles/ui-playground.css.map +1 -0
- package/BookReader/hypothesis/package.json +126 -0
- package/README.md +0 -2
- package/package.json +6 -1
- package/.eslintrc.cjs +0 -51
- package/.gitattributes +0 -2
- package/.github/ISSUE_TEMPLATE/bug.md +0 -32
- package/.github/ISSUE_TEMPLATE/feature-request.md +0 -30
- package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -15
- package/.github/workflows/node.js.yml +0 -102
- package/.github/workflows/npm-publish.yml +0 -33
- package/.testcaferc.cjs +0 -10
- package/BookReaderDemo/BookReaderDemo.css +0 -40
- package/BookReaderDemo/BookReaderJSAdvanced.js +0 -112
- package/BookReaderDemo/BookReaderJSSimple.js +0 -56
- package/BookReaderDemo/IADemoBr.js +0 -149
- package/BookReaderDemo/assets/v5/Bookreader-logo-cool-grad.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-flat.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-hex-cool-grad.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-hex-flat.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-lines.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-lines.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-warm.svg +0 -1
- package/BookReaderDemo/assets/v5/bookreader-logo-renders@1x.png +0 -0
- package/BookReaderDemo/assets/v5/bookreader-logo-renders@2x.png +0 -0
- package/BookReaderDemo/assets/v5/bookreader-v5-screenshot.png +0 -0
- package/BookReaderDemo/demo-advanced.html +0 -33
- package/BookReaderDemo/demo-embed-iframe-src.html +0 -85
- package/BookReaderDemo/demo-embed.html +0 -26
- package/BookReaderDemo/demo-fullscreen-mobile.html +0 -34
- package/BookReaderDemo/demo-fullscreen.html +0 -31
- package/BookReaderDemo/demo-iiif.html +0 -121
- package/BookReaderDemo/demo-internetarchive.html +0 -271
- package/BookReaderDemo/demo-multiple.html +0 -44
- package/BookReaderDemo/demo-preview-pages.html +0 -1093
- package/BookReaderDemo/demo-simple.html +0 -35
- package/BookReaderDemo/demo-vendor-fullscreen.html +0 -34
- package/BookReaderDemo/ia-multiple-volumes-manifest.js +0 -169
- package/BookReaderDemo/immersion-1up.html +0 -64
- package/BookReaderDemo/immersion-mode.html +0 -33
- package/BookReaderDemo/toggle_controls.html +0 -54
- package/BookReaderDemo/view_mode.html +0 -40
- package/BookReaderDemo/viewmode-cycle.html +0 -40
- package/CHANGELOG.md +0 -1080
- package/CONTRIBUTING.md +0 -7
- package/babel.config.cjs +0 -20
- package/codecov.yml +0 -23
- package/index.html +0 -34
- package/netlify.toml +0 -9
- package/renovate.json +0 -52
- package/screenshot.png +0 -0
- package/scripts/postversion.js +0 -11
- package/scripts/preversion.js +0 -15
- package/scripts/version.js +0 -27
- package/tests/e2e/README.md +0 -112
- package/tests/e2e/autoplay.test.js +0 -16
- package/tests/e2e/base.test.js +0 -27
- package/tests/e2e/helpers/base.js +0 -263
- package/tests/e2e/helpers/debug.js +0 -13
- package/tests/e2e/helpers/mockSearch.js +0 -90
- package/tests/e2e/helpers/params.js +0 -17
- package/tests/e2e/helpers/rightToLeft.js +0 -23
- package/tests/e2e/helpers/search.js +0 -73
- package/tests/e2e/models/BookReader.js +0 -11
- package/tests/e2e/models/Navigation.js +0 -39
- package/tests/e2e/rightToLeft.test.js +0 -19
- package/tests/e2e/viewmode.test.js +0 -44
- package/tests/jest/BookNavigator/book-navigator.test.js +0 -653
- package/tests/jest/BookNavigator/bookmarks/bookmark-button.test.js +0 -43
- package/tests/jest/BookNavigator/bookmarks/bookmark-edit.test.js +0 -132
- package/tests/jest/BookNavigator/bookmarks/bookmarks-list.test.js +0 -221
- package/tests/jest/BookNavigator/bookmarks/ia-bookmarks.test.js +0 -45
- package/tests/jest/BookNavigator/downloads/downloads-provider.test.js +0 -67
- package/tests/jest/BookNavigator/downloads/downloads.test.js +0 -53
- package/tests/jest/BookNavigator/search/search-provider.test.js +0 -179
- package/tests/jest/BookNavigator/search/search-results.test.js +0 -289
- package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +0 -49
- package/tests/jest/BookNavigator/viewable-files/viewable-files-provider.test.js +0 -80
- package/tests/jest/BookNavigator/visual-adjustments.test.js +0 -200
- package/tests/jest/BookReader/BookModel.test.js +0 -372
- package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +0 -263
- package/tests/jest/BookReader/ImageCache.test.js +0 -150
- package/tests/jest/BookReader/Mode1UpLit.test.js +0 -73
- package/tests/jest/BookReader/Mode2Up.test.js +0 -98
- package/tests/jest/BookReader/Mode2UpLit.test.js +0 -190
- package/tests/jest/BookReader/ModeCoordinateSpace.test.js +0 -16
- package/tests/jest/BookReader/ModeSmoothZoom.test.js +0 -218
- package/tests/jest/BookReader/ModeThumb.test.js +0 -71
- package/tests/jest/BookReader/Navbar/Navbar.test.js +0 -182
- package/tests/jest/BookReader/PageContainer.test.js +0 -249
- package/tests/jest/BookReader/ReduceSet.test.js +0 -38
- package/tests/jest/BookReader/Toolbar/Toolbar.test.js +0 -26
- package/tests/jest/BookReader/utils/HTMLDimensionsCacher.test.js +0 -59
- package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +0 -49
- package/tests/jest/BookReader/utils/SelectionObserver.test.js +0 -57
- package/tests/jest/BookReader/utils/classes.test.js +0 -88
- package/tests/jest/BookReader/utils.test.js +0 -250
- package/tests/jest/BookReader.keyboard.test.js +0 -190
- package/tests/jest/BookReader.options.test.js +0 -47
- package/tests/jest/BookReader.test.js +0 -316
- package/tests/jest/plugins/plugin.archive_analytics.test.js +0 -20
- package/tests/jest/plugins/plugin.autoplay.test.js +0 -35
- package/tests/jest/plugins/plugin.chapters.test.js +0 -193
- package/tests/jest/plugins/plugin.iframe.test.js +0 -42
- package/tests/jest/plugins/plugin.resume.test.js +0 -85
- package/tests/jest/plugins/plugin.text_selection.test.js +0 -447
- package/tests/jest/plugins/plugin.vendor-fullscreen.test.js +0 -65
- package/tests/jest/plugins/search/plugin.search.test.js +0 -120
- package/tests/jest/plugins/search/plugin.search.view.test.js +0 -131
- package/tests/jest/plugins/search/utils.js +0 -25
- package/tests/jest/plugins/search/utils.test.js +0 -29
- package/tests/jest/plugins/tts/AbstractTTSEngine.test.js +0 -173
- package/tests/jest/plugins/tts/FestivalTTSEngine.test.js +0 -59
- package/tests/jest/plugins/tts/PageChunk.test.js +0 -57
- package/tests/jest/plugins/tts/PageChunkIterator.test.js +0 -179
- package/tests/jest/plugins/tts/WebTTSEngine.test.js +0 -178
- package/tests/jest/plugins/tts/utils.test.js +0 -74
- package/tests/jest/plugins/url/UrlPlugin.test.js +0 -198
- package/tests/jest/plugins/url/plugin.url.test.js +0 -168
- package/tests/jest/setup.js +0 -3
- package/tests/jest/util/browserSniffing.test.js +0 -62
- package/tests/jest/util/docCookies.test.js +0 -24
- package/tests/jest/util/strings.test.js +0 -63
- package/tests/jest/utils.js +0 -83
- package/webpack.config.js +0 -97
@@ -1,33 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>bookreader demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<!-- JS dependencies -->
|
10
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
11
|
-
<script src="../BookReader/jquery-3.js"></script>
|
12
|
-
|
13
|
-
|
14
|
-
<!-- BookReader and plugins -->
|
15
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
16
|
-
<script src="../BookReader/BookReader.js"></script>
|
17
|
-
<script type="text/javascript" src="../BookReader/plugins/plugin.url.js"></script>
|
18
|
-
|
19
|
-
<!-- Custom CSS overrides -->
|
20
|
-
<link rel="stylesheet" href="BookReaderDemo.css"/>
|
21
|
-
</head>
|
22
|
-
<body>
|
23
|
-
<div id="BookReader">
|
24
|
-
Internet Archive BookReader Demo<br/>
|
25
|
-
<noscript>
|
26
|
-
<p>
|
27
|
-
The BookReader requires JavaScript to be enabled. Please check that your browser supports JavaScript and that it is enabled in the browser settings. You can also try one of the <a href="https://archive.org/details/goodytwoshoes00newyiala"> other formats of the book</a>.
|
28
|
-
</p>
|
29
|
-
</noscript>
|
30
|
-
</div>
|
31
|
-
<script type="text/javascript" src="BookReaderJSAdvanced.js"></script>
|
32
|
-
</body>
|
33
|
-
</html>
|
@@ -1,85 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>bookreader demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
10
|
-
|
11
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
12
|
-
<script src="../BookReader/jquery-3.js"></script>
|
13
|
-
|
14
|
-
|
15
|
-
<script src="../BookReader/BookReader.js"></script>
|
16
|
-
|
17
|
-
<!-- Plugins -->
|
18
|
-
<script src="../BookReader/plugins/plugin.iframe.js"></script>
|
19
|
-
|
20
|
-
<style>
|
21
|
-
html, body, #BookReader { width: 100%; height:100%; margin:0; padding: 0; }
|
22
|
-
</style>
|
23
|
-
</head>
|
24
|
-
<body style="background-color: #939598;">
|
25
|
-
|
26
|
-
<div id="BookReader">
|
27
|
-
Internet Archive BookReader Demo<br/>
|
28
|
-
|
29
|
-
<noscript>
|
30
|
-
<p>
|
31
|
-
The BookReader requires JavaScript to be enabled. Please check that your browser supports JavaScript and that it is enabled in the browser settings. You can also try one of the <a href="https://archive.org/details/goodytwoshoes00newyiala"> other formats of the book</a>.
|
32
|
-
</p>
|
33
|
-
</noscript>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
|
37
|
-
<script type="text/javascript">
|
38
|
-
var options = {
|
39
|
-
data: [
|
40
|
-
[
|
41
|
-
{ width: 800, height: 1200,
|
42
|
-
uri: '//archive.org/download/BookReader/img/page001.jpg' },
|
43
|
-
],
|
44
|
-
[
|
45
|
-
{ width: 800, height: 1200,
|
46
|
-
uri: '//archive.org/download/BookReader/img/page002.jpg' },
|
47
|
-
{ width: 800, height: 1200,
|
48
|
-
uri: '//archive.org/download/BookReader/img/page003.jpg' },
|
49
|
-
],
|
50
|
-
[
|
51
|
-
{ width: 800, height: 1200,
|
52
|
-
uri: '//archive.org/download/BookReader/img/page004.jpg' },
|
53
|
-
{ width: 800, height: 1200,
|
54
|
-
uri: '//archive.org/download/BookReader/img/page005.jpg' },
|
55
|
-
]
|
56
|
-
],
|
57
|
-
|
58
|
-
// Book title and the URL used for the book title link
|
59
|
-
bookTitle: 'Simple BookReader Presentation',
|
60
|
-
bookUrl: 'https://archive.org/details/BookReader',
|
61
|
-
bookUrlText: 'Back to Archive.org',
|
62
|
-
bookUrlTitle: 'Back to Archive.org',
|
63
|
-
|
64
|
-
// thumbnail is optional, but it is used in the info dialog
|
65
|
-
thumbnail: '//archive.org/download/BookReader/img/page014.jpg',
|
66
|
-
// Metadata is optional, but it is used in the info dialog
|
67
|
-
metadata: [
|
68
|
-
{label: 'Title', value: 'Open Library BookReader Presentation'},
|
69
|
-
{label: 'Author', value: 'Internet Archive'},
|
70
|
-
{label: 'Demo Info', value: 'This demo shows how one could use BookReader with their own content.'},
|
71
|
-
],
|
72
|
-
|
73
|
-
// Override the path used to find UI images
|
74
|
-
imagesBaseURL: '../BookReader/images/',
|
75
|
-
|
76
|
-
ui: 'embed', // embed, full (responsive)
|
77
|
-
|
78
|
-
el: '#BookReader',
|
79
|
-
};
|
80
|
-
var br = new BookReader(options);
|
81
|
-
br.init();
|
82
|
-
</script>
|
83
|
-
|
84
|
-
</body>
|
85
|
-
</html>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>bookreader embed demo</title>
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
6
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
7
|
-
<style>
|
8
|
-
.bookreader-wrapper {
|
9
|
-
border: 2px solid grey;
|
10
|
-
width: 600px;
|
11
|
-
height: 400px;
|
12
|
-
}
|
13
|
-
code {
|
14
|
-
background-color: lightgrey;
|
15
|
-
color: black;
|
16
|
-
padding: 2px;
|
17
|
-
}
|
18
|
-
</style>
|
19
|
-
</head>
|
20
|
-
<body>
|
21
|
-
<h1>BookReader embed example</h1>
|
22
|
-
<p>The following content is embedded in an iframe.</p>
|
23
|
-
<p>Enable the embed mode with <code>br.ui = 'embed'</code></p>
|
24
|
-
<iframe class="bookreader-wrapper" src="demo-embed-iframe-src.html"></iframe>
|
25
|
-
</body>
|
26
|
-
</html>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>BookReader fullscreen demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<!-- JS dependencies -->
|
10
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
11
|
-
<script src="../BookReader/jquery-3.js"></script>
|
12
|
-
|
13
|
-
|
14
|
-
<!-- BookReader and plugins -->
|
15
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
16
|
-
<script src="../BookReader/BookReader.js"></script>
|
17
|
-
|
18
|
-
<!-- URL-changing plugin -->
|
19
|
-
<script src="../BookReader/plugins/plugin.url.js"></script>
|
20
|
-
|
21
|
-
<style>
|
22
|
-
html, body { width: 100%; height: 100%; margin: 0; padding: 0; background: grey; }
|
23
|
-
.BookReader { width: 100vw; height: 100vw; }
|
24
|
-
</style>
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
<h1>My page with a bookreader</h1>
|
28
|
-
<div id="BookReader"></div>
|
29
|
-
<script type="text/javascript" src="BookReaderJSSimple.js"></script>
|
30
|
-
<script>
|
31
|
-
instantiateBookReader('#BookReader');
|
32
|
-
</script>
|
33
|
-
</body>
|
34
|
-
</html>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>BookReader fullscreen demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<!-- JS dependencies -->
|
10
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
11
|
-
<script src="../BookReader/jquery-3.js"></script>
|
12
|
-
|
13
|
-
|
14
|
-
<!-- BookReader and plugins -->
|
15
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
16
|
-
<script src="../BookReader/BookReader.js"></script>
|
17
|
-
|
18
|
-
<!-- URL-changing plugin -->
|
19
|
-
<script src="../BookReader/plugins/plugin.url.js"></script>
|
20
|
-
|
21
|
-
<style>
|
22
|
-
html, body { width: 100%; height: 100%; margin: 0; padding: 0; }
|
23
|
-
#BookReader { width: 100%; height: 100%; }
|
24
|
-
</style>
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
<div id="BookReader"></div>
|
28
|
-
<script type="text/javascript" src="BookReaderJSSimple.js"></script>
|
29
|
-
<script>instantiateBookReader('#BookReader')</script>
|
30
|
-
</body>
|
31
|
-
</html>
|
@@ -1,121 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
5
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
6
|
-
|
7
|
-
<!-- WC dependencies -->
|
8
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es2015%2Ces5%2CglobalThis"></script>
|
9
|
-
<script type="text/javascript" src="https://unpkg.com/lit@2.1.2/polyfill-support.js"></script>
|
10
|
-
<script type="text/javascript" src="https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-bundle.js"></script>
|
11
|
-
|
12
|
-
|
13
|
-
<!-- JS dependencies -->
|
14
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
15
|
-
<script src="../BookReader/jquery-3.js"></script>
|
16
|
-
|
17
|
-
|
18
|
-
<!-- BookReader -->
|
19
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
20
|
-
<script src="../BookReader/BookReader.js"></script>
|
21
|
-
<script src="../BookReader/plugins/plugin.iiif.js"></script>
|
22
|
-
<script src="../BookReader/plugins/plugin.url.js"></script>
|
23
|
-
|
24
|
-
<script type="module" src="../BookReader/ia-bookreader-bundle.js"></script>
|
25
|
-
|
26
|
-
<!-- Custom CSS overrides -->
|
27
|
-
<link rel="stylesheet" href="BookReaderDemo.css"/>
|
28
|
-
|
29
|
-
<style>
|
30
|
-
body > section { padding: 0 10px; }
|
31
|
-
</style>
|
32
|
-
</head>
|
33
|
-
<body>
|
34
|
-
|
35
|
-
<ia-bookreader>
|
36
|
-
<div id="IABookReaderWrapper" slot="main">
|
37
|
-
<div id="BookReader" class="BookReader"></div>
|
38
|
-
</div>
|
39
|
-
<div>
|
40
|
-
Internet Archive BookReader Demo<br />
|
41
|
-
<noscript>
|
42
|
-
<p>
|
43
|
-
The BookReader requires JavaScript to be enabled. Please check that
|
44
|
-
your browser supports JavaScript and that it is enabled in the
|
45
|
-
browser settings.
|
46
|
-
</p>
|
47
|
-
</noscript>
|
48
|
-
</div>
|
49
|
-
</ia-bookreader>
|
50
|
-
|
51
|
-
<hr />
|
52
|
-
|
53
|
-
<section>
|
54
|
-
<form id="manifestForm">
|
55
|
-
Try another manifest: <input type="url" id="manifest"
|
56
|
-
value="https://view.nls.uk/manifest/2423/3907/242339078/manifest.json" size="60">
|
57
|
-
<input type="submit" value="Go">
|
58
|
-
</form>
|
59
|
-
|
60
|
-
<details open>
|
61
|
-
<summary>Test books</summary>
|
62
|
-
<ul>
|
63
|
-
<li>
|
64
|
-
Version 2.0 of the IIIF Presentation API
|
65
|
-
<ul>
|
66
|
-
<li>
|
67
|
-
<a
|
68
|
-
href="/BookReaderDemo/demo-iiif.html?manifest=https%3A%2F%2Fview.nls.uk%2Fmanifest%2F2423%2F3907%2F242339078%2Fmanifest.json">
|
69
|
-
https://view.nls.uk/manifest/2423/3907/242339078/manifest.json
|
70
|
-
</a>
|
71
|
-
</li>
|
72
|
-
</ul>
|
73
|
-
</li>
|
74
|
-
<li>
|
75
|
-
Version 3.0 of the IIIF Presentation API
|
76
|
-
<ul>
|
77
|
-
<li>
|
78
|
-
<a
|
79
|
-
href="/BookReaderDemo/demo-iiif.html?manifest=https%3A%2F%2Fiiif.archive.org%2Fiiif%2F3%2Fplatowithenglish04platuoft%2Fmanifest.json">
|
80
|
-
https://iiif.archive.org/iiif/3/platowithenglish04platuoft/manifest.json
|
81
|
-
</a>
|
82
|
-
</li>
|
83
|
-
</ul>
|
84
|
-
</li>
|
85
|
-
<li>
|
86
|
-
<a href="https://iiif.io/guides/finding_resources/">Find more books at iiif.io</a>
|
87
|
-
</li>
|
88
|
-
</ul>
|
89
|
-
</details>
|
90
|
-
</section>
|
91
|
-
|
92
|
-
<script>
|
93
|
-
const manifestInForm = document.getElementById('manifest').value;
|
94
|
-
const manifestInUrl = new URL(window.location.href).searchParams.get('manifest');
|
95
|
-
if (manifestInUrl) {
|
96
|
-
document.getElementById('manifest').value = manifestInUrl;
|
97
|
-
}
|
98
|
-
|
99
|
-
document.getElementById('manifestForm').addEventListener('submit', function (event) {
|
100
|
-
event.preventDefault();
|
101
|
-
window.location.search = `?manifest=${encodeURIComponent(document.getElementById('manifest').value)}`;
|
102
|
-
});
|
103
|
-
|
104
|
-
fetch(manifestInUrl || manifestInForm)
|
105
|
-
.then(response => response.json())
|
106
|
-
.then(manifest => {
|
107
|
-
window.br = new BookReader({
|
108
|
-
plugins: {
|
109
|
-
iiif: {
|
110
|
-
manifest: manifest
|
111
|
-
}
|
112
|
-
}
|
113
|
-
});
|
114
|
-
|
115
|
-
// Let's go!
|
116
|
-
br.init();
|
117
|
-
});
|
118
|
-
</script>
|
119
|
-
|
120
|
-
</body>
|
121
|
-
</html>
|
@@ -1,271 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!-- This demo mirrors, as far as possible, the archive.org BookReader configuration and functionality
|
3
|
-
please keep up to date as BookReader evolves -->
|
4
|
-
<html>
|
5
|
-
<head>
|
6
|
-
<title>bookreader demo internetArchive</title>
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
8
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
9
|
-
|
10
|
-
<!-- WC dependencies -->
|
11
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es2015%2Ces5%2CglobalThis"></script>
|
12
|
-
<script type="text/javascript" src="https://unpkg.com/lit@2.1.2/polyfill-support.js"></script>
|
13
|
-
<script type="text/javascript" src="https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-bundle.js"></script>
|
14
|
-
|
15
|
-
<!-- JS dependencies -->
|
16
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
17
|
-
<script src="../BookReader/jquery-3.js"></script>
|
18
|
-
|
19
|
-
|
20
|
-
<!-- Bookreader -->
|
21
|
-
<script src="../BookReader/BookReader.js"></script>
|
22
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
23
|
-
|
24
|
-
<!-- plugins needed for archive.org, in same order as archive.org -->
|
25
|
-
<script src="../BookReader/plugins/plugin.search.js"></script>
|
26
|
-
<script src="../BookReader/plugins/plugin.chapters.js"></script>
|
27
|
-
<script src="../BookReader/plugins/plugin.tts.js"></script>
|
28
|
-
<script src="../BookReader/plugins/plugin.url.js"></script>
|
29
|
-
<script src="../BookReader/plugins/plugin.autoplay.js"></script>
|
30
|
-
<script src="../BookReader/plugins/plugin.resume.js"></script>
|
31
|
-
<script src="../BookReader/plugins/plugin.archive_analytics.js"></script>
|
32
|
-
<script src="../BookReader/plugins/plugin.text_selection.js"></script>
|
33
|
-
<script src="../BookReader/plugins/plugin.experiments.js"></script>
|
34
|
-
|
35
|
-
<script type="module" src="../BookReader/ia-bookreader-bundle.js"></script>
|
36
|
-
|
37
|
-
<link rel="stylesheet" href="BookReaderDemo.css"/>
|
38
|
-
|
39
|
-
<!-- IA scripts -->
|
40
|
-
<script src="https://archive.org/bookreader/BookReaderJSIA.js"></script>
|
41
|
-
|
42
|
-
</head>
|
43
|
-
|
44
|
-
<body>
|
45
|
-
<section class="theater" style="width: 100%; overflow: hidden; background-color: black;">
|
46
|
-
<ia-bookreader
|
47
|
-
baseHost="archive.org"
|
48
|
-
>
|
49
|
-
<div id="IABookReaderWrapper" slot="main">
|
50
|
-
<div id="BookReader" class="BookReader"></div>
|
51
|
-
</div>
|
52
|
-
<div>
|
53
|
-
Internet Archive BookReader Demo<br />
|
54
|
-
<noscript>
|
55
|
-
<p>
|
56
|
-
The BookReader requires JavaScript to be enabled. Please check that
|
57
|
-
your browser supports JavaScript and that it is enabled in the
|
58
|
-
browser settings.
|
59
|
-
</p>
|
60
|
-
</noscript>
|
61
|
-
</div>
|
62
|
-
</ia-bookreader>
|
63
|
-
</section>
|
64
|
-
<style>
|
65
|
-
.demos {
|
66
|
-
height: 800px;
|
67
|
-
width: inherit;
|
68
|
-
padding: 10px;
|
69
|
-
}
|
70
|
-
.demo {
|
71
|
-
border: 1px solid white;
|
72
|
-
padding: 10px;
|
73
|
-
}
|
74
|
-
</style>
|
75
|
-
<section class="demos">
|
76
|
-
<details class="demo">
|
77
|
-
<summary>Test books</summary>
|
78
|
-
<ul>
|
79
|
-
<li>
|
80
|
-
Misc English book
|
81
|
-
<ul>
|
82
|
-
<li>
|
83
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=countofmontecris00duma_7">
|
84
|
-
<i>The Count of Monte-Cristo</i> by Alexandre Dumas
|
85
|
-
</a>
|
86
|
-
</li>
|
87
|
-
<li>
|
88
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=driitaleofdaring00bachuoft">
|
89
|
-
<i>D’ri and I</i> by Irving Bacheller
|
90
|
-
</a>
|
91
|
-
</li>
|
92
|
-
</ul>
|
93
|
-
</li>
|
94
|
-
<li>
|
95
|
-
Misc non-English book (<a href="https://archive.org/search?query=%21language%3Aeng&sort=-week&and%5B%5D=lending%3A%22is_readable%22&and%5B%5D=mediatype%3A%22texts%22">Search for more</a>)
|
96
|
-
<ul>
|
97
|
-
<li>
|
98
|
-
French: <a href="/BookReaderDemo/demo-internetarchive.html?ocaid=lecomtedemontecr01dumauoft">
|
99
|
-
<i>Le Comte de Monte-Cristo</i> by Alexandre Dumas
|
100
|
-
</a>
|
101
|
-
</li>
|
102
|
-
</ul>
|
103
|
-
</li>
|
104
|
-
<li>
|
105
|
-
Right-to-left book (<a href="https://archive.org/search?query=page-progression%3Arl&sort=-week&and%5B%5D=lending%3A%22is_readable%22&and%5B%5D=mediatype%3A%22texts%22">Search for more</a>)
|
106
|
-
<ul>
|
107
|
-
<li>
|
108
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=gendaitankashu00meijuoft">
|
109
|
-
<i>Gendai tanka shu</i> by Meiji, Emperor of Japan
|
110
|
-
</a>
|
111
|
-
</li>
|
112
|
-
</ul>
|
113
|
-
</li>
|
114
|
-
<li>
|
115
|
-
Newspaper with columns
|
116
|
-
<ul>
|
117
|
-
<li>
|
118
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=Crusader-Vol_28_Nos_1-20_Sept_1986-April_1987">
|
119
|
-
Crusader-Vol_28_Nos_1-20_Sept_1986-April_1987
|
120
|
-
</a>
|
121
|
-
</li>
|
122
|
-
</ul>
|
123
|
-
</li>
|
124
|
-
<li>
|
125
|
-
Text Selection
|
126
|
-
<ul>
|
127
|
-
<li>
|
128
|
-
OCR with spaces inside each <code><WORD></code> element
|
129
|
-
<ul>
|
130
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=theworksofplato01platiala">
|
131
|
-
<i>The Works of Plato</i> by Plato
|
132
|
-
</a></li>
|
133
|
-
</ul>
|
134
|
-
</li>
|
135
|
-
<li>
|
136
|
-
Weird font-sizes/indents
|
137
|
-
<ul>
|
138
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=cihm_58393#page/n3">
|
139
|
-
Microfilm poster thing
|
140
|
-
</a></li>
|
141
|
-
</ul>
|
142
|
-
</li>
|
143
|
-
<li>
|
144
|
-
Book with short lines
|
145
|
-
<ul>
|
146
|
-
<li>
|
147
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=countofmontecris00duma_7#page/261/mode/2up">
|
148
|
-
<i>The Count of Monte-Cristo</i>, p.261, second last line
|
149
|
-
</a>
|
150
|
-
</li>
|
151
|
-
</ul>
|
152
|
-
</li>
|
153
|
-
<li>
|
154
|
-
Book with double-spaced lines
|
155
|
-
<ul>
|
156
|
-
<li>
|
157
|
-
<a href="/BookReaderDemo/demo-internetarchive.html?ocaid=calnevpipelineex02unit#page/n93/mode/2up">
|
158
|
-
calnevpipelineex02unit
|
159
|
-
</a>
|
160
|
-
</li>
|
161
|
-
</ul>
|
162
|
-
</li>
|
163
|
-
</ul>
|
164
|
-
</li>
|
165
|
-
<li>
|
166
|
-
Chapters
|
167
|
-
<ul>
|
168
|
-
<li>
|
169
|
-
Normal book with chapters
|
170
|
-
<ul>
|
171
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=adventureofsherl0000unse">
|
172
|
-
<i>The Adventures of Sherlock Holmes</i> by Arthur Conan Doyle
|
173
|
-
</a></li>
|
174
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=jalna00dela">
|
175
|
-
<i>Jalna</i> by Mazo de la Roche
|
176
|
-
</a></li>
|
177
|
-
</ul>
|
178
|
-
</li>
|
179
|
-
<li>
|
180
|
-
Book preview
|
181
|
-
<ul>
|
182
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=peoplewareproduc00dema_0">
|
183
|
-
<i>Peopleware</i> by Tom DeMarco and Timothy Lister
|
184
|
-
</a></li>
|
185
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=passionforbooksb00rabi">
|
186
|
-
<i>A Passion for Books</i>
|
187
|
-
</a></li>
|
188
|
-
</ul>
|
189
|
-
</li>
|
190
|
-
<li>
|
191
|
-
Book with levelled chapters
|
192
|
-
<ul>
|
193
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=notredamedepar01hugo">
|
194
|
-
<i>Notre-Dame de Paris: Tome Premier</i> par Victor Hugo
|
195
|
-
</a></li>
|
196
|
-
<li><a href="/BookReaderDemo/demo-internetarchive.html?ocaid=alanturingenigma0000hodg">
|
197
|
-
<i>Alan Turing: The Enigma</i> by Andrew Hodges
|
198
|
-
</a></li>
|
199
|
-
</ul>
|
200
|
-
</li>
|
201
|
-
</ul>
|
202
|
-
</li>
|
203
|
-
</ul>
|
204
|
-
</details>
|
205
|
-
<div class="demo">
|
206
|
-
<button id="toggle-loggedin">Toggle Logged in view</button>
|
207
|
-
<p>Features behind signed in gate: Bookmarks</p>
|
208
|
-
<p>Logged In Status: <span id="logged-in-status">Logged Out</span></p>
|
209
|
-
</div>
|
210
|
-
<div class="demo">
|
211
|
-
<button id="show-lcp">LCP Download option</button>
|
212
|
-
</div>
|
213
|
-
<div class="demo">
|
214
|
-
<button id="multi-volume">Multiple books</button>
|
215
|
-
</div>
|
216
|
-
<div class="demo">
|
217
|
-
<button id="start-fs">Start at Fullscreen</button>
|
218
|
-
</div>
|
219
|
-
<div class="demo">
|
220
|
-
<h3 id="placeholder">please wait as we are fetching the following: </h3>
|
221
|
-
<input type='checkbox' class='group1' name='itemMD' disabled>Item metadata</input><br>
|
222
|
-
<input type='checkbox' class='group1' name='bookManifest' disabled> Book manifest</input><br>
|
223
|
-
</div>
|
224
|
-
</section>
|
225
|
-
<div class="demo">
|
226
|
-
<h3>Placeholder div to allow scrolling</h3>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
<!-- Certain features, like Bookmarks, use modal-manager to draw their interface -->
|
230
|
-
<modal-manager></modal-manager>
|
231
|
-
<script >
|
232
|
-
// Set up demo things
|
233
|
-
const iaBR = document.querySelector('ia-bookreader');
|
234
|
-
const toggleLoginBtn = document.querySelector('#toggle-loggedin');
|
235
|
-
toggleLoginBtn.addEventListener('click', () => {
|
236
|
-
const currLoggedIn = iaBR.signedIn;
|
237
|
-
iaBR.signedIn = !currLoggedIn;
|
238
|
-
|
239
|
-
document.querySelector('#logged-in-status').innerText = iaBR.signedIn ? 'Logged In' : 'Logged Out';
|
240
|
-
console.log("Toggled SignedIn state", iaBR.signedIn, { currLoggedIn })
|
241
|
-
});
|
242
|
-
|
243
|
-
const startFSBtn = document.querySelector('#start-fs');
|
244
|
-
startFSBtn.addEventListener('click', () => {
|
245
|
-
const urlParams = new URLSearchParams(window.location.search);
|
246
|
-
if (urlParams.has('view')) {
|
247
|
-
const url = new URL(window.location);
|
248
|
-
url.searchParams.delete('view');
|
249
|
-
window.history.pushState({}, '', url);
|
250
|
-
}
|
251
|
-
urlParams.set('view', 'theater');
|
252
|
-
window.location.search = urlParams.toString();
|
253
|
-
});
|
254
|
-
|
255
|
-
window.addEventListener('BookReader:PostInit', () => {
|
256
|
-
const placeholder = document.querySelector('#placeholder');
|
257
|
-
placeholder.innerHTML = 'Dependencies are complete, bookreader has loaded';
|
258
|
-
});
|
259
|
-
|
260
|
-
// analytics stub
|
261
|
-
window.archive_analytics = {
|
262
|
-
send_event_no_sampling: (category, action, label) => {}, //console.log('~~~ NO SAMPLE EVENT CALLED: ', { category, action, label }),
|
263
|
-
send_event: (category, action, label) => {}, //console.log('~~~ send_event SAMPLE EVENT CALLED: ', { category, action, label }),
|
264
|
-
send_ping: (category, action, label) => {}, //console.log('~~~ send_ping SAMPLE EVENT CALLED: ', { category, action, label }),
|
265
|
-
}
|
266
|
-
</script>
|
267
|
-
|
268
|
-
<!-- IA fetch demo -->
|
269
|
-
<script type="module" src="IADemoBr.js"></script>
|
270
|
-
</body>
|
271
|
-
</html>
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>bookreader simple demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<!-- JS dependencies -->
|
10
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
11
|
-
<script src="../BookReader/jquery-3.js"></script>
|
12
|
-
|
13
|
-
|
14
|
-
<!-- BookReader and plugins -->
|
15
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
16
|
-
<script src="../BookReader/BookReader.js"></script>
|
17
|
-
|
18
|
-
<!-- Custom CSS overrides -->
|
19
|
-
<link rel="stylesheet" href="BookReaderDemo.css"/>
|
20
|
-
</head>
|
21
|
-
<body>
|
22
|
-
<div id="BookReader1" class="BookReader">
|
23
|
-
Internet Archive BookReader Demo<br/>
|
24
|
-
<noscript>
|
25
|
-
<p>
|
26
|
-
The BookReader requires JavaScript to be enabled. Please check that your browser supports JavaScript and that it is enabled in the browser settings. You can also try one of the <a href="https://archive.org/details/goodytwoshoes00newyiala"> other formats of the book</a>.
|
27
|
-
</p>
|
28
|
-
</noscript>
|
29
|
-
</div>
|
30
|
-
<div id="BookReader2" class="BookReader">
|
31
|
-
Internet Archive BookReader Demo<br/>
|
32
|
-
<noscript>
|
33
|
-
<p>
|
34
|
-
The BookReader requires JavaScript to be enabled. Please check that your browser supports JavaScript and that it is enabled in the browser settings. You can also try one of the <a href="https://archive.org/details/goodytwoshoes00newyiala"> other formats of the book</a>.
|
35
|
-
</p>
|
36
|
-
</noscript>
|
37
|
-
</div>
|
38
|
-
<script type="text/javascript" src="BookReaderJSSimple.js"></script>
|
39
|
-
<script>
|
40
|
-
instantiateBookReader('#BookReader1');
|
41
|
-
instantiateBookReader('#BookReader2');
|
42
|
-
</script>
|
43
|
-
</body>
|
44
|
-
</html>
|