@internetarchive/bookreader 5.0.0-38 → 5.0.0-39
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.css +8 -0
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +99 -75
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/CHANGELOG.md +5 -0
- package/README.md +13 -0
- package/package.json +14 -14
- package/renovate.json +1 -1
- package/src/BookReader/Mode1UpLit.js +7 -1
- package/src/BookReader/Mode2Up.js +11 -0
- package/src/BookReader/ModeSmoothZoom.js +2 -0
- package/src/BookReader/PageContainer.js +10 -4
- package/src/BookReader/utils/ScrollClassAdder.js +31 -0
- package/src/assets/icons/magnify-minus.svg +3 -7
- package/src/assets/icons/magnify-plus.svg +3 -7
- package/src/css/_TextSelection.scss +13 -0
- package/tests/jest/BookReader/PageContainer.test.js +5 -4
- package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +49 -0
- package/.husky/_/husky.sh +0 -30
- package/stat/BookNavigator/BookModel.js +0 -14
- package/stat/BookNavigator/BookNavigator.js +0 -524
- package/stat/BookNavigator/assets/bookmark-colors.js +0 -15
- package/stat/BookNavigator/assets/button-base.js +0 -61
- package/stat/BookNavigator/assets/ia-logo.js +0 -17
- package/stat/BookNavigator/assets/icon_checkmark.js +0 -6
- package/stat/BookNavigator/assets/icon_close.js +0 -3
- package/stat/BookNavigator/assets/icon_sort_asc.js +0 -5
- package/stat/BookNavigator/assets/icon_sort_desc.js +0 -5
- package/stat/BookNavigator/assets/icon_sort_neutral.js +0 -5
- package/stat/BookNavigator/assets/icon_volumes.js +0 -11
- package/stat/BookNavigator/bookmarks/bookmark-button.js +0 -64
- package/stat/BookNavigator/bookmarks/bookmark-edit.js +0 -215
- package/stat/BookNavigator/bookmarks/bookmarks-list.js +0 -285
- package/stat/BookNavigator/bookmarks/bookmarks-loginCTA.js +0 -28
- package/stat/BookNavigator/bookmarks/bookmarks-provider.js +0 -56
- package/stat/BookNavigator/bookmarks/ia-bookmarks.js +0 -523
- package/stat/BookNavigator/br-fullscreen-mgr.js +0 -82
- package/stat/BookNavigator/delete-modal-actions.js +0 -49
- package/stat/BookNavigator/downloads/downloads-provider.js +0 -72
- package/stat/BookNavigator/downloads/downloads.js +0 -139
- package/stat/BookNavigator/provider-config.js +0 -0
- package/stat/BookNavigator/search/a-search-result.js +0 -55
- package/stat/BookNavigator/search/search-provider.js +0 -180
- package/stat/BookNavigator/search/search-results.js +0 -360
- package/stat/BookNavigator/sharing.js +0 -31
- package/stat/BookNavigator/visual-adjustments/visual-adjustments-provider.js +0 -94
- package/stat/BookNavigator/visual-adjustments/visual-adjustments.js +0 -280
- package/stat/BookNavigator/volumes/volumes-provider.js +0 -83
- package/stat/BookNavigator/volumes/volumes.js +0 -178
- package/stat/BookReader/BookModel.js +0 -518
- package/stat/BookReader/DebugConsole.js +0 -54
- package/stat/BookReader/DragScrollable.js +0 -233
- package/stat/BookReader/ImageCache.js +0 -116
- package/stat/BookReader/Mode1Up.js +0 -102
- package/stat/BookReader/Mode1UpLit.js +0 -434
- package/stat/BookReader/Mode2Up.js +0 -1372
- package/stat/BookReader/ModeSmoothZoom.js +0 -177
- package/stat/BookReader/ModeThumb.js +0 -344
- package/stat/BookReader/Navbar/Navbar.js +0 -310
- package/stat/BookReader/PageContainer.js +0 -120
- package/stat/BookReader/ReduceSet.js +0 -26
- package/stat/BookReader/Toolbar/Toolbar.js +0 -384
- package/stat/BookReader/events.js +0 -20
- package/stat/BookReader/options.js +0 -324
- package/stat/BookReader/utils/HTMLDimensionsCacher.js +0 -44
- package/stat/BookReader/utils/classes.js +0 -36
- package/stat/BookReader/utils.js +0 -240
- package/stat/BookReader.js +0 -2550
- package/stat/BookReaderComponent/BookReaderComponent.js +0 -117
- package/stat/assets/icons/1up.svg +0 -12
- package/stat/assets/icons/2up.svg +0 -15
- package/stat/assets/icons/advance.svg +0 -26
- package/stat/assets/icons/chevron-right.svg +0 -1
- package/stat/assets/icons/close-circle-dark.svg +0 -1
- package/stat/assets/icons/close-circle.svg +0 -1
- package/stat/assets/icons/fullscreen.svg +0 -17
- package/stat/assets/icons/fullscreen_exit.svg +0 -17
- package/stat/assets/icons/hamburger.svg +0 -15
- package/stat/assets/icons/left-arrow.svg +0 -12
- package/stat/assets/icons/magnify-minus.svg +0 -16
- package/stat/assets/icons/magnify-plus.svg +0 -17
- package/stat/assets/icons/magnify.svg +0 -15
- package/stat/assets/icons/pause.svg +0 -23
- package/stat/assets/icons/play.svg +0 -22
- package/stat/assets/icons/playback-speed.svg +0 -34
- package/stat/assets/icons/read-aloud.svg +0 -22
- package/stat/assets/icons/review.svg +0 -22
- package/stat/assets/icons/thumbnails.svg +0 -17
- package/stat/assets/icons/voice.svg +0 -1
- package/stat/assets/icons/volume-full.svg +0 -22
- package/stat/assets/images/BRicons.png +0 -0
- package/stat/assets/images/BRicons.svg +0 -94
- package/stat/assets/images/BRicons_ia.png +0 -0
- package/stat/assets/images/back_pages.png +0 -0
- package/stat/assets/images/book_bottom_icon.png +0 -0
- package/stat/assets/images/book_down_icon.png +0 -0
- package/stat/assets/images/book_left_icon.png +0 -0
- package/stat/assets/images/book_leftmost_icon.png +0 -0
- package/stat/assets/images/book_right_icon.png +0 -0
- package/stat/assets/images/book_rightmost_icon.png +0 -0
- package/stat/assets/images/book_top_icon.png +0 -0
- package/stat/assets/images/book_up_icon.png +0 -0
- package/stat/assets/images/books_graphic.svg +0 -177
- package/stat/assets/images/booksplit.png +0 -0
- package/stat/assets/images/control_pause_icon.png +0 -0
- package/stat/assets/images/control_play_icon.png +0 -0
- package/stat/assets/images/embed_icon.png +0 -0
- package/stat/assets/images/icon-home-ia.png +0 -0
- package/stat/assets/images/icon_OL-logo-xs.png +0 -0
- package/stat/assets/images/icon_alert-xs.png +0 -0
- package/stat/assets/images/icon_book.svg +0 -12
- package/stat/assets/images/icon_bookmark.svg +0 -12
- package/stat/assets/images/icon_close-pop.png +0 -0
- package/stat/assets/images/icon_download.png +0 -0
- package/stat/assets/images/icon_gear.svg +0 -14
- package/stat/assets/images/icon_hamburger.svg +0 -20
- package/stat/assets/images/icon_home.png +0 -0
- package/stat/assets/images/icon_home.svg +0 -21
- package/stat/assets/images/icon_home_ia.png +0 -0
- package/stat/assets/images/icon_indicator.png +0 -0
- package/stat/assets/images/icon_info.svg +0 -11
- package/stat/assets/images/icon_one_page.svg +0 -8
- package/stat/assets/images/icon_pause.svg +0 -1
- package/stat/assets/images/icon_play.svg +0 -1
- package/stat/assets/images/icon_playback-rate.svg +0 -15
- package/stat/assets/images/icon_return.png +0 -0
- package/stat/assets/images/icon_search_button.svg +0 -8
- package/stat/assets/images/icon_share.svg +0 -9
- package/stat/assets/images/icon_skip-ahead.svg +0 -6
- package/stat/assets/images/icon_skip-back.svg +0 -13
- package/stat/assets/images/icon_speaker.svg +0 -18
- package/stat/assets/images/icon_speaker_open.svg +0 -10
- package/stat/assets/images/icon_thumbnails.svg +0 -12
- package/stat/assets/images/icon_toc.svg +0 -5
- package/stat/assets/images/icon_two_pages.svg +0 -9
- package/stat/assets/images/icon_zoomer.png +0 -0
- package/stat/assets/images/loading.gif +0 -0
- package/stat/assets/images/logo_icon.png +0 -0
- package/stat/assets/images/marker_chap-off.png +0 -0
- package/stat/assets/images/marker_chap-off.svg +0 -11
- package/stat/assets/images/marker_chap-off_ia.png +0 -0
- package/stat/assets/images/marker_chap-on.png +0 -0
- package/stat/assets/images/marker_chap-on.svg +0 -11
- package/stat/assets/images/marker_srch-on.svg +0 -11
- package/stat/assets/images/marker_srchchap-off.png +0 -0
- package/stat/assets/images/marker_srchchap-on.png +0 -0
- package/stat/assets/images/nav_control-dn.png +0 -0
- package/stat/assets/images/nav_control-dn_ia.png +0 -0
- package/stat/assets/images/nav_control-up.png +0 -0
- package/stat/assets/images/nav_control-up_ia.png +0 -0
- package/stat/assets/images/nav_control.png +0 -0
- package/stat/assets/images/one_page_mode_icon.png +0 -0
- package/stat/assets/images/paper-badge.png +0 -0
- package/stat/assets/images/print_icon.png +0 -0
- package/stat/assets/images/progressbar.gif +0 -0
- package/stat/assets/images/right_edges.png +0 -0
- package/stat/assets/images/slider.png +0 -0
- package/stat/assets/images/slider_ia.png +0 -0
- package/stat/assets/images/thumbnail_mode_icon.png +0 -0
- package/stat/assets/images/transparent.png +0 -0
- package/stat/assets/images/two_page_mode_icon.png +0 -0
- package/stat/assets/images/zoom_in_icon.png +0 -0
- package/stat/assets/images/zoom_out_icon.png +0 -0
- package/stat/css/BookReader.scss +0 -89
- package/stat/css/_BRBookmarks.scss +0 -29
- package/stat/css/_BRComponent.scss +0 -13
- package/stat/css/_BRfloat.scss +0 -197
- package/stat/css/_BRicon.scss +0 -48
- package/stat/css/_BRmain.scss +0 -251
- package/stat/css/_BRnav.scss +0 -359
- package/stat/css/_BRpages.scss +0 -139
- package/stat/css/_BRsearch.scss +0 -226
- package/stat/css/_BRtoolbar.scss +0 -84
- package/stat/css/_BRvendor.scss +0 -5
- package/stat/css/_MobileNav.scss +0 -194
- package/stat/css/_TextSelection.scss +0 -32
- package/stat/css/_colorbox.scss +0 -52
- package/stat/css/_controls.scss +0 -253
- package/stat/css/_icons.scss +0 -121
- package/stat/jquery-wrapper.js +0 -4
- package/stat/plugins/plugin.archive_analytics.js +0 -86
- package/stat/plugins/plugin.autoplay.js +0 -129
- package/stat/plugins/plugin.chapters.js +0 -248
- package/stat/plugins/plugin.iframe.js +0 -48
- package/stat/plugins/plugin.mobile_nav.js +0 -288
- package/stat/plugins/plugin.resume.js +0 -68
- package/stat/plugins/plugin.text_selection.js +0 -291
- package/stat/plugins/plugin.url.js +0 -198
- package/stat/plugins/plugin.vendor-fullscreen.js +0 -247
- package/stat/plugins/search/plugin.search.js +0 -439
- package/stat/plugins/search/view.js +0 -439
- package/stat/plugins/tts/AbstractTTSEngine.js +0 -249
- package/stat/plugins/tts/FestivalTTSEngine.js +0 -169
- package/stat/plugins/tts/PageChunk.js +0 -107
- package/stat/plugins/tts/PageChunkIterator.js +0 -163
- package/stat/plugins/tts/WebTTSEngine.js +0 -357
- package/stat/plugins/tts/plugin.tts.js +0 -357
- package/stat/plugins/tts/tooltip_dict.js +0 -15
- package/stat/plugins/tts/utils.js +0 -91
- package/stat/util/browserSniffing.js +0 -30
- package/stat/util/debouncer.js +0 -26
- package/stat/util/docCookies.js +0 -67
- package/stat/util/strings.js +0 -34
package/stat/css/_colorbox.scss
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
/* COLORBOX POP-UP */
|
2
|
-
|
3
|
-
#colorbox, #cboxOverlay, #cboxWrapper {
|
4
|
-
position: absolute;
|
5
|
-
top: 0;
|
6
|
-
left: 0;
|
7
|
-
z-index: $brZindexPopup;
|
8
|
-
}
|
9
|
-
#cboxOverlay {
|
10
|
-
position: fixed;
|
11
|
-
width: 100%;
|
12
|
-
height: 100%;
|
13
|
-
background: #000;
|
14
|
-
opacity:0.75; filter:Alpha(Opacity=75);
|
15
|
-
}
|
16
|
-
#cboxMiddleLeft, #cboxBottomLeft { clear:left; }
|
17
|
-
#cboxContent { position:relative; }
|
18
|
-
#cboxLoadedContent { overflow: hidden!important; }
|
19
|
-
#cboxLoadedContent iframe { display: block; border: 0; }
|
20
|
-
#cboxTitle { margin: 0; display: none !important; }
|
21
|
-
#cboxLoadingOverlay, #cboxLoadingGraphic {
|
22
|
-
position: absolute;
|
23
|
-
top: 25px;
|
24
|
-
left: 25px;
|
25
|
-
width: 100%;
|
26
|
-
}
|
27
|
-
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow { cursor:pointer; }
|
28
|
-
#cboxClose { display: none !important; }
|
29
|
-
|
30
|
-
#colorbox{
|
31
|
-
background: white;
|
32
|
-
border: 2px solid #ccc;
|
33
|
-
-webkit-border-radius:12px;
|
34
|
-
-moz-border-radius:12px;
|
35
|
-
border-radius:12px;
|
36
|
-
-webkit-box-shadow: 0px 0px 27px 6px rgba(66, 66, 66, 0.8);
|
37
|
-
-moz-box-shadow: 0px 0px 27px 6px rgba(66, 66, 66, 0.8);
|
38
|
-
box-shadow: 0px 0px 27px 6px rgba(66, 66, 66, 0.8);
|
39
|
-
}
|
40
|
-
#cboxWrapper {}
|
41
|
-
#cboxContent {
|
42
|
-
padding:0;
|
43
|
-
}
|
44
|
-
#cboxLoadedContent{
|
45
|
-
margin:0;
|
46
|
-
}
|
47
|
-
#cboxLoadingOverlay{background:transparent;}
|
48
|
-
|
49
|
-
.shift{
|
50
|
-
position: absolute !important;
|
51
|
-
left: -10000px !important;
|
52
|
-
}
|
package/stat/css/_controls.scss
DELETED
@@ -1,253 +0,0 @@
|
|
1
|
-
.BRcontrols {
|
2
|
-
width: 100%;
|
3
|
-
|
4
|
-
.tooltip {
|
5
|
-
display: none;
|
6
|
-
position: absolute;
|
7
|
-
width: auto;
|
8
|
-
left: 50%;
|
9
|
-
bottom: calc(100% + 10px);
|
10
|
-
transform: translateX(-50%);
|
11
|
-
padding: 5px 10px;
|
12
|
-
font-weight: bold;
|
13
|
-
white-space: nowrap;
|
14
|
-
color: $controlsText;
|
15
|
-
border-radius: 3px;
|
16
|
-
background: $tooltipBG;
|
17
|
-
}
|
18
|
-
|
19
|
-
.full .tooltip {
|
20
|
-
left: auto;
|
21
|
-
right: 0;
|
22
|
-
transform: translateX(0);
|
23
|
-
}
|
24
|
-
|
25
|
-
.BRfullscreenActive & {
|
26
|
-
.icon-fullscreen {
|
27
|
-
background-image: url("icons/fullscreen_exit.svg");
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
select.playback-speed, select.playback-voices {
|
32
|
-
padding-top: 18px;
|
33
|
-
-moz-appearance: none;
|
34
|
-
-webkit-appearance: none;
|
35
|
-
appearance: none;
|
36
|
-
font-size: 10px;
|
37
|
-
text-align: center;
|
38
|
-
text-align-last: center;
|
39
|
-
color: $controlsText;
|
40
|
-
border: none;
|
41
|
-
cursor: pointer;
|
42
|
-
option {
|
43
|
-
background: $controlsBG;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
select.playback-speed {
|
48
|
-
width: 30px;
|
49
|
-
background: transparent url("icons/playback-speed.svg") 50% 0 no-repeat;
|
50
|
-
}
|
51
|
-
|
52
|
-
select.playback-voices {
|
53
|
-
width: 30px;
|
54
|
-
background: transparent url("icons/voice.svg") 50% 0 no-repeat;
|
55
|
-
background-size: 18px;
|
56
|
-
}
|
57
|
-
|
58
|
-
.active {
|
59
|
-
background: $activeButtonBG;
|
60
|
-
}
|
61
|
-
|
62
|
-
li {
|
63
|
-
position: relative;
|
64
|
-
}
|
65
|
-
|
66
|
-
.controls {
|
67
|
-
position: relative;
|
68
|
-
z-index: 2;
|
69
|
-
display: flex;
|
70
|
-
padding: 2px 10px;
|
71
|
-
margin: 0;
|
72
|
-
list-style: none;
|
73
|
-
background: $controlsBG;
|
74
|
-
@media (max-width: $brBreakPointMobile) {
|
75
|
-
padding-left: 0;
|
76
|
-
}
|
77
|
-
}
|
78
|
-
|
79
|
-
.controls button {
|
80
|
-
width: 30px;
|
81
|
-
height: 30px;
|
82
|
-
}
|
83
|
-
|
84
|
-
@keyframes slideUp {
|
85
|
-
from {
|
86
|
-
opacity: 0;
|
87
|
-
transform: translateY(10px);
|
88
|
-
}
|
89
|
-
to {
|
90
|
-
opacity: 1;
|
91
|
-
transform: translateY(0);
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
.read-aloud {
|
96
|
-
display: none;
|
97
|
-
position: absolute;
|
98
|
-
bottom: 100%;
|
99
|
-
right: 0;
|
100
|
-
left: 0;
|
101
|
-
z-index: 1;
|
102
|
-
padding: 5px 0;
|
103
|
-
margin: 0;
|
104
|
-
align-items: center;
|
105
|
-
justify-content: center;
|
106
|
-
list-style: none;
|
107
|
-
background: $controlsBG;
|
108
|
-
|
109
|
-
&.visible {
|
110
|
-
display: flex;
|
111
|
-
animation: slideUp 0.2s;
|
112
|
-
}
|
113
|
-
|
114
|
-
li {
|
115
|
-
padding: 0 10px;
|
116
|
-
}
|
117
|
-
|
118
|
-
[name="play"] {
|
119
|
-
.icon-pause {
|
120
|
-
display: none;
|
121
|
-
}
|
122
|
-
&.playing {
|
123
|
-
.icon-play {
|
124
|
-
display: none;
|
125
|
-
}
|
126
|
-
.icon-pause {
|
127
|
-
display: inline-block;
|
128
|
-
}
|
129
|
-
}
|
130
|
-
}
|
131
|
-
}
|
132
|
-
|
133
|
-
.scrubber {
|
134
|
-
display: flex;
|
135
|
-
width: 100%;
|
136
|
-
height: 30px;
|
137
|
-
}
|
138
|
-
|
139
|
-
.frame {
|
140
|
-
position: relative;
|
141
|
-
width: 100%;
|
142
|
-
}
|
143
|
-
|
144
|
-
.color-fill {
|
145
|
-
position: absolute;
|
146
|
-
top: 50%;
|
147
|
-
left: 0;
|
148
|
-
transform: translateY(-50%);
|
149
|
-
width: 100%;
|
150
|
-
height: 8px;
|
151
|
-
border-radius: 8px;
|
152
|
-
}
|
153
|
-
|
154
|
-
.scrubber input[type=range] {
|
155
|
-
position: absolute;
|
156
|
-
top: 50%;
|
157
|
-
left: 0;
|
158
|
-
transform: translateY(-50%);
|
159
|
-
width: 100%;
|
160
|
-
background-color: transparent;
|
161
|
-
-webkit-appearance: none;
|
162
|
-
}
|
163
|
-
|
164
|
-
.scrubber input[type=range]:focus {
|
165
|
-
outline: none;
|
166
|
-
}
|
167
|
-
|
168
|
-
.scrubber input[type=range]::-webkit-slider-runnable-track {
|
169
|
-
background: transparent;
|
170
|
-
border: 0px solid rgba(204, 204, 204, 0);
|
171
|
-
border: 0;
|
172
|
-
border-radius: 8px;
|
173
|
-
width: 100%;
|
174
|
-
height: 8px;
|
175
|
-
cursor: pointer;
|
176
|
-
}
|
177
|
-
|
178
|
-
.scrubber input[type=range]::-webkit-slider-thumb {
|
179
|
-
margin-top: -4px;
|
180
|
-
width: 16px;
|
181
|
-
height: 16px;
|
182
|
-
background: #ffffff;
|
183
|
-
border: 0px solid rgba(0, 0, 0, 0);
|
184
|
-
border: 0;
|
185
|
-
border-radius: 8px;
|
186
|
-
cursor: pointer;
|
187
|
-
-webkit-appearance: none;
|
188
|
-
}
|
189
|
-
|
190
|
-
.scrubber input[type=range]::-moz-range-track {
|
191
|
-
background: #666666;
|
192
|
-
border: 0px solid rgba(204, 204, 204, 0);
|
193
|
-
border: 0;
|
194
|
-
border-radius: 8px;
|
195
|
-
width: 100%;
|
196
|
-
height: 8px;
|
197
|
-
cursor: pointer;
|
198
|
-
}
|
199
|
-
|
200
|
-
.scrubber input[type=range]::-moz-range-progress {
|
201
|
-
height: 8px;
|
202
|
-
background: #ccc;
|
203
|
-
}
|
204
|
-
|
205
|
-
.scrubber input[type=range]::-ms-track {
|
206
|
-
border: none;
|
207
|
-
color: transparent;
|
208
|
-
background: #666;
|
209
|
-
}
|
210
|
-
|
211
|
-
.scrubber input[type=range]::-ms-fill-lower {
|
212
|
-
background: #ccc;
|
213
|
-
}
|
214
|
-
|
215
|
-
.scrubber input[type=range]::-ms-tooltip {
|
216
|
-
display: none;
|
217
|
-
}
|
218
|
-
|
219
|
-
.scrubber input[type=range]::-moz-range-thumb {
|
220
|
-
width: 16px;
|
221
|
-
height: 16px;
|
222
|
-
background: #ffffff;
|
223
|
-
border: 0px solid rgba(0, 0, 0, 0);
|
224
|
-
border: 0;
|
225
|
-
border-radius: 8px;
|
226
|
-
cursor: pointer;
|
227
|
-
}
|
228
|
-
|
229
|
-
.scrubber p {
|
230
|
-
padding: 0 20px 0 13px;
|
231
|
-
margin: 0;
|
232
|
-
align-self: stretch;
|
233
|
-
font-weight: 700;
|
234
|
-
line-height: 26px;
|
235
|
-
color: $controlsText;
|
236
|
-
@media (max-width: $brBreakPointMobile) {
|
237
|
-
padding: 0;
|
238
|
-
}
|
239
|
-
}
|
240
|
-
|
241
|
-
/* BookReader defaults overrides */
|
242
|
-
.BRnavline {
|
243
|
-
top: -4px;
|
244
|
-
}
|
245
|
-
|
246
|
-
.scrubber .BRpager.ui-slider {
|
247
|
-
top: 10px;
|
248
|
-
background-color: $trackColor;
|
249
|
-
}
|
250
|
-
.scrubber .BRpager.ui-slider .ui-slider-range {
|
251
|
-
background-color: $trackFillColor;
|
252
|
-
}
|
253
|
-
}
|
package/stat/css/_icons.scss
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
.icon {
|
2
|
-
display: inline-block;
|
3
|
-
background: transparent 50% 50% no-repeat;
|
4
|
-
}
|
5
|
-
|
6
|
-
.icon.hflip {
|
7
|
-
transform: scaleX(-1);
|
8
|
-
}
|
9
|
-
|
10
|
-
.active .icon {
|
11
|
-
filter: brightness(.2);
|
12
|
-
}
|
13
|
-
|
14
|
-
.icon-read-aloud {
|
15
|
-
width: 20px;
|
16
|
-
height: 16px;
|
17
|
-
background-image: url("icons/read-aloud.svg");
|
18
|
-
}
|
19
|
-
|
20
|
-
.icon-onepg {
|
21
|
-
width: 11px;
|
22
|
-
height: 19px;
|
23
|
-
background-image: url("icons/1up.svg");
|
24
|
-
}
|
25
|
-
|
26
|
-
.icon-twopg {
|
27
|
-
width: 20px;
|
28
|
-
height: 19px;
|
29
|
-
background-image: url("icons/2up.svg");
|
30
|
-
}
|
31
|
-
|
32
|
-
.icon-fullscreen,
|
33
|
-
.icon-fullscreen-exit {
|
34
|
-
width: 18px;
|
35
|
-
height: 18px;
|
36
|
-
background-image: url("icons/fullscreen.svg");
|
37
|
-
}
|
38
|
-
|
39
|
-
.icon-fullscreen-exit {
|
40
|
-
background-image: url("icons/fullscreen-exit.svg");
|
41
|
-
}
|
42
|
-
|
43
|
-
.icon-thumb {
|
44
|
-
width: 17px;
|
45
|
-
height: 19px;
|
46
|
-
background-image: url("icons/thumbnails.svg");
|
47
|
-
}
|
48
|
-
|
49
|
-
.icon-playback-speed {
|
50
|
-
width: 24px;
|
51
|
-
height: 32px;
|
52
|
-
background-image: url("icons/playback-speed.svg");
|
53
|
-
}
|
54
|
-
|
55
|
-
.icon-review,
|
56
|
-
.icon-advance {
|
57
|
-
width: 21px;
|
58
|
-
height: 19px;
|
59
|
-
background-image: url("icons/review.svg");
|
60
|
-
}
|
61
|
-
|
62
|
-
.icon-advance {
|
63
|
-
background-image: url("icons/advance.svg");
|
64
|
-
}
|
65
|
-
|
66
|
-
.icon-volume-full {
|
67
|
-
width: 23px;
|
68
|
-
height: 22px;
|
69
|
-
background-image: url("icons/volume-full.svg");
|
70
|
-
}
|
71
|
-
|
72
|
-
.icon-play,
|
73
|
-
.icon-pause {
|
74
|
-
width: 40px;
|
75
|
-
height: 40px;
|
76
|
-
background-image: url("icons/play.svg");
|
77
|
-
}
|
78
|
-
|
79
|
-
.icon-pause {
|
80
|
-
background-image: url("icons/pause.svg");
|
81
|
-
}
|
82
|
-
|
83
|
-
.icon-left-arrow {
|
84
|
-
width: 12px;
|
85
|
-
height: 14px;
|
86
|
-
background-image: url("icons/left-arrow.svg");
|
87
|
-
}
|
88
|
-
|
89
|
-
.icon-magnify {
|
90
|
-
position: relative;
|
91
|
-
width: 18px;
|
92
|
-
height: 18px;
|
93
|
-
background-image: url("icons/magnify-minus.svg");
|
94
|
-
&.plus{
|
95
|
-
background-image: url("icons/magnify-plus.svg");
|
96
|
-
}
|
97
|
-
}
|
98
|
-
|
99
|
-
.icon-search {
|
100
|
-
width: 19px;
|
101
|
-
height: 19px;
|
102
|
-
background-image: url("images/icon_search_button.svg");
|
103
|
-
}
|
104
|
-
|
105
|
-
.icon-chevron {
|
106
|
-
width: 5px;
|
107
|
-
height: 8px;
|
108
|
-
background-image: url("icons/chevron-right.svg");
|
109
|
-
}
|
110
|
-
|
111
|
-
.icon-close {
|
112
|
-
width: 12px;
|
113
|
-
height: 12px;
|
114
|
-
background-image: url("icons/close-circle.svg");
|
115
|
-
}
|
116
|
-
|
117
|
-
.icon-close-dark {
|
118
|
-
width: 12px;
|
119
|
-
height: 12px;
|
120
|
-
background-image: url("icons/close-circle-dark.svg");
|
121
|
-
}
|
package/stat/jquery-wrapper.js
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
/* global BookReader, archive_analytics */
|
2
|
-
/**
|
3
|
-
* Plugin for Archive.org analytics
|
4
|
-
*/
|
5
|
-
jQuery.extend(BookReader.defaultOptions, {
|
6
|
-
enableArchiveAnalytics: true,
|
7
|
-
/** Provide a means of debugging, cause otherwise it's impossible to test locally */
|
8
|
-
debugArchiveAnaltyics: false,
|
9
|
-
});
|
10
|
-
|
11
|
-
BookReader.prototype.init = (function(super_) {
|
12
|
-
return function() {
|
13
|
-
super_.call(this);
|
14
|
-
|
15
|
-
if (this.options.enableArchiveAnalytics) {
|
16
|
-
this.bind(BookReader.eventNames.fragmentChange, () => this.archiveAnalyticsSendFragmentChange());
|
17
|
-
}
|
18
|
-
};
|
19
|
-
})(BookReader.prototype.init);
|
20
|
-
|
21
|
-
/** @private */
|
22
|
-
BookReader.prototype.archiveAnalyticsSendFragmentChange = function() {
|
23
|
-
if (!window.archive_analytics) {
|
24
|
-
return;
|
25
|
-
}
|
26
|
-
|
27
|
-
const prevFragment = this.archiveAnalyticsSendFragmentChange.prevFragment;
|
28
|
-
|
29
|
-
const params = this.paramsFromCurrent();
|
30
|
-
const newFragment = this.fragmentFromParams(params);
|
31
|
-
|
32
|
-
if (prevFragment != newFragment) {
|
33
|
-
const values = {
|
34
|
-
bookreader: "user_changed_view",
|
35
|
-
itemid: this.bookId,
|
36
|
-
cache_bust: Math.random()
|
37
|
-
};
|
38
|
-
// EEK! offsite embedding and /details/ page books look the same in analytics, otherwise!
|
39
|
-
values.offsite = 1;
|
40
|
-
values.details = 0;
|
41
|
-
try {
|
42
|
-
values.offsite = window.top.location.hostname.match(/\.archive.org$/)
|
43
|
-
? 0
|
44
|
-
: 1;
|
45
|
-
values.details =
|
46
|
-
!values.offsite && window.top.location.pathname.match(/^\/details\//)
|
47
|
-
? 1
|
48
|
-
: 0;
|
49
|
-
} catch (e) {}
|
50
|
-
// avoids embed cross site exceptions -- but on (+) side, means it is and keeps marked offite!
|
51
|
-
|
52
|
-
// Send bookreader ping
|
53
|
-
archive_analytics.send_ping(values, null, "augment_for_ao_site");
|
54
|
-
|
55
|
-
// Also send tracking event ping
|
56
|
-
const additionalEventParams = this.options.lendingInfo && this.options.lendingInfo.loanId
|
57
|
-
? { loanId: this.options.lendingInfo.loanId }
|
58
|
-
: {};
|
59
|
-
archive_analytics.send_event('BookReader', 'UserChangedView', window.location.pathname, additionalEventParams);
|
60
|
-
|
61
|
-
this.archiveAnalyticsSendFragmentChange.prevFragment = newFragment;
|
62
|
-
}
|
63
|
-
};
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Sends a tracking "Event". See https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#events
|
67
|
-
* @param {string} category
|
68
|
-
* @param {string} action
|
69
|
-
* @param {number} [value] (must be an int)
|
70
|
-
* @param {Object} [additionalEventParams]
|
71
|
-
*/
|
72
|
-
BookReader.prototype.archiveAnalyticsSendEvent = function(category, action, value, additionalEventParams) {
|
73
|
-
if (!this.options.enableArchiveAnalytics) return;
|
74
|
-
|
75
|
-
if (this.options.debugArchiveAnaltyics) {
|
76
|
-
console.log("archiveAnalyticsSendEvent", arguments, window.archive_analytics);
|
77
|
-
}
|
78
|
-
|
79
|
-
if (!window.archive_analytics) return;
|
80
|
-
|
81
|
-
additionalEventParams = additionalEventParams || {};
|
82
|
-
if (typeof(value) == 'number') {
|
83
|
-
additionalEventParams.ev = value;
|
84
|
-
}
|
85
|
-
window.archive_analytics.send_event(category, action, null, additionalEventParams);
|
86
|
-
};
|
@@ -1,129 +0,0 @@
|
|
1
|
-
/*global BookReader */
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Plugin which adds an autoplay feature. Useful for kiosk situations.
|
5
|
-
*/
|
6
|
-
jQuery.extend(BookReader.defaultOptions, {
|
7
|
-
enableAutoPlayPlugin: true
|
8
|
-
});
|
9
|
-
|
10
|
-
/**
|
11
|
-
* @override BookReader.setup
|
12
|
-
*/
|
13
|
-
BookReader.prototype.setup = (function(super_) {
|
14
|
-
return function (options) {
|
15
|
-
super_.call(this, options);
|
16
|
-
|
17
|
-
this.auto = false;
|
18
|
-
this.autoTimer = null;
|
19
|
-
this.flipDelay = 5000;
|
20
|
-
};
|
21
|
-
})(BookReader.prototype.setup);
|
22
|
-
|
23
|
-
/**
|
24
|
-
* @override BookReader.init
|
25
|
-
*/
|
26
|
-
BookReader.prototype.init = (function(super_) {
|
27
|
-
return function (options) {
|
28
|
-
super_.call(this, options);
|
29
|
-
|
30
|
-
if (!this.options.enableAutoPlayPlugin) return;
|
31
|
-
this.bind(BookReader.eventNames.stop, () => this.autoStop());
|
32
|
-
};
|
33
|
-
})(BookReader.prototype.init);
|
34
|
-
|
35
|
-
/**
|
36
|
-
* @override BookReader.bindNavigationHandlers
|
37
|
-
*/
|
38
|
-
BookReader.prototype.bindNavigationHandlers = (function(super_) {
|
39
|
-
return function() {
|
40
|
-
super_.call(this);
|
41
|
-
|
42
|
-
if (!this.options.enableAutoPlayPlugin) return;
|
43
|
-
|
44
|
-
// Note the mobile plugin attaches itself to body, so we need to select outside
|
45
|
-
const jIcons = this.$('.BRicon').add('.BRmobileMenu .BRicon');
|
46
|
-
|
47
|
-
jIcons.filter('.play').click(() => {
|
48
|
-
this.autoToggle();
|
49
|
-
return false;
|
50
|
-
});
|
51
|
-
|
52
|
-
jIcons.filter('.pause').click(() => {
|
53
|
-
this.autoToggle();
|
54
|
-
return false;
|
55
|
-
});
|
56
|
-
};
|
57
|
-
})(BookReader.prototype.bindNavigationHandlers);
|
58
|
-
|
59
|
-
/**
|
60
|
-
* Starts autoplay mode
|
61
|
-
* @param {object} overrides
|
62
|
-
* @param {number} overrides.flipSpeed
|
63
|
-
* @param {number} overrides.flipDelay
|
64
|
-
*/
|
65
|
-
BookReader.prototype.autoToggle = function(overrides) {
|
66
|
-
if (!this.options.enableAutoPlayPlugin) return;
|
67
|
-
|
68
|
-
const options = $.extend({
|
69
|
-
flipSpeed: this.flipSpeed,
|
70
|
-
flipDelay: this.flipDelay
|
71
|
-
}, overrides);
|
72
|
-
|
73
|
-
this.flipSpeed = typeof options.flipSpeed === "number" ? options.flipSpeed : this.flipSpeed;
|
74
|
-
this.flipDelay = typeof options.flipDelay === "number" ? options.flipDelay : this.flipDelay;
|
75
|
-
this.trigger(BookReader.eventNames.stop);
|
76
|
-
|
77
|
-
let bComingFrom1up = false;
|
78
|
-
if (this.constMode2up != this.mode) {
|
79
|
-
bComingFrom1up = true;
|
80
|
-
this.switchMode(this.constMode2up);
|
81
|
-
}
|
82
|
-
|
83
|
-
// Change to autofit if book is too large
|
84
|
-
if (this.reduce < this.twoPageGetAutofitReduce()) {
|
85
|
-
this.zoom('auto');
|
86
|
-
}
|
87
|
-
|
88
|
-
if (null == this.autoTimer) {
|
89
|
-
// $$$ Draw events currently cause layout problems when they occur during animation.
|
90
|
-
// There is a specific problem when changing from 1-up immediately to autoplay in RTL so
|
91
|
-
// we workaround for now by not triggering immediate animation in that case.
|
92
|
-
// See https://bugs.launchpad.net/gnubook/+bug/328327
|
93
|
-
if (('rl' == this.pageProgression) && bComingFrom1up) {
|
94
|
-
// don't flip immediately -- wait until timer fires
|
95
|
-
} else {
|
96
|
-
// flip immediately
|
97
|
-
this.flipFwdToIndex();
|
98
|
-
}
|
99
|
-
|
100
|
-
this.$('.play').hide();
|
101
|
-
this.$('.pause').show();
|
102
|
-
this.autoTimer = setInterval(() => {
|
103
|
-
if (this.animating) return;
|
104
|
-
|
105
|
-
if (Math.max(this.twoPage.currentIndexL, this.twoPage.currentIndexR) >= this.lastDisplayableIndex()) {
|
106
|
-
this.flipBackToIndex(1); // $$$ really what we want?
|
107
|
-
} else {
|
108
|
-
this.flipFwdToIndex();
|
109
|
-
}
|
110
|
-
}, this.flipDelay);
|
111
|
-
} else {
|
112
|
-
this.autoStop();
|
113
|
-
}
|
114
|
-
};
|
115
|
-
|
116
|
-
/**
|
117
|
-
* Stop autoplay mode, allowing animations to finish
|
118
|
-
*/
|
119
|
-
BookReader.prototype.autoStop = function() {
|
120
|
-
if (!this.options.enableAutoPlayPlugin) return;
|
121
|
-
|
122
|
-
if (null != this.autoTimer) {
|
123
|
-
clearInterval(this.autoTimer);
|
124
|
-
this.flipSpeed = 'fast';
|
125
|
-
this.$('.pause').hide();
|
126
|
-
this.$('.play').show();
|
127
|
-
this.autoTimer = null;
|
128
|
-
}
|
129
|
-
};
|