PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 4.0.5
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v4.0.5
4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / assets / pdf-flip-book / templates / book-view.html
embedpress / assets / pdf-flip-book / templates Last commit date
book-view.html 2 years ago
book-view.html
482 lines
1 <div id="fb3d-ctx" class="flip-book">
2 <div class="view">
3 <div class="fnav">
4 <div class="prev">
5 <a class="cmdBackward but-show" href="/#"><span class="icon previous-page-icon">
6 <svg title="<$tr>Previous page</$tr>" width="28.947" height="49.999" viewBox="0 0 28.947 49.999" fill="none"
7 xmlns="http://www.w3.org/2000/svg">
8 <path
9 d="M1.372 22.096a4.12 4.12 0 0 0 0 5.821l20.559 20.559a4.118 4.118 0 0 0 5.821-5.821L10.097 25 27.739 7.345a4.118 4.118 0 0 0-5.821-5.821L1.359 22.083z"
10 fill="#666" />
11 </svg>
12 </span></a>
13 </div>
14 <div class="next">
15 <a class="cmdForward but-show" href="/#"><span class="icon next-page-icon">
16 <svg title="<$tr>Next page</$tr>" width="29.605" height="50" viewBox="0 0 29.605 50" fill="none"
17 xmlns="http://www.w3.org/2000/svg">
18 <path
19 d="M27.904 22.096a4.12 4.12 0 0 1 0 5.821L7.345 48.476a4.118 4.118 0 0 1-5.821-5.821L19.179 25 1.537 7.345a4.118 4.118 0 0 1 5.821-5.821l20.559 20.559z"
20 fill="#666" />
21 </svg>
22
23 </span></a>
24 </div>
25 </div>
26 <div class="widLoadingProgress loading-progress hidden">
27 <div class="progress">
28 </div>
29 <div class="txtLoadingProgress caption">
30 </div>
31 </div>
32 <div class="widLoading page-loading hidden">
33 </div>
34 </div>
35
36 <div class="widFloatWnd float-wnd hidden">
37 <div class="header">
38 <$tr>Table of contents</$tr>
39 <a href="/#" title="<$tr>Close</$tr>" class="close cmdCloseToc">
40 <span class="icon">
41 <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">>
42 <path
43 d="M18.249 4.385a1.709 1.709 0 0 0-2.413-2.412l-5.609 5.614-5.614-5.609A1.709 1.709 0 0 0 2.2 4.391L7.815 10l-5.61 5.615a1.709 1.709 0 0 0 2.413 2.412l5.609-5.615 5.615 5.609a1.709 1.709 0 0 0 2.413-2.413L12.64 10z"
44 fill="#fff" />
45 </svg>
46
47 </span>
48 </a>
49 </div>
50 <div class="body">
51 <div class="ctrl">
52 <div class="toc">
53 <div class="toc-menu widTocMenu">
54 <ul>
55 <li class="cmdBookmarks"><a href="/#">
56 <$tr>Bookmarks</$tr>
57 </a></li>
58 <li class="cmdThumbnails"><a href="/#">
59 <$tr>Thumbnails</$tr>
60 </a></li>
61 <li class="cmdSearch"><a href="/#">
62 <$tr>Search</$tr>
63 </a></li>
64 </ul>
65 </div>
66 <div class="widBookmarks toc-view">
67
68 </div>
69 <div class="widThumbnails toc-view">
70
71 </div>
72 <div class="widSearch toc-view">
73
74 </div>
75 </div>
76 </div>
77 </div>
78 </div>
79
80 <div class="controls">
81
82 <div class="ctrl js-center">
83 <nav class="fnavbar">
84 <ul class="fnav">
85
86 <li class="fnav-item cmdZoomIn"><a href="/#"><span class="icon">
87 <svg title="<$tr>Zoom in</$tr>" width="30" height="30" viewBox="0 0 30 30" fill="none"
88 xmlns="http://www.w3.org/2000/svg">
89 <path
90 d="M24.375 12.188c0 2.689-.873 5.174-2.344 7.189l7.418 7.424c.732.732.732 1.922 0 2.654s-1.922.732-2.654 0l-7.418-7.424a12.1 12.1 0 0 1-7.189 2.344C5.455 24.375 0 18.92 0 12.188S5.455 0 12.188 0s12.188 5.455 12.188 12.188m-13.594 5.156c0 .779.627 1.406 1.406 1.406s1.406-.627 1.406-1.406v-3.75h3.75c.779 0 1.406-.627 1.406-1.406s-.627-1.406-1.406-1.406h-3.75v-3.75c0-.779-.627-1.406-1.406-1.406s-1.406.627-1.406 1.406v3.75h-3.75c-.779 0-1.406.627-1.406 1.406s.627 1.406 1.406 1.406h3.75z"
91 fill="#fff" />
92 </svg>
93 </span></a></li>
94 <li class="fnav-item cmdZoomOut"><a href="/#"><span class="icon">
95 <svg title="<$tr>Zoom out</$tr>" width="30" height="30" viewBox="0 0 30 30" fill="none"
96 xmlns="http://www.w3.org/2000/svg">
97 <g clip-path="url(#a)">
98 <path
99 d="M24.375 12.188c0 2.689-.873 5.174-2.344 7.189l7.418 7.424c.732.732.732 1.922 0 2.654s-1.922.732-2.654 0l-7.418-7.424a12.1 12.1 0 0 1-7.189 2.344C5.455 24.375 0 18.92 0 12.188S5.455 0 12.188 0s12.188 5.455 12.188 12.188M7.97 10.782c-.779 0-1.406.627-1.406 1.406s.627 1.406 1.406 1.406h8.438c.779 0 1.406-.627 1.406-1.406s-.627-1.406-1.406-1.406z"
100 fill="#fff" />
101 </g>
102 <defs>
103 <clipPath id="a">
104 <path fill="#fff" d="M0 0h30v30H0z" />
105 </clipPath>
106 </defs>
107 </svg>
108 </span></a></li>
109 <li class="fnav-item cmdDefaultZoom but-show"><a href="/#"><span class="icon">
110
111 <svg title="<$tr>Fit view</$tr>" width="30" height="30" viewBox="0 0 30 30" fill="none"
112 xmlns="http://www.w3.org/2000/svg">
113 <path
114 d="M.005.005v7.498h1.874V1.879h5.623V.005zm28.116 22.493v5.623h-5.623v1.874h7.498v-7.497zM29.995.005v7.498h-1.874V1.879h-5.623V.005zM1.879 22.498v5.623h5.623v1.874H.005v-7.497z"
115 fill="#fff" />
116 <path fill-rule="evenodd" clip-rule="evenodd"
117 d="M5.628 5.628v18.744h18.744V5.628zm1.874 1.874h14.995v14.995H7.502z" fill="#fff" />
118 </svg>
119
120 </span></a></li>
121 <li class="fnav-item cmdToc"><a href="/#"><span class="icon">
122 <svg title="<$tr>Table of contents</$tr>" width="30" height="40" viewBox="0 0 30 40" fill="none"
123 xmlns="http://www.w3.org/2000/svg">
124 <path
125 d="M0 3.75v34.352a1.9 1.9 0 0 0 2.992 1.554L15 31.25l12.008 8.406A1.9 1.9 0 0 0 30 38.102V3.75C30 1.68 28.32 0 26.25 0H3.75C1.68 0 0 1.68 0 3.75"
126 fill="#fff" />
127 </svg>
128 </span></a></li>
129
130 <!-- <li class="fnav-item cmdFastBackward"><a href="/#"><span class="icon icon-backward">
131 <svg title="<$tr>10 pages backward</$tr>" width="30" height="17" viewBox="0 0 30 17" fill="none" xmlns="http://www.w3.org/2000/svg">
132 <path d="M0 0L10.6105 8.11579L0 16.2316V0ZM13.7368 0L24.3789 8.11579L13.7368 16.2316V0ZM26.2421 0.631578H30V15.6316H26.2421V0.631578Z" fill="white"/>
133 </svg>
134 </span></a></li> -->
135
136
137 <li class="fnav-item cmdBackward"><a href="/#"><span class="icon">
138 <svg class="rotate-180" width="25" height="17" viewBox="0 0 25 17" fill="none"
139 xmlns="http://www.w3.org/2000/svg">
140 <path d="M0 0L10.6105 8.11579L0 16.2316V0ZM13.7368 0L24.3789 8.11579L13.7368 16.2316V0Z"
141 fill="white" />
142 </svg>
143 </span></a></li>
144
145 <li class="fnav-item">
146 <div class="pages">
147 <input type="text" class="number inpPage" maxlength="4" placeholder="1">
148 <input type="text" class="amount inpPages" readOnly maxlength="4" placeholder="1">
149 </div>
150 </li>
151 <li class="fnav-item cmdForward"><a href="/#"><span class="icon">
152 <svg title="<$tr>Next page</$tr>" width="25" height="17" viewBox="0 0 25 17" fill="none"
153 xmlns="http://www.w3.org/2000/svg">
154 <path d="M0 0L10.6105 8.11579L0 16.2316V0ZM13.7368 0L24.3789 8.11579L13.7368 16.2316V0Z"
155 fill="white" />
156 </svg>
157 </span></a></li>
158
159 <!-- <li class="fnav-item cmdFastForward"><a href="/#"><span class="icon">
160 <svg title="<$tr>10 pages forward</$tr>" width="30" height="17" viewBox="0 0 30 17" fill="none" xmlns="http://www.w3.org/2000/svg">
161 <path d="M0 0L10.6105 8.11579L0 16.2316V0ZM13.7368 0L24.3789 8.11579L13.7368 16.2316V0ZM26.2421 0.631578H30V15.6316H26.2421V0.631578Z" fill="white"/>
162 </svg>
163
164 </span></a></li> -->
165
166 <li class="fnav-item but-show cmdDownload"><a id="download-pdf" href="/#"><span class="icon">
167 <svg title="<$tr>Download</$tr>" width="20" height="20" viewBox="0 0 20 20" fill="none"
168 xmlns="http://www.w3.org/2000/svg">
169 <path
170 d="M11.25 1.25a1.25 1.25 0 1 0-2.5 0v9.48L5.883 7.863a1.252 1.252 0 0 0-1.77 1.77l5 5a1.253 1.253 0 0 0 1.77 0l5-5a1.252 1.252 0 0 0-1.77-1.77L11.25 10.73zM2.5 13.75a2.5 2.5 0 0 0-2.5 2.5v1.25C0 18.879 1.121 20 2.5 20h15c1.379 0 2.5-1.121 2.5-2.5v-1.25c0-1.379-1.121-2.5-2.5-2.5h-3.965l-1.77 1.77a2.5 2.5 0 0 1-3.535 0l-1.765-1.77zm14.375 2.188c.249 0 .487.099.663.275a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0 .94.94 0 0 1 0-1.326.94.94 0 0 1 .663-.275"
171 fill="#fff" />
172 </svg>
173 </span></a></li>
174 <li class="fnav-item cmdPrint"><a href="/#"><span class="icon">
175 <svg title="<$tr>Print</$tr>" width="30" height="30" viewBox="0 0 30 30" fill="none"
176 xmlns="http://www.w3.org/2000/svg">
177 <g clip-path="url(#a)">
178 <path
179 d="M7.5 0a3.754 3.754 0 0 0-3.75 3.75v5.625H7.5V3.75h13.283L22.5 5.467v3.908h3.75V5.467c0-.996-.393-1.951-1.096-2.654l-1.716-1.717A3.76 3.76 0 0 0 20.783 0zm15 20.625v5.625h-15v-5.625zm3.75 1.875h1.875A1.873 1.873 0 0 0 30 20.625V15a3.755 3.755 0 0 0-3.75-3.75H3.75A3.754 3.754 0 0 0 0 15v5.625C0 21.662.838 22.5 1.875 22.5H3.75v3.75A3.754 3.754 0 0 0 7.5 30h15a3.755 3.755 0 0 0 3.75-3.75zm-.938-7.969a1.406 1.406 0 1 1 0 2.812 1.406 1.406 0 0 1 0-2.812"
180 fill="#fff" />
181 </g>
182 <defs>
183 <clipPath id="a">
184 <path fill="#fff" d="M0 0h30v30H0z" />
185 </clipPath>
186 </defs>
187 </svg>
188
189 </span></a></li>
190 <li class="fnav-item cmdFullScreen"><a href="/#"><span class="icon">
191 <svg title="<$tr>Full screen</$tr>" width="20" height="20" viewBox="0 0 20 20" fill="none"
192 xmlns="http://www.w3.org/2000/svg">
193 <path
194 d="M1.429 0C.638 0 0 .638 0 1.429v4.286c0 .79.638 1.429 1.429 1.429s1.429-.638 1.429-1.429V2.857h2.857A1.427 1.427 0 1 0 5.714 0zm1.429 14.286c0-.79-.638-1.429-1.429-1.429S0 13.496 0 14.286v4.286c0 .79.638 1.429 1.429 1.429h4.286c.79 0 1.429-.638 1.429-1.429s-.638-1.429-1.429-1.429H2.857zM14.286 0c-.79 0-1.429.638-1.429 1.429s.638 1.429 1.429 1.429h2.857v2.857c0 .79.638 1.429 1.429 1.429s1.429-.638 1.429-1.429V1.429c0-.79-.638-1.429-1.429-1.429zM20 14.286c0-.79-.638-1.429-1.429-1.429s-1.429.638-1.429 1.429v2.857h-2.857c-.79 0-1.429.638-1.429 1.429s.638 1.429 1.429 1.429h4.286c.79 0 1.429-.638 1.429-1.429z"
195 fill="#fff" />
196 </svg>
197
198 </span></a></li>
199
200 <li class="dropup fnav-item toggle widSettings">
201 <a href="/#">
202 <div class="icon-caret"><span class="icon">
203
204 <svg width="112" height="432" viewBox="0 0 112 432" fill="none" xmlns="http://www.w3.org/2000/svg">>
205 <path
206 d="M56 320C41.1479 320 26.9041 325.9 16.402 336.402C5.89998 346.904 0 361.148 0 376C0 390.852 5.89998 405.096 16.402 415.598C26.9041 426.1 41.1479 432 56 432C70.8521 432 85.0959 426.1 95.598 415.598C106.1 405.096 112 390.852 112 376C112 361.148 106.1 346.904 95.598 336.402C85.0959 325.9 70.8521 320 56 320ZM56 160C41.1479 160 26.9041 165.9 16.402 176.402C5.89998 186.904 0 201.148 0 216C0 230.852 5.89998 245.096 16.402 255.598C26.9041 266.1 41.1479 272 56 272C70.8521 272 85.0959 266.1 95.598 255.598C106.1 245.096 112 230.852 112 216C112 201.148 106.1 186.904 95.598 176.402C85.0959 165.9 70.8521 160 56 160ZM112 56C112 41.1479 106.1 26.9041 95.598 16.402C85.0959 5.89998 70.8521 0 56 0C41.1479 0 26.9041 5.89998 16.402 16.402C5.89998 26.9041 0 41.1479 0 56C0 70.8521 5.89998 85.0959 16.402 95.598C26.9041 106.1 41.1479 112 56 112C70.8521 112 85.0959 106.1 95.598 95.598C106.1 85.0959 112 70.8521 112 56Z"
207 fill="white" />
208 </svg>
209
210 </span></div>
211 </a>
212
213 <ul class="menu hidden">
214 <li class="cmdSmartPan"><a href="/#"><span class="icon">
215 <svg width="25.714" height="20" viewBox="0 0 25.714 20" fill="none"
216 xmlns="http://www.w3.org/2000/svg">
217 <path
218 d="M12.857 2.143c-2.911 0-5.304 1.321-7.138 3.022C4 6.763 2.812 8.661 2.205 10c.607 1.339 1.795 3.236 3.509 4.835 1.839 1.701 4.232 3.022 7.143 3.022s5.304-1.321 7.138-3.022c1.719-1.599 2.907-3.496 3.514-4.835-.607-1.339-1.795-3.237-3.509-4.835-1.839-1.701-4.232-3.022-7.143-3.022M4.259 3.598C6.362 1.643 9.25 0 12.857 0s6.495 1.643 8.598 3.598c2.089 1.942 3.487 4.259 4.152 5.853.147.353.147.746 0 1.098-.665 1.594-2.062 3.915-4.152 5.853C19.352 18.357 16.464 20 12.857 20s-6.495-1.643-8.598-3.598C2.17 14.464.772 12.143.112 10.549a1.42 1.42 0 0 1 0-1.098c.66-1.594 2.058-3.915 4.147-5.853m8.598 9.973c1.973 0 3.571-1.598 3.571-3.571s-1.598-3.571-3.571-3.571h-.089a2.86 2.86 0 0 1-3.482 3.482V10a3.57 3.57 0 0 0 3.571 3.571m0-9.286a5.7 5.7 0 0 1 4.041 1.674 5.714 5.714 0 0 1 0 8.081 5.714 5.714 0 0 1-8.081 0 5.714 5.714 0 0 1 0-8.081 5.7 5.7 0 0 1 4.04-1.673"
219 fill="#fff" />
220 </svg>
221 </span>
222 <$tr>Smart pan</$tr>
223 </a></li>
224 <li class="cmdSinglePage"><a href="/#"><span class="icon">
225 <svg width="15" height="20" viewBox="0 0 15 20" fill="none" xmlns="http://www.w3.org/2000/svg">>
226 <g clip-path="url(#a)">
227 <path
228 d="M2.5 18.125a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V5c0 .692.558 1.25 1.25 1.25h3.125V17.5a.627.627 0 0 1-.625.625zM2.5 0A2.5 2.5 0 0 0 0 2.5v15C0 18.879 1.121 20 2.5 20h10c1.379 0 2.5-1.121 2.5-2.5V6.035a2.5 2.5 0 0 0-.731-1.77L10.73.73A2.5 2.5 0 0 0 8.965 0zm2.188 10c-.519 0-.938.418-.938.938s.418.938.938.938h5.625c.519 0 .938-.418.938-.938S10.832 10 10.313 10zm0 3.75c-.519 0-.938.418-.938.938s.418.938.938.938h5.625c.519 0 .938-.418.938-.938s-.418-.938-.938-.938z"
229 fill="#fff" />
230 </g>
231 <defs>
232 <clipPath id="a">
233 <path fill="#fff" d="M0 0h15v20H0z" />
234 </clipPath>
235 </defs>
236 </svg></span>
237 <$tr>Single page</$tr>
238 </a></li>
239 <li class="cmdSounds"><a href="/#"><span class="icon sound-icon">
240 <svg width="25" height="20" viewBox="0 0 25 20" fill="none" xmlns="http://www.w3.org/2000/svg">>
241 <path
242 d="M20.844 1.27C23.379 3.328 25 6.477 25 10s-1.621 6.668-4.156 8.73c-.402.328-.992.266-1.32-.137s-.266-.992.137-1.32c2.117-1.719 3.465-4.336 3.465-7.273s-1.348-5.555-3.465-7.277c-.402-.328-.461-.918-.137-1.32s.918-.461 1.32-.137zM18.48 4.18c1.688 1.375 2.77 3.473 2.77 5.82s-1.082 4.445-2.77 5.82c-.402.328-.992.266-1.32-.137s-.266-.992.137-1.32c1.269-1.031 2.078-2.601 2.078-4.363s-.809-3.332-2.078-4.367c-.402-.328-.461-.918-.137-1.32s.918-.461 1.32-.137zm-2.363 2.91a3.755 3.755 0 0 1 0 5.82c-.402.328-.992.266-1.32-.137s-.266-.992.137-1.32c.421-.344.691-.867.691-1.453s-.27-1.109-.691-1.457c-.402-.328-.461-.918-.137-1.32s.918-.461 1.32-.137zm-4.355-5.731c.449.204.738.649.738 1.141v15c0 .492-.289.938-.738 1.141s-.977.121-1.344-.207l-5.27-4.684H2.5a2.5 2.5 0 0 1-2.5-2.5v-2.5c0-1.379 1.121-2.5 2.5-2.5h2.648l5.27-4.684a1.26 1.26 0 0 1 1.344-.207"
243 fill="#fff" />
244 </svg>
245 </span>
246 <$tr>Sounds</$tr>
247 </a></li>
248 <li class="cmdStats"><a href="/#"><span class="icon">
249 <svg width="22.857" height="20" viewBox="0 0 22.857 20" fill="none"
250 xmlns="http://www.w3.org/2000/svg">
251 <path
252 d="M2.857 1.429C2.857 0.638 2.219 0 1.429 0S0 0.638 0 1.429v15c0 1.973 1.598 3.571 3.571 3.571h17.857c0.79 0 1.429 -0.638 1.429 -1.429s-0.638 -1.429 -1.429 -1.429H3.571c-0.393 0 -0.714 -0.321 -0.714 -0.714zm18.152 3.866c0.558 -0.558 0.558 -1.464 0 -2.022s-1.464 -0.558 -2.022 0L14.286 7.978l-2.562 -2.562c-0.558 -0.558 -1.464 -0.558 -2.022 0l-5 5c-0.558 0.558 -0.558 1.464 0 2.022s1.464 0.558 2.022 0l3.991 -3.987 2.562 2.562c0.558 0.558 1.464 0.558 2.022 0l5.714 -5.714z"
253 fill="#fff" />
254 </svg>
255 </span>
256 <$tr>Stats</$tr>
257 </a></li>
258 <!-- <li class="divider"></li> -->
259 <!-- <li class="cmdLightingUp"><a href="/#"><span class="icon arrow-icon">
260 <svg width="35.019" height="20" viewBox="0 0 35.019 20" fill="none"
261 xmlns="http://www.w3.org/2000/svg">
262 <path
263 d="M15.751.732a2.493 2.493 0 0 1 3.525 0l14.941 14.941a2.493 2.493 0 0 1-3.525 3.525L17.509 6.015 4.327 19.19a2.493 2.493 0 0 1-3.525-3.525L15.743.724z"
264 fill="#fff" />
265 </svg>
266 </span>
267 <$tr>Increase lighting</$tr>
268 </a></li>
269 <li class="cmdLightingDown"><a href="/#"><span class="icon arrow-icon">
270 <svg width="35.019" height="20" viewBox="0 0 35.019 20" fill="none"
271 xmlns="http://www.w3.org/2000/svg">
272 <path
273 d="M15.751 19.268c0.973 0.973 2.552 0.973 3.525 0l14.941 -14.941c0.973 -0.973 0.973 -2.552 0 -3.525s-2.552 -0.973 -3.525 0L17.509 13.984 4.327 0.809c-0.973 -0.973 -2.552 -0.973 -3.525 0s-0.973 2.552 0 3.525l14.941 14.941z"
274 fill="#fff" />
275 </svg>
276 </span>
277 <$tr>Reduce lighting</$tr>
278 </a></li> -->
279 </ul>
280 </li>
281 </ul>
282 </nav>
283 </div>
284
285 </div>
286 </div>
287
288
289 <script>
290
291 const adjustHexColor = (hexColor, percentage) => {
292 // Convert hex color to RGB values
293 const r = parseInt(hexColor.slice(1, 3), 16);
294 const g = parseInt(hexColor.slice(3, 5), 16);
295 const b = parseInt(hexColor.slice(5, 7), 16);
296
297 // Calculate adjusted RGB values
298 const adjustment = Math.round((percentage / 100) * 255);
299 const newR = Math.max(Math.min(r + adjustment, 255), 0);
300 const newG = Math.max(Math.min(g + adjustment, 255), 0);
301 const newB = Math.max(Math.min(b + adjustment, 255), 0);
302
303 // Convert adjusted RGB values back to hex color
304 const newHexColor = '#' + ((1 << 24) + (newR << 16) + (newG << 8) + newB).toString(16).slice(1);
305
306 return newHexColor;
307 }
308
309
310 const getColorBrightness = (hexColor) => {
311 const r = parseInt(hexColor.slice(1, 3), 16);
312 const g = parseInt(hexColor.slice(3, 5), 16);
313 const b = parseInt(hexColor.slice(5, 7), 16);
314
315 // Convert the RGB color to HSL
316 const max = Math.max(r, g, b);
317 const min = Math.min(r, g, b);
318 const l = (max + min) / 2;
319
320 // Calculate the brightness position in percentage
321 const brightnessPercentage = Math.round(l / 255 * 100);
322
323 return brightnessPercentage;
324 }
325
326 try {
327 // Access the parent iframe from the nested iframe
328 var parentIframe = window.parent.frameElement;
329
330 // Check if the parentIframe exists
331 if (parentIframe) {
332 // Get the src attribute of the parent iframe
333 var parentSrc = parentIframe.getAttribute("src");
334
335 // Extract the data attribute from the src (assuming it's in the query string)
336 var dataUrlParams = new URLSearchParams(new URL(parentSrc).search);
337 var dataKey = dataUrlParams.get('key');
338 var dataFile = dataUrlParams.get('file');
339
340 var dataParams = atob(dataKey);
341
342 } else {
343 console.error('Parent iframe not found');
344 }
345 } catch (error) {
346 console.error('An error occurred:', error);
347 }
348
349 // Step 2: Create URLSearchParams object
350 const urlParams = new URLSearchParams(dataParams);
351
352 // Step 3: Convert URLSearchParams to Object
353 const params = {};
354 for (const [key, value] of urlParams.entries()) {
355 params[key] = (value === 'yes' || value === 'true') ? true : (value === 'no' || value === 'false' ? false : value);
356 }
357
358
359 // Ensure the DOM is fully loaded before manipulating it
360 if (!(params?.toolbar)) {
361 document.querySelector(".flip-book .controls")?.remove();
362 }
363 if (!(params?.download)) {
364 document.querySelector("li.fnav-item.cmdDownload")?.remove();
365 document.querySelector("li.fnav-item.cmdPrint")?.remove();
366 }
367 if (!(params?.presentation)) {
368 document.querySelector("li.fnav-item.cmdFullScreen")?.remove();
369 }
370 if (!(params?.zoom_in)) {
371 document.querySelector("li.fnav-item.cmdZoomIn")?.remove();
372 }
373 if (!(params?.zoom_out)) {
374 document.querySelector("li.fnav-item.cmdZoomOut")?.remove();
375 }
376 if (!(params?.fit_view)) {
377 document.querySelector("li.fnav-item.cmdDefaultZoom")?.remove();
378 }
379 if (!(params?.bookmark)) {
380 document.querySelector("li.fnav-item.cmdToc")?.remove();
381 }
382
383 const element = document.querySelector(".flip-book .controls");
384 if (params?.flipbook_toolbar_position === 'top') {
385 if (element) {
386 element.classList.add('toolbar-position-top');
387 }
388 }
389 else {
390 if (element) {
391 element.classList.add('toolbar-position-bottom');
392 }
393 }
394
395
396 //Create theme mode function
397 const setThemeMode = (themeMode) => {
398 const htmlEL = document.getElementsByTagName("html")[0];
399 if (htmlEL) {
400 htmlEL.setAttribute('ep-data-theme', themeMode);
401 }
402 }
403
404
405 setThemeMode(params.themeMode);
406
407
408 const pdfIframeStyle = () => {
409 const otherhead = document.getElementsByTagName("head")[0];
410
411 const style = document.createElement("style");
412 style.setAttribute('id', 'EBiframeStyleID');
413
414 let pdfCustomColor = '';
415
416 if (params.themeMode == 'custom') {
417
418 if (!params.customColor) {
419 params.customColor = '#38383d';
420 }
421
422 let colorBrightness = getColorBrightness(params.customColor);
423
424 let iconsTextsColor = 'white';
425 if (colorBrightness > 60) {
426 iconsTextsColor = 'black';
427 }
428
429 pdfCustomColor = `[ep-data-theme=custom] {
430 --body-bg-color: ${params.customColor};
431 --toolbar-bg-color: ${adjustHexColor(params.customColor, 15)};
432 --toolbar-icon-color: ${iconsTextsColor};
433 --toolbar-active-icon-bg-color: ${adjustHexColor(params.customColor, 25)};
434 --toolbar-item-hover-bg-color: ${adjustHexColor(params.customColor, 25)};
435 --toolbar-current-page-number-bg-color: ${adjustHexColor(params.customColor, 10)};
436 --toolbar-page-number-bg-color: ${adjustHexColor(params.customColor, 20)};
437 }
438 `;
439
440 style.textContent = `
441 ${pdfCustomColor}
442 `;
443
444
445 if (otherhead) {
446 if (document.getElementById("EBiframeStyleID")) {
447 document.getElementById("EBiframeStyleID").remove();
448 }
449 otherhead.appendChild(style);
450 }
451 }
452 }
453
454 pdfIframeStyle();
455
456 console.log(params);
457
458
459 const DownloadPDF = (pdfUrl) => {
460 const fileName = pdfUrl.split('/').pop();
461
462 fetch(pdfUrl)
463 .then(response => response.blob())
464 .then(blob => {
465 const url = URL.createObjectURL(blob);
466 const link = document.createElement('a');
467 link.href = url;
468 link.download = fileName;
469 document.body.appendChild(link);
470 link.click();
471 document.body.removeChild(link);
472 URL.revokeObjectURL(url);
473 })
474 .catch(error => console.error('Error downloading the PDF:', error));
475 }
476
477 document.getElementById('download-pdf').addEventListener('click', function (e) {
478 e.preventDefault();
479 DownloadPDF(dataFile);
480 });
481
482 </script>