reader: files_reader evolved with multiple format support (epub and cbr/cbz for now), session (position and preferences) store/restore and more
29
reader/CHANGELOG.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
## Unreleased
|
||||
### Added
|
||||
- Reader now supports CBR/CBZ ('comics') files
|
||||
- Book position is saved on server and restored on next invocation
|
||||
- Framework to support more file format renderers
|
||||
|
||||
## 0.8.3 - 2017-02-02
|
||||
### Fixed
|
||||
. #31: ReferenceError: cleanStartTextContent is not defined, caused by failure to declare local var in epub.js
|
||||
|
||||
## 0.8.3 - 2017-02-01
|
||||
### Fixed
|
||||
- missing $title parameter in template/reader.php caused warnings in log, fixed
|
||||
|
||||
## 0.8.2 - 2017-01-10
|
||||
### Fixed
|
||||
- Nextcloud-port broke compatibility with Owncloud due to OC not supporting CSPv3, workaround implemented
|
||||
|
||||
## 0.8.1 - 2017-01-09
|
||||
### Added
|
||||
- Modified info.xml, added screenshots
|
||||
|
||||
## 0.8.0 - 2017-01-09
|
||||
### Added
|
||||
- new version 0.2.15 of Futurepress epub.js renderer
|
||||
|
||||
### Changed
|
||||
- New logo
|
||||
- First release to be compatible with Nextcloud
|
11
reader/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
files_reader
|
||||
------------
|
||||
|
||||
Reader is an ebook reader based on a pure javascript epub renderer. It only works for books formatted according to the epub standard.
|
||||
|
||||
Using the futurepress epub.js renderer it provides near-native looks, especially when used full-screen. Turn pages by pressing the left/right hand side of the screen/window or using the cursor keys (if you have those), use the sidebar to browse through chapters or bookmarks and add annotations.
|
||||
|
||||
Reader has a night mode (toggled by clicking or pressing the book title/author on top of the viewer) to read in the dark without waking up the neighbours. This is obviously most effective when used full-screen. The colours used for night mode are configurable in the Settings dialog.
|
||||
|
||||
Also in Settings you'll find the option to use ignore any internal formatting in the book by forcing a given font style and size.
|
||||
|
30
reader/appinfo/app.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - Files_Reader App
|
||||
*
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\AppInfo;
|
||||
|
||||
use OCP\Util;
|
||||
|
||||
Util::addscript( 'files_reader', 'plugin');
|
||||
|
||||
if(class_exists('\\OCP\\AppFramework\\Http\\EmptyContentSecurityPolicy')) {
|
||||
$manager = \OC::$server->getContentSecurityPolicyManager();
|
||||
$csp = new \OCP\AppFramework\Http\EmptyContentSecurityPolicy();
|
||||
$csp->addAllowedStyleDomain('\'self\'');
|
||||
$csp->addAllowedStyleDomain('blob:');
|
||||
$csp->addAllowedScriptDomain('\'self\'');
|
||||
$csp->addAllowedFrameDomain('\'self\'');
|
||||
$csp->addAllowedChildSrcDomain('\'self\'');
|
||||
$csp->addAllowedFontDomain('\'self\'');
|
||||
$csp->addAllowedImageDomain('blob:');
|
||||
$manager->addDefaultPolicy($csp);
|
||||
}
|
118
reader/appinfo/application.php.org
Normal file
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - Files_Reader App
|
||||
*
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\AppInfo;
|
||||
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\IContainer;
|
||||
use OCP\IUser;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
use OCA\Files_Reader\Utility\Time;
|
||||
use OCA\Files_Reader\Db\BookmarkMapper;
|
||||
use OCA\Files_Reader\Db\PreferenceMapper;
|
||||
use OCA\Files_Reader\Service\BookmarkService;
|
||||
use OCA\Files_Reader\Service\MetadataService;
|
||||
use OCA\Files_Reader\Service\PreferenceService;
|
||||
use OCA\Files_Reader\Controller\BookmarkController;
|
||||
use OCA\Files_Reader\Controller\MetadataController;
|
||||
use OCA\Files_Reader\Controller\PreferenceController;
|
||||
|
||||
class Application extends App {
|
||||
public function __construct(array $urlParams = array()) {
|
||||
parent::__construct('files_reader', $urlParams);
|
||||
|
||||
$container = $this->getContainer();
|
||||
|
||||
$container->registerService('PageController', function($c){
|
||||
return new PageController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('OCP\IURLGenerator')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('BookmarkController', function($c){
|
||||
return new BookmarkController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('BookmarkService')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('MetadataController', function($c){
|
||||
return new MetadataController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('MetadataService')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('PreferenceController', function($c){
|
||||
$UserId = ($user = $c->query('ServerContainer')->getUserSession()->getUser())
|
||||
? $user->getUID() : null;
|
||||
|
||||
return new PreferenceController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('OCP\IURLGenerator'),
|
||||
$c->query('PreferenceService')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('BookmarkService', function($c){
|
||||
$UserId = ($user = $c->query('ServerContainer')->getUserSession()->getUser())
|
||||
? $user->getUID()
|
||||
: null;
|
||||
|
||||
return new BookmarkService(
|
||||
$c->query('BookmarkMapper'),
|
||||
$UserId
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('MetadataService', function($c){
|
||||
return new MetadataService();
|
||||
});
|
||||
|
||||
$container->registerService('PreferenceService', function($c){
|
||||
return new PreferenceService(
|
||||
$c->query('PreferenceMapper')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('BookmarkMapper', function($c){
|
||||
$UserId = ($user = $c->query('ServerContainer')->getUserSession()->getUser())
|
||||
? $user->getUID()
|
||||
: null;
|
||||
|
||||
return new BookmarkMapper(
|
||||
$c->query('ServerContainer')->getDb(),
|
||||
$UserId,
|
||||
$c->query('Time')
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('PreferenceMapper', function($c){
|
||||
$UserId = ($user = $c->query('ServerContainer')->getUserSession()->getUser())
|
||||
? $user->getUID()
|
||||
: null;
|
||||
|
||||
return new PreferenceMapper(
|
||||
$c->query('ServerContainer')->getDb(),
|
||||
$UserId,
|
||||
$c->query('Time')
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
185
reader/appinfo/database.xml
Normal file
|
@ -0,0 +1,185 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<database>
|
||||
<name>*dbname*</name>
|
||||
<create>true</create>
|
||||
<overwrite>false</overwrite>
|
||||
<charset>utf8</charset>
|
||||
|
||||
<table>
|
||||
<name>*dbprefix*reader_bookmarks</name>
|
||||
<declaration>
|
||||
<field>
|
||||
<!-- id -->
|
||||
<name>id</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<autoincrement>true</autoincrement>
|
||||
<unsigned>true</unsigned>
|
||||
<primary>true</primary>
|
||||
<length>8</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- user ID, maps bookmark to NC/OC user -->
|
||||
<name>user_id</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- file ID, maps to NC/OC file ID -->
|
||||
<name>file_id</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
<length>11</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- name -->
|
||||
<name>name</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- value -->
|
||||
<name>value</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- last_modified -->
|
||||
<name>last_modified</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
|
||||
<index>
|
||||
<name>reader_bookmarks_file_id_index</name>
|
||||
<field>
|
||||
<name>file_id</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
<index>
|
||||
<name>reader_bookmarks_user_id_index</name>
|
||||
<field>
|
||||
<name>user_id</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
<index>
|
||||
<name>reader_bookmarks_name_index</name>
|
||||
<field>
|
||||
<name>name</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
</declaration>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<name>*dbprefix*reader_preferences</name>
|
||||
<declaration>
|
||||
<field>
|
||||
<!-- id -->
|
||||
<name>id</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<autoincrement>true</autoincrement>
|
||||
<unsigned>true</unsigned>
|
||||
<primary>true</primary>
|
||||
<length>8</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- user ID, maps preference to NC/OC user -->
|
||||
<name>user_id</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- file ID, maps to NC/OC file ID -->
|
||||
<name>file_id</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
<length>11</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- scope -->
|
||||
<name>scope</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>32</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- name -->
|
||||
<name>name</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>128</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- value -->
|
||||
<name>value</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>128</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<!-- last_modified -->
|
||||
<name>last_modified</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
|
||||
<index>
|
||||
<name>reader_preferences_file_id_index</name>
|
||||
<field>
|
||||
<name>file_id</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
<index>
|
||||
<name>reader_preferences_user_id_index</name>
|
||||
<field>
|
||||
<name>user_id</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
<index>
|
||||
<name>reader_preferences_scope_index</name>
|
||||
<field>
|
||||
<name>scope</name>
|
||||
</field>
|
||||
</index>
|
||||
|
||||
</declaration>
|
||||
</table>
|
||||
|
||||
</database>
|
42
reader/appinfo/info.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<info>
|
||||
<id>files_reader</id>
|
||||
<name>Reader (ebook reader)</name>
|
||||
<namespace>Files_Reader</namespace>
|
||||
<summary>An epub-compatible ebook reader based on a pure javascript epub renderer</summary>
|
||||
<description>
|
||||
Reader is an ebook reader based on pure javascript renderers. It works for books formatted according to the epub standard as well as those conforming to the (informal) CBR and CBZ ('comics') scheme.
|
||||
|
||||
For Epub Reader uses the futurepress epub.js renderer (https://github.com/futurepress/epub.js) to provide near-native looks, especially when used full-screen. Turn pages by pressing the left/right hand side of the screen/window or using the cursor keys (if you have those), use the sidebar to browse through chapters or bookmarks and add annotations.
|
||||
|
||||
CBR and CBZ are supported using a custom renderer based in part on balaclark's work (https://github.com/balaclark/HTML5-Comic-Book-Reader). As with Epub, books can be navigated using the keyboard as well as mouse or touch navigation.
|
||||
|
||||
For text-based formats Reader has a night mode (toggled by clicking or pressing the book title/author on top of the viewer) to read in the dark without waking up the neighbours. This is obviously most effective when used full-screen. The colours used for night mode are configurable in the Settings dialog.
|
||||
|
||||
Also in Settings you'll find the option to use ignore any internal formatting in the book by forcing a given font style and size.
|
||||
|
||||
Current reading position and settings are saved to the server which makes it possible to start reading on one device and continue on another without losing track of where you were.
|
||||
</description>
|
||||
<version>0.8.4</version>
|
||||
<licence>AGPL</licence>
|
||||
<author>Frank de Lange</author>
|
||||
<documentation>
|
||||
<user>https://github.com/Yetangitu/owncloud-apps/blob/master/files_reader/README.md</user>
|
||||
</documentation>
|
||||
<bugs>https://github.com/Yetangitu/owncloud-apps/issues</bugs>
|
||||
<website>https://github.com/Yetangitu/owncloud-apps/files_reader</website>
|
||||
<screenshot>https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/files_reader-1.png</screenshot>
|
||||
<screenshot>https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/files_reader-2.png</screenshot>
|
||||
<screenshot>https://raw.githubusercontent.com/Yetangitu/owncloud-apps/master/screenshots/files_reader-3.png</screenshot>
|
||||
<category>files</category>
|
||||
<category>multimedia</category>
|
||||
<category>office</category>
|
||||
<dependencies>
|
||||
<owncloud min-version="8.1" max-version="9.2" />
|
||||
<nextcloud min-version="8.1" max-version="12"/>
|
||||
<database>pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database>mysql</database>
|
||||
</dependencies>
|
||||
<ocsid>167127</ocsid>
|
||||
</info>
|
33
reader/appinfo/routes.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - Files_Reader App
|
||||
*
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
*/
|
||||
|
||||
return ['routes' => [
|
||||
// Page
|
||||
['name' => 'page#showReader', 'url' => '/', 'verb' => 'GET'],
|
||||
|
||||
// Bookmarks
|
||||
['name' => 'bookmark#get_cursor', 'url' => '/position/cursor/{fileId}', 'verb' => 'GET'],
|
||||
['name' => 'bookmark#set_cursor', 'url' => '/position/cursor/{fileId}/{value}', 'verb' => 'POST'],
|
||||
['name' => 'bookmark#get', 'url' => '/position/{fileId}/{name}', 'verb' => 'GET', 'defaults' => ['name' => '']],
|
||||
['name' => 'bookmark#set', 'url' => '/position/{fileId}/{name}/{value}', 'verb' => 'POST'],
|
||||
|
||||
// Metadata
|
||||
['name' => 'metadata#get', 'url' => '/metadata/{fileId}/{name}', 'verb' => 'GET', 'defaults' => ['name' => '']],
|
||||
['name' => 'metadata#set', 'url' => '/metadata/{fileId}/{name}/{value}', 'verb' => 'POST'],
|
||||
|
||||
// Preferences
|
||||
['name' => 'preference#get_default', 'url' => '/preference/default/{scope}/{name}', 'verb' => 'GET', 'defaults' => ['name' => '']],
|
||||
['name' => 'preference#set_default', 'url' => '/preference/default/{scope}/{name}/{value}', 'verb' => 'POST'],
|
||||
['name' => 'preference#get', 'url' => '/preference/{fileId}/{scope}/{name}', 'verb' => 'GET', 'defaults' => ['name' => '']],
|
||||
['name' => 'preference#set', 'url' => '/preference/{fileId}/{scope}/{name}/{value}', 'verb' => 'POST'],
|
||||
]];
|
||||
|
8
reader/css/annotations.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
.ui-loader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.annotator-hl {
|
||||
box-shadow: none !important;
|
||||
cursor: pointer !important;
|
||||
}
|
BIN
reader/css/font/fontello.eot
Normal file
33
reader/css/font/fontello.svg
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2013 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="search" unicode="" d="m643 386q0 103-74 176t-176 74t-177-74t-73-176t73-177t177-73t176 73t74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69q-80 0-153 31t-125 84t-84 125t-31 153t31 152t84 126t125 84t153 31t152-31t126-84t84-126t31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="resize-full-1" unicode="" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" />
|
||||
<glyph glyph-name="cancel-circled2" unicode="" d="m612 248l-81-82q-6-5-13-5t-13 5l-76 77l-77-77q-5-5-13-5t-13 5l-81 82q-6 5-6 13t6 13l76 76l-76 76q-6 6-6 13t6 13l81 82q6 5 13 5t13-5l77-77l76 77q6 5 13 5t13-5l81-82q6-5 6-13t-6-13l-76-76l76-76q6-6 6-13t-6-13z m120 102q0 83-41 152t-110 111t-152 41t-153-41t-110-111t-41-152t41-152t110-111t153-41t152 41t110 111t41 152z m125 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="link" unicode="" d="m812 171q0 23-15 38l-116 116q-16 16-38 16q-24 0-40-18q1-1 10-10t12-12t9-11t7-14t2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7t-11 9t-12 12t-10 10q-19-17-19-40q0-23 16-38l115-116q15-15 38-15q22 0 38 15l82 81q15 16 15 37z m-392 394q0 22-15 38l-115 115q-16 16-38 16q-22 0-38-15l-82-82q-16-15-16-37q0-22 16-38l116-116q15-15 38-15q23 0 40 17q-2 2-11 11t-12 12t-8 10t-7 14t-2 16q0 22 15 38t38 15q9 0 16-2t14-7t10-8t12-12t11-11q18 17 18 41z m500-394q0-67-48-113l-82-81q-46-47-113-47q-68 0-114 48l-115 115q-46 47-46 114q0 68 49 116l-49 49q-48-49-116-49q-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46q67 0 114-47l114-116q47-46 47-113q0-69-49-117l49-49q48 49 116 49q67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="bookmark" unicode="" d="m650 779q12 0 24-5q19-8 29-23t11-35v-719q0-19-11-35t-29-23q-10-4-24-4q-27 0-47 18l-246 236l-246-236q-20-19-46-19q-13 0-25 5q-18 7-29 23t-11 35v719q0 19 11 35t29 23q12 5 25 5h585z" horiz-adv-x="714.3" />
|
||||
<glyph glyph-name="bookmark-empty" unicode="" d="m643 707h-572v-693l237 227l49 47l50-47l236-227v693z m7 72q12 0 24-5q19-8 29-23t11-35v-719q0-19-11-35t-29-23q-10-4-24-4q-27 0-47 18l-246 236l-246-236q-20-19-46-19q-13 0-25 5q-18 7-29 23t-11 35v719q0 19 11 35t29 23q12 5 25 5h585z" horiz-adv-x="714.3" />
|
||||
<glyph glyph-name="download-cloud" unicode="" d="m714 332q0 8-5 13t-13 5h-125v196q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-196h-125q-8 0-13-5t-5-13q0-8 5-13l196-196q5-5 13-5t13 5l196 196q5 6 5 13z m357-125q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24q0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35q59 0 101-42t42-101q0-43-23-77q72-17 119-76t46-133z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="edit" unicode="" d="m496 189l64 65l-85 85l-64-65v-31h53v-54h32z m245 402q-9 9-18 0l-196-196q-9-9 0-18t18 0l196 196q9 9 0 18z m45-331v-106q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q35 0 65-14q9-4 10-13q2-10-5-16l-27-28q-8-8-18-4q-13 3-25 3h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v70q0 7 5 12l36 36q8 8 20 4t11-16z m-54 411l161-160l-375-375h-161v160z m248-73l-51-52l-161 161l51 51q16 16 38 16t38-16l85-84q16-16 16-38t-16-38z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="menu" unicode="" d="m857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="cog" unicode="" d="m571 350q0 59-41 101t-101 42t-101-42t-42-101t42-101t101-42t101 42t41 101z m286 61v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51q19-27 59-77q6-6 6-13t-5-13q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21q-9-76-16-104q-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 21l-79-60q-6-5-14-5q-8 0-14 6q-70 64-92 94q-4 5-4 13q0 6 5 12q8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13v124q0 7 5 13t10 7l104 16q8 25 22 51q-23 32-60 77q-6 7-6 14q0 5 5 12q15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21q9 76 17 104q3 15 20 15h124q7 0 13-4t7-12l15-103q28-9 50-21l80 60q5 5 13 5q7 0 14-5q72-67 92-95q4-5 4-13q0-6-4-12q-9-12-29-38t-30-39q14-28 23-55l102-15q7-1 12-7t4-13z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="resize-full" unicode="" d="m421 261q0-8-5-13l-185-185l80-81q10-10 10-25t-10-25t-25-11h-250q-15 0-25 11t-11 25v250q0 15 11 25t25 11t25-11l80-80l185 185q6 6 13 6t13-6l64-63q5-6 5-13z m436 482v-250q0-15-10-25t-26-11t-25 11l-80 80l-185-185q-6-6-13-6t-13 6l-64 63q-5 6-5 13t5 13l186 185l-81 81q-10 10-10 25t10 25t25 11h250q15 0 26-11t10-25z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="cancel-circled" unicode="" d="m641 224q0 14-10 25l-101 101l101 101q10 11 10 25q0 15-10 26l-51 50q-10 11-25 11q-15 0-25-11l-101-101l-101 101q-11 11-26 11q-15 0-25-11l-50-50q-11-11-11-26q0-14 11-25l101-101l-101-101q-11-11-11-25q0-15 11-26l50-50q10-11 25-11q15 0 26 11l101 101l101-101q10-11 25-11q15 0 25 11l51 50q10 11 10 26z m216 126q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="up-dir" unicode="" d="m571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25t11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="right-dir" unicode="" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11t-11 25v500q0 15 11 25t25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="angle-right" unicode="" d="m332 314q0-7-6-13l-260-260q-5-5-12-5t-13 5l-28 28q-6 6-6 13t6 13l219 219l-219 220q-6 5-6 12t6 13l28 28q5 6 13 6t12-6l260-260q6-5 6-13z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="angle-down" unicode="" d="m600 439q0-7-6-13l-260-260q-5-5-13-5t-12 5l-260 260q-6 6-6 13t6 13l27 28q6 6 13 6t13-6l219-219l220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="right" unicode="" d="m1000 404v-108q0-7-5-12t-13-5h-696v-125q0-12-11-17t-19 3l-215 196q-5 5-5 12q0 8 5 14l215 197q9 8 19 4q11-5 11-17v-125h696q8 0 13-5t5-12z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="list-1" unicode="" d="m143 118v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 13t13 5h107q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-107q-7 0-13 6t-5 12v107q0 8 5 13t13 5h107q7 0 13-5t5-13z m857-428v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z m-857 643v-107q0-8-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m857-429v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 13t12 5h750q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-750q-7 0-12 6t-6 12v107q0 8 6 13t12 5h750q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="list-numbered" unicode="" d="m213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25q16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31t20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30q0 29 14 52t31 38t37 27t31 24t14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36t-42-28t-20-30h71v34h59z m786-178v-107q0-8-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 68t1 67v7h-1q-5-10-28-30l-40 42l76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="columns" unicode="" d="m89-7h340v643h-358v-625q0-8 6-13t12-5z m768 18v625h-357v-643h339q8 0 13 5t5 13z m72 678v-678q0-37-27-63t-63-27h-750q-36 0-63 27t-26 63v678q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="list" unicode="" d="m100 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m0 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m0 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m200-100q-20 0-35 15t-15 35t15 35t35 15l350 0q22 0 36-15t14-35t-15-35t-35-15l-350 0z m350-100q22 0 36-15t14-35t-15-35t-35-15l-350 0q-20 0-35 15t-15 35t15 35t35 15l350 0z m0-200q22 0 36-15t14-35t-15-35t-35-15l-350 0q-20 0-35 15t-15 35t15 35t35 15l350 0z" horiz-adv-x="700" />
|
||||
<glyph glyph-name="resize-small" unicode="" d="m429 314v-250q0-14-11-25t-25-10t-25 10l-81 81l-185-186q-5-5-13-5t-13 5l-63 64q-6 5-6 13t6 13l185 185l-80 80q-11 11-11 25t11 25t25 11h250q14 0 25-11t11-25z m421 375q0-7-6-13l-185-185l80-80q11-11 11-25t-11-25t-25-11h-250q-14 0-25 11t-10 25v250q0 14 10 25t25 10t25-10l81-81l185 186q6 5 13 5t13-5l63-64q6-5 6-13z" horiz-adv-x="857.1" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 9.4 KiB |
BIN
reader/css/font/fontello.ttf
Normal file
BIN
reader/css/font/fontello.woff
Normal file
33
reader/css/idevice.css
Normal file
|
@ -0,0 +1,33 @@
|
|||
/* For iPad portrait layouts only */
|
||||
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
|
||||
#viewer iframe {
|
||||
width: 460px;
|
||||
height: 740px;
|
||||
}
|
||||
}
|
||||
/*For iPad landscape layouts only */
|
||||
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) {
|
||||
#viewer iframe {
|
||||
width: 460px;
|
||||
height: 415px;
|
||||
}
|
||||
}
|
||||
/* For iPhone portrait layouts only */
|
||||
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
|
||||
#viewer {
|
||||
width: 256px;
|
||||
height: 432px;
|
||||
}
|
||||
#viewer iframe {
|
||||
width: 256px;
|
||||
height: 432px;
|
||||
}
|
||||
}
|
||||
/* For iPhone landscape layouts only */
|
||||
@media only screen and (max-device-width: 480px) and (orientation: landscape) {
|
||||
#viewer iframe {
|
||||
width: 256px;
|
||||
height: 124px;
|
||||
}
|
||||
}
|
||||
|
782
reader/css/main.css
Normal file
|
@ -0,0 +1,782 @@
|
|||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('font/fontello.eot?60518104');
|
||||
src: url('font/fontello.eot?60518104#iefix') format('embedded-opentype'),
|
||||
url('font/fontello.woff?60518104') format('woff'),
|
||||
url('font/fontello.ttf?60518104') format('truetype'),
|
||||
url('font/fontello.svg?60518104#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #4e4e4e;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#main {
|
||||
/* height: 500px; */
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
right: 0;
|
||||
/* left: 40px; */
|
||||
/* -webkit-transform: translate(40px, 0);
|
||||
-moz-transform: translate(40px, 0); */
|
||||
|
||||
/* border-radius: 5px 0px 0px 5px; */
|
||||
border-radius: 5px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
-webkit-transition: -webkit-transform .4s, width .2s;
|
||||
-moz-transition: -webkit-transform .4s, width .2s;
|
||||
|
||||
-moz-box-shadow: inset 0 0 50px rgba(0,0,0,.1);
|
||||
-webkit-box-shadow: inset 0 0 50px rgba(0,0,0,.1);
|
||||
box-shadow: inset 0 0 50px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
|
||||
#titlebar {
|
||||
height: 8%;
|
||||
min-height: 20px;
|
||||
padding: 10px;
|
||||
/* margin: 0 50px 0 50px; */
|
||||
position: relative;
|
||||
color: #4f4f4f;
|
||||
font-weight: 100;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
opacity: .5;
|
||||
text-align: center;
|
||||
-webkit-transition: opacity .5s;
|
||||
-moz-transition: opacity .5s;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#titlebar:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#titlebar a {
|
||||
width: 18px;
|
||||
height: 19px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
opacity: .5;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#titlebar a::before {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#titlebar a:hover {
|
||||
opacity: .8;
|
||||
border: 1px rgba(0,0,0,.2) solid;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#titlebar a:active {
|
||||
opacity: 1;
|
||||
color: rgba(0,0,0,.6);
|
||||
/* margin: 1px -1px -1px 1px; */
|
||||
-moz-box-shadow: inset 0 0 6px rgba(155,155,155,.8);
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(155,155,155,.8);
|
||||
box-shadow: inset 0 0 6px rgba(155,155,155,.8);
|
||||
}
|
||||
|
||||
#book-title {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#title-seperator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#viewer {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
/* margin-left: 10%; */
|
||||
margin: 0 auto;
|
||||
max-width: 1250px;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#viewer iframe {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#prev, #next {
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
height: 85%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.touch_nav {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.arrow div {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
#prev {
|
||||
left: 0;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
#next {
|
||||
right: 0;
|
||||
padding-right: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
/* position: relative;
|
||||
top: 50%;
|
||||
margin-top: -32px; */
|
||||
font-size: 64px;
|
||||
color: #E2E2E2;
|
||||
font-family: arial, sans-serif;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
display: table;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.arrow:hover {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.arrow:active,
|
||||
.arrow.active {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
background: #6b6b6b;
|
||||
position: absolute;
|
||||
/* left: -260px; */
|
||||
/* -webkit-transform: translate(-260px, 0);
|
||||
-moz-transform: translate(-260px, 0); */
|
||||
top: 0;
|
||||
min-width: 300px;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
-webkit-transition: -webkit-transform .5s;
|
||||
-moz-transition: -moz-transform .5s;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#sidebar.open {
|
||||
/* left: 0; */
|
||||
/* -webkit-transform: translate(0, 0);
|
||||
-moz-transform: translate(0, 0); */
|
||||
}
|
||||
|
||||
#main.closed {
|
||||
/* left: 300px; */
|
||||
-webkit-transform: translate(300px, 0);
|
||||
-moz-transform: translate(300px, 0);
|
||||
}
|
||||
|
||||
#main.single {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
#main.single #viewer {
|
||||
/* width: 60%;
|
||||
margin-left: 20%; */
|
||||
}
|
||||
|
||||
#panels {
|
||||
background: #4e4e4e;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 13px 0;
|
||||
height: 14px;
|
||||
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.6);
|
||||
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.6);
|
||||
box-shadow: 0px 1px 3px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
#opener {
|
||||
/* padding: 10px 10px; */
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* #opener #slider {
|
||||
width: 25px;
|
||||
} */
|
||||
|
||||
#metainfo {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
#title-controls {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#panels a {
|
||||
visibility: hidden;
|
||||
width: 18px;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
color: #ccc;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
#panels a::before {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#panels a:hover {
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
#panels a:active {
|
||||
color: #AAA;
|
||||
margin: 1px 0 -1px 6px;
|
||||
}
|
||||
|
||||
#panels a.active,
|
||||
#panels a.active:hover {
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
#searchBox {
|
||||
width: 165px;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-top: -1px;
|
||||
/*
|
||||
border-radius: 5px;
|
||||
background: #9b9b9b;
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
margin-top: -5px;
|
||||
padding: 3px 10px;
|
||||
color: #000;
|
||||
border: none;
|
||||
outline: none; */
|
||||
|
||||
}
|
||||
|
||||
input::-webkit-input-placeholder {
|
||||
color: #454545;
|
||||
}
|
||||
input:-moz-placeholder {
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
#divider {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
border-right: 1px #000 solid;
|
||||
height: 80%;
|
||||
z-index: 1;
|
||||
left: 50%;
|
||||
margin-left: -1px;
|
||||
top: 10%;
|
||||
opacity: .15;
|
||||
box-shadow: -2px 0 15px rgba(0, 0, 0, 1);
|
||||
display: none;
|
||||
}
|
||||
|
||||
#divider.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#loader {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -33px 0 0 -33px;
|
||||
}
|
||||
|
||||
#tocView,
|
||||
#bookmarksView {
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
min-width: 300px;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
-webkit-transition: visibility 0 ease .5s;
|
||||
-moz-transition: visibility 0 ease .5s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#sidebar.open #tocView,
|
||||
#sidebar.open #bookmarksView {
|
||||
overflow-y: auto;
|
||||
visibility: visible;
|
||||
-webkit-transition: visibility 0 ease 0;
|
||||
-moz-transition: visibility 0 ease 0;
|
||||
}
|
||||
|
||||
#sidebar.open #tocView {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#tocView > ul,
|
||||
#bookmarksView > ul {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 50px;
|
||||
padding-left: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#tocView li,
|
||||
#bookmarksView li {
|
||||
margin-bottom:10px;
|
||||
width: 225px;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
list-style: none;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
#tocView li:active,
|
||||
#tocView li.currentChapter
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list_item a {
|
||||
color: #AAA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.list_item a.chapter {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.list_item a.section {
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.list_item.currentChapter > a,
|
||||
.list_item a:hover {
|
||||
color: #f1f1f1
|
||||
}
|
||||
|
||||
/* #tocView li.openChapter > a, */
|
||||
.list_item a:hover {
|
||||
color: #E2E2E2;
|
||||
}
|
||||
|
||||
.list_item ul {
|
||||
padding-left:10px;
|
||||
margin-top: 8px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list_item.currentChapter > ul,
|
||||
.list_item.openChapter > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#tocView.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toc_toggle {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.toc_toggle:before {
|
||||
content: '▸';
|
||||
color: #fff;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
.currentChapter > .toc_toggle:before,
|
||||
.openChapter > .toc_toggle:before {
|
||||
content: '▾';
|
||||
}
|
||||
|
||||
.view {
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
display: none;
|
||||
padding-top: 50px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#searchResults {
|
||||
margin-bottom: 50px;
|
||||
padding-left: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#searchResults li {
|
||||
margin-bottom:10px;
|
||||
width: 225px;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#searchResults a {
|
||||
color: #AAA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#searchResults p {
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
#searchResults p .match {
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#searchResults li > p {
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
#searchResults li a:hover {
|
||||
color: #E2E2E2;
|
||||
}
|
||||
|
||||
#searchView.shown {
|
||||
display: block;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#notes {
|
||||
padding: 0 0 0 34px;
|
||||
}
|
||||
|
||||
#notes li {
|
||||
color: #eee;
|
||||
font-size: 12px;
|
||||
width: 240px;
|
||||
border-top: 1px #fff solid;
|
||||
padding-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#notes li a {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
#notes li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#notes li img {
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
#note-text {
|
||||
display: block;
|
||||
width: 260px;
|
||||
height: 80px;
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#note-text[disabled], #note-text[disabled="disabled"]{
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
#note-anchor {
|
||||
margin-left: 218px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#settingsPanel {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#settingsPanel h3 {
|
||||
color:#f1f1f1;
|
||||
font-family:Georgia, "Times New Roman", Times, serif;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
#settingsPanel ul {
|
||||
margin-top:60px;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
#settingsPanel li {
|
||||
font-size:1em;
|
||||
color:#f1f1f1;
|
||||
}
|
||||
|
||||
#settingsPanel .xsmall { font-size:x-small; }
|
||||
#settingsPanel .small { font-size:small; }
|
||||
#settingsPanel .medium { font-size:medium; }
|
||||
#settingsPanel .large { font-size:large; }
|
||||
#settingsPanel .xlarge { font-size:x-large; }
|
||||
|
||||
.highlight { background-color: yellow }
|
||||
|
||||
.modal {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 50%;
|
||||
width: 630px;
|
||||
|
||||
height: auto;
|
||||
z-index: 2000;
|
||||
visibility: hidden;
|
||||
margin-left: -320px;
|
||||
margin-top: -160px;
|
||||
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255,255,255,0.8);
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.md-show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.md-show ~ .overlay {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Content styles */
|
||||
.md-content {
|
||||
color: #fff;
|
||||
background: #6b6b6b;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
margin: 0 auto;
|
||||
height: 320px;
|
||||
}
|
||||
|
||||
.md-content h3 {
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
font-weight: 300;
|
||||
opacity: 0.8;
|
||||
background: rgba(0,0,0,0.1);
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
|
||||
.md-content > div {
|
||||
padding: 15px 40px 30px;
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.md-content > div p {
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.md-content > div ul {
|
||||
margin: 0;
|
||||
padding: 0 0 30px 20px;
|
||||
}
|
||||
|
||||
.md-content > div ul li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.md-content button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* Effect 1: Fade in and scale up */
|
||||
.md-effect-1 .md-content {
|
||||
-webkit-transform: scale(0.7);
|
||||
-moz-transform: scale(0.7);
|
||||
-ms-transform: scale(0.7);
|
||||
transform: scale(0.7);
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.md-show.md-effect-1 .md-content {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.md-content > .closer {
|
||||
font-size: 18px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 24px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1040px) {
|
||||
#viewer{
|
||||
width: 50%;
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
#divider,
|
||||
#divider.show {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
#viewer{
|
||||
width: 60%;
|
||||
margin-left: 20%;
|
||||
}
|
||||
|
||||
#prev {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
#next {
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 550px) {
|
||||
#viewer{
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
}
|
||||
|
||||
#prev {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#next {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.arrow div {
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#main {
|
||||
-webkit-transform: translate(0, 0);
|
||||
-moz-transform: translate(0, 0);
|
||||
-webkit-transition: -webkit-transform .3s;
|
||||
-moz-transition: -moz-transform .3s;
|
||||
}
|
||||
|
||||
#main.closed {
|
||||
-webkit-transform: translate(260px, 0);
|
||||
-moz-transform: translate(260px, 0);
|
||||
}
|
||||
|
||||
#titlebar {
|
||||
/* font-size: 16px; */
|
||||
/* margin: 0 50px 0 50px; */
|
||||
}
|
||||
|
||||
#metainfo {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#tocView {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
#tocView li {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#tocView > ul{
|
||||
padding-left: 10px;
|
||||
webkit-padding-start:;
|
||||
}
|
||||
}
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
font-size: 112%;
|
||||
}
|
||||
|
||||
|
||||
.icon-search:before { content: '\e807'; } /* '' */
|
||||
.icon-resize-full-1:before { content: '\e804'; } /* '' */
|
||||
.icon-cancel-circled2:before { content: '\e80f'; } /* '' */
|
||||
.icon-link:before { content: '\e80d'; } /* '' */
|
||||
.icon-bookmark:before { content: '\e805'; } /* '' */
|
||||
.icon-bookmark-empty:before { content: '\e806'; } /* '' */
|
||||
.icon-download-cloud:before { content: '\e811'; } /* '' */
|
||||
.icon-edit:before { content: '\e814'; } /* '' */
|
||||
.icon-menu:before { content: '\e802'; } /* '' */
|
||||
.icon-cog:before { content: '\e813'; } /* '' */
|
||||
.icon-resize-full:before { content: '\e812'; } /* '' */
|
||||
.icon-cancel-circled:before { content: '\e80e'; } /* '' */
|
||||
.icon-up-dir:before { content: '\e80c'; } /* '' */
|
||||
.icon-right-dir:before { content: '\e80b'; } /* '' */
|
||||
.icon-angle-right:before { content: '\e809'; } /* '' */
|
||||
.icon-angle-down:before { content: '\e80a'; } /* '' */
|
||||
.icon-right:before { content: '\e815'; } /* '' */
|
||||
.icon-list-1:before { content: '\e803'; } /* '' */
|
||||
.icon-list-numbered:before { content: '\e801'; } /* '' */
|
||||
.icon-columns:before { content: '\e810'; } /* '' */
|
||||
.icon-list:before { content: '\e800'; } /* '' */
|
||||
.icon-resize-small:before { content: '\e808'; } /* '' */
|
505
reader/css/normalize.css
vendored
Normal file
|
@ -0,0 +1,505 @@
|
|||
/*! normalize.css v1.0.1 | MIT License | git.io/normalize */
|
||||
|
||||
/* ==========================================================================
|
||||
HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prevents modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3,
|
||||
* and Safari 4.
|
||||
* Known issue: no IE 6 support.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Base
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
|
||||
* `em` units.
|
||||
* 2. Prevents iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-size: 100%; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses `font-family` inconsistency between `textarea` and other form
|
||||
* elements.
|
||||
*/
|
||||
|
||||
html,
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses margins handled incorrectly in IE 6/7.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Links
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Addresses `outline` inconsistency between Chrome and other browsers.
|
||||
*/
|
||||
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
/*
|
||||
* Improves readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Typography
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Addresses font sizes and margins set differently in IE 6/7.
|
||||
* Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
||||
* and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
margin: 0.83em 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.17em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
margin: 1.33em 0;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 0.83em;
|
||||
margin: 1.67em 0;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 0.75em;
|
||||
margin: 2.33em 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses styling not present in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses styling not present in IE 6/7/8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses margins set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
p,
|
||||
pre {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Corrects font family set oddly in IE 6, Safari 4/5, and Chrome.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
_font-family: 'courier new', monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Improves readability of pre-formatted text in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses CSS quotes not supported in IE 6/7.
|
||||
*/
|
||||
|
||||
q {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses `quotes` property not supported in Safari 4.
|
||||
*/
|
||||
|
||||
q:before,
|
||||
q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Lists
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Addresses margins set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
dl,
|
||||
menu,
|
||||
ol,
|
||||
ul {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0 0 0 40px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses paddings set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
menu,
|
||||
ol,
|
||||
ul {
|
||||
padding: 0 0 0 40px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Corrects list images handled incorrectly in IE 7.
|
||||
*/
|
||||
|
||||
nav ul,
|
||||
nav ol {
|
||||
list-style: none;
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
||||
* 2. Improves image quality when scaled in IE 7.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0; /* 1 */
|
||||
-ms-interpolation-mode: bicubic; /* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Corrects overflow displayed oddly in IE 9.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Figures
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Forms
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Corrects margin displayed oddly in IE 6/7.
|
||||
*/
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Corrects color not being inherited in IE 6/7/8/9.
|
||||
* 2. Corrects text not wrapping in Firefox 3.
|
||||
* 3. Corrects alignment displayed oddly in IE 6/7.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0;
|
||||
white-space: normal; /* 2 */
|
||||
*margin-left: -7px; /* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Corrects font size not being inherited in all browsers.
|
||||
* 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5,
|
||||
* and Chrome.
|
||||
* 3. Improves appearance and consistency in all browsers.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-size: 100%; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
vertical-align: baseline; /* 3 */
|
||||
*vertical-align: middle; /* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Corrects inability to style clickable `input` types in iOS.
|
||||
* 3. Improves usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
* 4. Removes inner spacing in IE 7 without affecting normal text inputs.
|
||||
* Known issue: inner spacing remains in IE 6.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
*overflow: visible; /* 4 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Addresses box sizing set to content-box in IE 8/9.
|
||||
* 2. Removes excess padding in IE 8/9.
|
||||
* 3. Removes excess padding in IE 7.
|
||||
* Known issue: excess padding remains in IE 6.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
*height: 13px; /* 3 */
|
||||
*width: 13px; /* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
/*
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Removes inner padding and search cancel button in Safari 5 and Chrome
|
||||
* on OS X.
|
||||
*/
|
||||
|
||||
/* input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
} */
|
||||
|
||||
/*
|
||||
* Removes inner padding and border in Firefox 3+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Removes default vertical scrollbar in IE 6/7/8/9.
|
||||
* 2. Improves readability and alignment in all browsers.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto; /* 1 */
|
||||
vertical-align: top; /* 2 */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Tables
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
96
reader/css/popup.css
Normal file
|
@ -0,0 +1,96 @@
|
|||
/* http://davidwalsh.name/css-tooltips */
|
||||
/* base CSS element */
|
||||
.popup {
|
||||
background: #eee;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||
position: fixed;
|
||||
max-width: 300px;
|
||||
font-size: 12px;
|
||||
|
||||
display: none;
|
||||
margin-left: 2px;
|
||||
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.popup.above {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.popup.left {
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
||||
.popup.right {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.pop_content {
|
||||
max-height: 225px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.pop_content > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* below */
|
||||
.popup:before {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
border-bottom: 10px solid #eee;
|
||||
border-right: 10px solid transparent;
|
||||
border-left: 10px solid transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
left: 50%;
|
||||
top: -10px;
|
||||
margin-left: -6px;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.popup:after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
border-bottom: 9px solid #eee;
|
||||
border-right: 9px solid transparent;
|
||||
border-left: 9px solid transparent;
|
||||
left: 50%;
|
||||
top: -9px;
|
||||
margin-left: -5px;
|
||||
content: '';
|
||||
}
|
||||
|
||||
/* above */
|
||||
.popup.above:before {
|
||||
border-bottom: none;
|
||||
border-top: 10px solid #eee;
|
||||
border-top-color: rgba(0, 0, 0, 0.2);
|
||||
top: 100%;
|
||||
}
|
||||
|
||||
.popup.above:after {
|
||||
border-bottom: none;
|
||||
border-top: 9px solid #eee;
|
||||
top: 100%;
|
||||
}
|
||||
|
||||
.popup.left:before,
|
||||
.popup.left:after
|
||||
{
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.popup.right:before,
|
||||
.popup.right:after
|
||||
{
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
|
||||
.popup.show, .popup.on {
|
||||
display: block;
|
||||
}
|
31
reader/css/tooltip.css
Normal file
|
@ -0,0 +1,31 @@
|
|||
.tooltip {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
*.tooltip:hover span {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
*.tooltip span {
|
||||
z-index: 10;
|
||||
padding: 1em;
|
||||
bottom: 2em;
|
||||
right: -10em;
|
||||
width: 50%;
|
||||
background-color: #222222;
|
||||
color: #FFFFFF;
|
||||
height: auto;
|
||||
border-radius: 0.5em;
|
||||
opacity: 0;
|
||||
position:absolute;
|
||||
visibility: hidden;
|
||||
word-wrap: break-word;
|
||||
-webkit-transition: all 0.5s;
|
||||
-moz-transition: all 0.5s;
|
||||
-ms-transition: all 0.5s;
|
||||
-o-transition: all 0.5s;
|
||||
transition: all 0.5s;
|
||||
}
|
76
reader/img/app.svg
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg4096"
|
||||
viewBox="0 0 32 32"
|
||||
height="32"
|
||||
width="32"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="app.svg">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="798"
|
||||
inkscape:window-height="1186"
|
||||
id="namedview7"
|
||||
showgrid="false"
|
||||
inkscape:zoom="20.5625"
|
||||
inkscape:cx="16"
|
||||
inkscape:cy="16"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="12"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4096" />
|
||||
<defs
|
||||
id="defs4098" />
|
||||
<metadata
|
||||
id="metadata4101">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-1020.3622)"
|
||||
id="layer1"
|
||||
style="fill:#ffffff">
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
id="path2989"
|
||||
d="m 11.168042,1021.5246 c -2.2036689,-1.0138 -6.5467059,0.9451 -7.7942059,2.6697 -0.555819,0.7717 -0.516525,1.3278 -0.516525,1.6433 l 0,16.8796 16.2867569,8.8577 3.062736,-1.4617 0,-16.4387 -16.7222168,-8.3914 c 0.897356,-0.9871 2.9155749,-2.1908 4.4288007,-1.7074 l 14.8949581,6.9633 0,18.3129 3.070508,-1.4642 0,-18.3122 z" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="4.7659574"
|
||||
y="11.6231"
|
||||
id="text3335"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3337"
|
||||
x="4.7659574"
|
||||
y="11.6231"></tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 10.49012,22.464615 -3.7773658,-6.800426 4.5440898,-2.201163 1.259258,2.266597 -3.0296238,1.467379 1.2591488,2.266823 4.54409,-2.201162 -3.290553,-5.923647 C 11.730489,10.855032 11.250429,10.589741 10.926916,10.74647 l -6.4023569,3.101677 c -0.3232373,0.156596 -0.3674685,0.675885 -0.098794,1.159868 l 5.322202,9.580704 c 0.2689279,0.484123 0.7489899,0.749415 1.0722499,0.592546 l 6.402424,-3.10145 c 0.32326,-0.156869 0.367492,-0.676158 0.09879,-1.159868 l -0.772645,-1.390597 -6.05867,2.935265 z"
|
||||
id="path4015-6"
|
||||
style="fill:#000000" />
|
||||
</svg>
|
After Width: | Height: | Size: 3 KiB |
BIN
reader/img/book.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
reader/img/loading.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
197
reader/js/lib/Blob.js
Normal file
|
@ -0,0 +1,197 @@
|
|||
/* Blob.js
|
||||
* A Blob implementation.
|
||||
* 2014-07-24
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* By Devin Samarin, https://github.com/dsamarin
|
||||
* License: X11/MIT
|
||||
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/*global self, unescape */
|
||||
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
|
||||
plusplus: true */
|
||||
|
||||
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
||||
|
||||
(function (view) {
|
||||
"use strict";
|
||||
|
||||
view.URL = view.URL || view.webkitURL;
|
||||
|
||||
if (view.Blob && view.URL) {
|
||||
try {
|
||||
new Blob;
|
||||
return;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Internally we use a BlobBuilder implementation to base Blob off of
|
||||
// in order to support older browsers that only have BlobBuilder
|
||||
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
|
||||
var
|
||||
get_class = function(object) {
|
||||
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
|
||||
}
|
||||
, FakeBlobBuilder = function BlobBuilder() {
|
||||
this.data = [];
|
||||
}
|
||||
, FakeBlob = function Blob(data, type, encoding) {
|
||||
this.data = data;
|
||||
this.size = data.length;
|
||||
this.type = type;
|
||||
this.encoding = encoding;
|
||||
}
|
||||
, FBB_proto = FakeBlobBuilder.prototype
|
||||
, FB_proto = FakeBlob.prototype
|
||||
, FileReaderSync = view.FileReaderSync
|
||||
, FileException = function(type) {
|
||||
this.code = this[this.name = type];
|
||||
}
|
||||
, file_ex_codes = (
|
||||
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
|
||||
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
|
||||
).split(" ")
|
||||
, file_ex_code = file_ex_codes.length
|
||||
, real_URL = view.URL || view.webkitURL || view
|
||||
, real_create_object_URL = real_URL.createObjectURL
|
||||
, real_revoke_object_URL = real_URL.revokeObjectURL
|
||||
, URL = real_URL
|
||||
, btoa = view.btoa
|
||||
, atob = view.atob
|
||||
|
||||
, ArrayBuffer = view.ArrayBuffer
|
||||
, Uint8Array = view.Uint8Array
|
||||
|
||||
, origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/
|
||||
;
|
||||
FakeBlob.fake = FB_proto.fake = true;
|
||||
while (file_ex_code--) {
|
||||
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
|
||||
}
|
||||
// Polyfill URL
|
||||
if (!real_URL.createObjectURL) {
|
||||
URL = view.URL = function(uri) {
|
||||
var
|
||||
uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
|
||||
, uri_origin
|
||||
;
|
||||
uri_info.href = uri;
|
||||
if (!("origin" in uri_info)) {
|
||||
if (uri_info.protocol.toLowerCase() === "data:") {
|
||||
uri_info.origin = null;
|
||||
} else {
|
||||
uri_origin = uri.match(origin);
|
||||
uri_info.origin = uri_origin && uri_origin[1];
|
||||
}
|
||||
}
|
||||
return uri_info;
|
||||
};
|
||||
}
|
||||
URL.createObjectURL = function(blob) {
|
||||
var
|
||||
type = blob.type
|
||||
, data_URI_header
|
||||
;
|
||||
if (type === null) {
|
||||
type = "application/octet-stream";
|
||||
}
|
||||
if (blob instanceof FakeBlob) {
|
||||
data_URI_header = "data:" + type;
|
||||
if (blob.encoding === "base64") {
|
||||
return data_URI_header + ";base64," + blob.data;
|
||||
} else if (blob.encoding === "URI") {
|
||||
return data_URI_header + "," + decodeURIComponent(blob.data);
|
||||
} if (btoa) {
|
||||
return data_URI_header + ";base64," + btoa(blob.data);
|
||||
} else {
|
||||
return data_URI_header + "," + encodeURIComponent(blob.data);
|
||||
}
|
||||
} else if (real_create_object_URL) {
|
||||
return real_create_object_URL.call(real_URL, blob);
|
||||
}
|
||||
};
|
||||
URL.revokeObjectURL = function(object_URL) {
|
||||
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
|
||||
real_revoke_object_URL.call(real_URL, object_URL);
|
||||
}
|
||||
};
|
||||
FBB_proto.append = function(data/*, endings*/) {
|
||||
var bb = this.data;
|
||||
// decode data to a binary string
|
||||
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
|
||||
var
|
||||
str = ""
|
||||
, buf = new Uint8Array(data)
|
||||
, i = 0
|
||||
, buf_len = buf.length
|
||||
;
|
||||
for (; i < buf_len; i++) {
|
||||
str += String.fromCharCode(buf[i]);
|
||||
}
|
||||
bb.push(str);
|
||||
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
|
||||
if (FileReaderSync) {
|
||||
var fr = new FileReaderSync;
|
||||
bb.push(fr.readAsBinaryString(data));
|
||||
} else {
|
||||
// async FileReader won't work as BlobBuilder is sync
|
||||
throw new FileException("NOT_READABLE_ERR");
|
||||
}
|
||||
} else if (data instanceof FakeBlob) {
|
||||
if (data.encoding === "base64" && atob) {
|
||||
bb.push(atob(data.data));
|
||||
} else if (data.encoding === "URI") {
|
||||
bb.push(decodeURIComponent(data.data));
|
||||
} else if (data.encoding === "raw") {
|
||||
bb.push(data.data);
|
||||
}
|
||||
} else {
|
||||
if (typeof data !== "string") {
|
||||
data += ""; // convert unsupported types to strings
|
||||
}
|
||||
// decode UTF-16 to binary string
|
||||
bb.push(unescape(encodeURIComponent(data)));
|
||||
}
|
||||
};
|
||||
FBB_proto.getBlob = function(type) {
|
||||
if (!arguments.length) {
|
||||
type = null;
|
||||
}
|
||||
return new FakeBlob(this.data.join(""), type, "raw");
|
||||
};
|
||||
FBB_proto.toString = function() {
|
||||
return "[object BlobBuilder]";
|
||||
};
|
||||
FB_proto.slice = function(start, end, type) {
|
||||
var args = arguments.length;
|
||||
if (args < 3) {
|
||||
type = null;
|
||||
}
|
||||
return new FakeBlob(
|
||||
this.data.slice(start, args > 1 ? end : this.data.length)
|
||||
, type
|
||||
, this.encoding
|
||||
);
|
||||
};
|
||||
FB_proto.toString = function() {
|
||||
return "[object Blob]";
|
||||
};
|
||||
FB_proto.close = function() {
|
||||
this.size = 0;
|
||||
delete this.data;
|
||||
};
|
||||
return FakeBlobBuilder;
|
||||
}(view));
|
||||
|
||||
view.Blob = function(blobParts, options) {
|
||||
var type = options ? (options.type || "") : "";
|
||||
var builder = new BlobBuilder();
|
||||
if (blobParts) {
|
||||
for (var i = 0, len = blobParts.length; i < len; i++) {
|
||||
builder.append(blobParts[i]);
|
||||
}
|
||||
}
|
||||
return builder.getBlob(type);
|
||||
};
|
||||
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
|
31
reader/js/lib/blob.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
Blob = (function() {
|
||||
var nativeBlob = Blob;
|
||||
|
||||
// Add unprefixed slice() method.
|
||||
if (Blob.prototype.webkitSlice) {
|
||||
Blob.prototype.slice = Blob.prototype.webkitSlice;
|
||||
}
|
||||
else if (Blob.prototype.mozSlice) {
|
||||
Blob.prototype.slice = Blob.prototype.mozSlice;
|
||||
}
|
||||
|
||||
// Temporarily replace Blob() constructor with one that checks support.
|
||||
return function(parts, properties) {
|
||||
try {
|
||||
// Restore native Blob() constructor, so this check is only evaluated once.
|
||||
Blob = nativeBlob;
|
||||
return new Blob(parts || [], properties || {});
|
||||
}
|
||||
catch (e) {
|
||||
// If construction fails provide one that uses BlobBuilder.
|
||||
Blob = function (parts, properties) {
|
||||
var bb = new (WebKitBlobBuilder || MozBlobBuilder), i;
|
||||
for (i in parts) {
|
||||
bb.append(parts[i]);
|
||||
}
|
||||
|
||||
return bb.getBlob(properties && properties.type ? properties.type : undefined);
|
||||
};
|
||||
}
|
||||
};
|
||||
}());
|
629
reader/js/lib/typedarray.js
Normal file
|
@ -0,0 +1,629 @@
|
|||
/*
|
||||
$LicenseInfo:firstyear=2010&license=mit$
|
||||
|
||||
Copyright (c) 2010, Linden Research, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
$/LicenseInfo$
|
||||
*/
|
||||
/*global document*/
|
||||
|
||||
//
|
||||
// ES3/ES5 implementation of the Krhonos TypedArray Working Draft (work in progress):
|
||||
// Ref: https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/TypedArray-spec.html
|
||||
// Date: 2011-02-01
|
||||
//
|
||||
// Variations:
|
||||
// * Float/Double -> Float32/Float64, per WebGL-Public mailing list conversations (post 5/17)
|
||||
// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
|
||||
|
||||
var ArrayBuffer, ArrayBufferView,
|
||||
Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,
|
||||
DataView;
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
/*jslint bitwise: false, nomen: false */
|
||||
|
||||
// Approximations of internal ECMAScript conversion functions
|
||||
var ECMAScript = {
|
||||
ToInt32: function (v) { return v >> 0; },
|
||||
ToUint32: function (v) { return v >>> 0; }
|
||||
};
|
||||
|
||||
// Raise an INDEX_SIZE_ERR event - intentionally induces a DOM error
|
||||
function raise_INDEX_SIZE_ERR() {
|
||||
if (document) {
|
||||
// raises DOMException(INDEX_SIZE_ERR)
|
||||
document.createTextNode("").splitText(1);
|
||||
}
|
||||
throw new RangeError("INDEX_SIZE_ERR");
|
||||
}
|
||||
|
||||
// ES5: lock down object properties
|
||||
function configureProperties(obj) {
|
||||
if (Object.getOwnPropertyNames && Object.defineProperty) {
|
||||
var props = Object.getOwnPropertyNames(obj), i;
|
||||
for (i = 0; i < props.length; i += 1) {
|
||||
Object.defineProperty(obj, props[i], {
|
||||
value: obj[props[i]],
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// emulate ES5 getter/setter API using legacy APIs
|
||||
// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
|
||||
if (Object.prototype.__defineGetter__ && !Object.defineProperty) {
|
||||
Object.defineProperty = function (obj, prop, desc) {
|
||||
if (desc.hasOwnProperty('get')) { obj.__defineGetter__(prop, desc.get); }
|
||||
if (desc.hasOwnProperty('set')) { obj.__defineSetter__(prop, desc.set); }
|
||||
};
|
||||
}
|
||||
|
||||
// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
|
||||
// for index in 0 ... obj.length
|
||||
function makeArrayAccessors(obj) {
|
||||
if (!Object.defineProperty) { return; }
|
||||
|
||||
function makeArrayAccessor(index) {
|
||||
Object.defineProperty(obj, index, {
|
||||
'get': function () { return obj._getter(index); },
|
||||
'set': function (v) { obj._setter(index, v); },
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
});
|
||||
}
|
||||
|
||||
var i;
|
||||
for (i = 0; i < obj.length; i += 1) {
|
||||
makeArrayAccessor(i);
|
||||
}
|
||||
}
|
||||
|
||||
// Internal conversion functions:
|
||||
// pack<Type>() - take a number (interpreted as Type), output a byte array
|
||||
// unpack<Type>() - take a byte array, output a Type-like number
|
||||
|
||||
function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
|
||||
function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
|
||||
|
||||
function packInt8(n) { return [n & 0xff]; }
|
||||
function unpackInt8(bytes) { return as_signed(bytes[0], 8); }
|
||||
|
||||
function packUint8(n) { return [n & 0xff]; }
|
||||
function unpackUint8(bytes) { return as_unsigned(bytes[0], 8); }
|
||||
|
||||
function packInt16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
|
||||
function unpackInt16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
|
||||
|
||||
function packUint16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
|
||||
function unpackUint16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
|
||||
|
||||
function packInt32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
|
||||
function unpackInt32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
|
||||
|
||||
function packUint32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
|
||||
function unpackUint32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
|
||||
|
||||
function packIEEE754(v, ebits, fbits) {
|
||||
|
||||
var bias = (1 << (ebits - 1)) - 1,
|
||||
s, e, f, ln,
|
||||
i, bits, str, bytes;
|
||||
|
||||
// Compute sign, exponent, fraction
|
||||
if (isNaN(v)) {
|
||||
// http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
|
||||
e = (1 << bias) - 1; f = Math.pow(2, fbits - 1); s = 0;
|
||||
}
|
||||
else if (v === Infinity || v === -Infinity) {
|
||||
e = (1 << bias) - 1; f = 0; s = (v < 0) ? 1 : 0;
|
||||
}
|
||||
else if (v === 0) {
|
||||
e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
|
||||
}
|
||||
else {
|
||||
s = v < 0;
|
||||
v = Math.abs(v);
|
||||
|
||||
if (v >= Math.pow(2, 1 - bias)) {
|
||||
// Normalized
|
||||
ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);
|
||||
e = ln + bias;
|
||||
f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));
|
||||
}
|
||||
else {
|
||||
// Denormalized
|
||||
e = 0;
|
||||
f = Math.round(v / Math.pow(2, 1 - bias - fbits));
|
||||
}
|
||||
}
|
||||
|
||||
// Pack sign, exponent, fraction
|
||||
bits = [];
|
||||
for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = Math.floor(f / 2); }
|
||||
for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = Math.floor(e / 2); }
|
||||
bits.push(s ? 1 : 0);
|
||||
bits.reverse();
|
||||
str = bits.join('');
|
||||
|
||||
// Bits to bytes
|
||||
bytes = [];
|
||||
while (str.length) {
|
||||
bytes.push(parseInt(str.substring(0, 8), 2));
|
||||
str = str.substring(8);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function unpackIEEE754(bytes, ebits, fbits) {
|
||||
|
||||
// Bytes to bits
|
||||
var bits = [], i, j, b, str,
|
||||
bias, s, e, f;
|
||||
|
||||
for (i = bytes.length; i; i -= 1) {
|
||||
b = bytes[i - 1];
|
||||
for (j = 8; j; j -= 1) {
|
||||
bits.push(b % 2 ? 1 : 0); b = b >> 1;
|
||||
}
|
||||
}
|
||||
bits.reverse();
|
||||
str = bits.join('');
|
||||
|
||||
// Unpack sign, exponent, fraction
|
||||
bias = (1 << (ebits - 1)) - 1;
|
||||
s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
|
||||
e = parseInt(str.substring(1, 1 + ebits), 2);
|
||||
f = parseInt(str.substring(1 + ebits), 2);
|
||||
|
||||
// Produce number
|
||||
if (e === (1 << ebits) - 1) {
|
||||
return f !== 0 ? NaN : s * Infinity;
|
||||
}
|
||||
else if (e > 0) {
|
||||
// Normalized
|
||||
return s * Math.pow(2, e - bias) * (1 + f / Math.pow(2, fbits));
|
||||
}
|
||||
else if (f !== 0) {
|
||||
// Denormalized
|
||||
return s * Math.pow(2, -(bias - 1)) * (f / Math.pow(2, fbits));
|
||||
}
|
||||
else {
|
||||
return s < 0 ? -0 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
function unpackFloat64(b) { return unpackIEEE754(b, 11, 52); }
|
||||
function packFloat64(v) { return packIEEE754(v, 11, 52); }
|
||||
function unpackFloat32(b) { return unpackIEEE754(b, 8, 23); }
|
||||
function packFloat32(v) { return packIEEE754(v, 8, 23); }
|
||||
|
||||
|
||||
if (!ArrayBuffer) {
|
||||
(function () {
|
||||
|
||||
//
|
||||
// 3 The ArrayBuffer Type
|
||||
//
|
||||
|
||||
ArrayBuffer = function (length) {
|
||||
length = ECMAScript.ToInt32(length);
|
||||
if (length < 0) { throw new RangeError('ArrayBuffer size is not a small enough positive integer.'); }
|
||||
|
||||
this.byteLength = length;
|
||||
this._bytes = [];
|
||||
this._bytes.length = length;
|
||||
|
||||
var i;
|
||||
for (i = 0; i < this.byteLength; i += 1) {
|
||||
this._bytes[i] = 0;
|
||||
}
|
||||
|
||||
configureProperties(this);
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// 4 The ArrayBufferView Type
|
||||
//
|
||||
|
||||
// NOTE: this constructor is not exported
|
||||
ArrayBufferView = function () {
|
||||
//this.buffer = null;
|
||||
//this.byteOffset = 0;
|
||||
//this.byteLength = 0;
|
||||
};
|
||||
|
||||
//
|
||||
// 5 The Typed Array View Types
|
||||
//
|
||||
|
||||
function makeTypedArrayConstructor(bytesPerElement, pack, unpack) {
|
||||
// Each TypedArray type requires a distinct constructor instance with
|
||||
// identical logic, which this produces.
|
||||
|
||||
var ctor;
|
||||
ctor = function (buffer, byteOffset, length) {
|
||||
var array, sequence, i, s;
|
||||
|
||||
// Constructor(unsigned long length)
|
||||
if (!arguments.length || typeof arguments[0] === 'number') {
|
||||
this.length = ECMAScript.ToInt32(arguments[0]);
|
||||
if (length < 0) { throw new RangeError('ArrayBufferView size is not a small enough positive integer.'); }
|
||||
|
||||
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
|
||||
this.buffer = new ArrayBuffer(this.byteLength);
|
||||
this.byteOffset = 0;
|
||||
}
|
||||
|
||||
// Constructor(TypedArray array)
|
||||
else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
|
||||
array = arguments[0];
|
||||
|
||||
this.length = array.length;
|
||||
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
|
||||
this.buffer = new ArrayBuffer(this.byteLength);
|
||||
this.byteOffset = 0;
|
||||
|
||||
for (i = 0; i < this.length; i += 1) {
|
||||
this._setter(i, array._getter(i));
|
||||
}
|
||||
}
|
||||
|
||||
// Constructor(sequence<type> array)
|
||||
else if (typeof arguments[0] === 'object' && !(arguments[0] instanceof ArrayBuffer)) {
|
||||
sequence = arguments[0];
|
||||
|
||||
this.length = ECMAScript.ToUint32(sequence.length);
|
||||
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
|
||||
this.buffer = new ArrayBuffer(this.byteLength);
|
||||
this.byteOffset = 0;
|
||||
|
||||
for (i = 0; i < this.length; i += 1) {
|
||||
s = sequence[i];
|
||||
this._setter(i, Number(s));
|
||||
}
|
||||
}
|
||||
|
||||
// Constructor(ArrayBuffer buffer,
|
||||
// optional unsigned long byteOffset, optional unsigned long length)
|
||||
else if (typeof arguments[0] === 'object' && arguments[0] instanceof ArrayBuffer) {
|
||||
this.buffer = buffer;
|
||||
|
||||
this.byteOffset = ECMAScript.ToUint32(byteOffset);
|
||||
if (this.byteOffset > this.buffer.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // byteOffset out of range
|
||||
}
|
||||
|
||||
if (this.byteOffset % this.BYTES_PER_ELEMENT) {
|
||||
// The given byteOffset must be a multiple of the element
|
||||
// size of the specific type, otherwise an exception is raised.
|
||||
//raise_INDEX_SIZE_ERR();
|
||||
throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
|
||||
}
|
||||
|
||||
if (arguments.length < 3) {
|
||||
this.byteLength = this.buffer.byteLength - this.byteOffset;
|
||||
|
||||
if (this.byteLength % this.BYTES_PER_ELEMENT) {
|
||||
raise_INDEX_SIZE_ERR(); // length of buffer minus byteOffset not a multiple of the element size
|
||||
}
|
||||
this.length = this.byteLength / this.BYTES_PER_ELEMENT;
|
||||
}
|
||||
else {
|
||||
this.length = ECMAScript.ToUint32(length);
|
||||
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
|
||||
}
|
||||
|
||||
if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // byteOffset and length reference an area beyond the end of the buffer
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new TypeError("Unexpected argument type(s)");
|
||||
}
|
||||
|
||||
this.constructor = ctor;
|
||||
|
||||
// ES5-only magic
|
||||
configureProperties(this);
|
||||
makeArrayAccessors(this);
|
||||
};
|
||||
|
||||
ctor.prototype = new ArrayBufferView();
|
||||
ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
|
||||
ctor.prototype._pack = pack;
|
||||
ctor.prototype._unpack = unpack;
|
||||
ctor.BYTES_PER_ELEMENT = bytesPerElement;
|
||||
|
||||
// getter type (unsigned long index);
|
||||
ctor.prototype._getter = function (index) {
|
||||
if (arguments.length < 1) { throw new SyntaxError("Not enough arguments"); }
|
||||
|
||||
index = ECMAScript.ToUint32(index);
|
||||
if (index >= this.length) {
|
||||
//raise_INDEX_SIZE_ERR(); // Array index out of range
|
||||
return; // undefined
|
||||
}
|
||||
|
||||
var bytes = [], i, o;
|
||||
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
|
||||
i < this.BYTES_PER_ELEMENT;
|
||||
i += 1, o += 1) {
|
||||
bytes.push(this.buffer._bytes[o]);
|
||||
}
|
||||
return this._unpack(bytes);
|
||||
};
|
||||
|
||||
// NONSTANDARD: convenience alias for getter: type get(unsigned long index);
|
||||
ctor.prototype.get = ctor.prototype._getter;
|
||||
|
||||
// setter void (unsigned long index, type value);
|
||||
ctor.prototype._setter = function (index, value) {
|
||||
if (arguments.length < 2) { throw new SyntaxError("Not enough arguments"); }
|
||||
|
||||
index = ECMAScript.ToUint32(index);
|
||||
if (index >= this.length) {
|
||||
//raise_INDEX_SIZE_ERR(); // Array index out of range
|
||||
return;
|
||||
}
|
||||
|
||||
var bytes = this._pack(value), i, o;
|
||||
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
|
||||
i < this.BYTES_PER_ELEMENT;
|
||||
i += 1, o += 1) {
|
||||
this.buffer._bytes[o] = bytes[i];
|
||||
}
|
||||
};
|
||||
|
||||
// void set(TypedArray array, optional unsigned long offset);
|
||||
// void set(sequence<type> array, optional unsigned long offset);
|
||||
ctor.prototype.set = function (index, value) {
|
||||
if (arguments.length < 1) { throw new SyntaxError("Not enough arguments"); }
|
||||
var array, sequence, offset, len,
|
||||
i, s, d,
|
||||
byteOffset, byteLength, tmp;
|
||||
|
||||
// void set(TypedArray array, optional unsigned long offset);
|
||||
if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
|
||||
array = arguments[0];
|
||||
offset = ECMAScript.ToUint32(arguments[1]);
|
||||
|
||||
if (offset + array.length > this.length) {
|
||||
raise_INDEX_SIZE_ERR(); // Offset plus length of array is out of range
|
||||
}
|
||||
|
||||
byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
|
||||
byteLength = array.length * this.BYTES_PER_ELEMENT;
|
||||
|
||||
if (array.buffer === this.buffer) {
|
||||
tmp = [];
|
||||
for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
|
||||
tmp[i] = array.buffer._bytes[s];
|
||||
}
|
||||
for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
|
||||
this.buffer._bytes[d] = tmp[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i = 0, s = array.byteOffset, d = byteOffset;
|
||||
i < byteLength; i += 1, s += 1, d += 1) {
|
||||
this.buffer._bytes[d] = array.buffer._bytes[s];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// void set(sequence<type> array, optional unsigned long offset);
|
||||
else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
|
||||
sequence = arguments[0];
|
||||
len = ECMAScript.ToUint32(sequence.length);
|
||||
offset = ECMAScript.ToUint32(arguments[1]);
|
||||
|
||||
if (offset + len > this.length) {
|
||||
raise_INDEX_SIZE_ERR(); // Offset plus length of array is out of range
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i += 1) {
|
||||
s = sequence[i];
|
||||
this._setter(offset + i, Number(s));
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
throw new TypeError("Unexpected argument type(s)");
|
||||
}
|
||||
};
|
||||
|
||||
// TypedArray subarray(long begin, optional long end);
|
||||
ctor.prototype.subarray = function (start, end) {
|
||||
function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
|
||||
|
||||
start = ECMAScript.ToInt32(start);
|
||||
end = ECMAScript.ToInt32(end);
|
||||
|
||||
if (arguments.length < 1) { start = 0; }
|
||||
if (arguments.length < 2) { end = this.length; }
|
||||
|
||||
if (start < 0) { start = this.length + start; }
|
||||
if (end < 0) { end = this.length + end; }
|
||||
|
||||
start = clamp(start, 0, this.length);
|
||||
end = clamp(end, 0, this.length);
|
||||
|
||||
var len = end - start;
|
||||
if (len < 0) {
|
||||
len = 0;
|
||||
}
|
||||
|
||||
return new this.constructor(this.buffer, start * this.BYTES_PER_ELEMENT, len);
|
||||
};
|
||||
|
||||
return ctor;
|
||||
}
|
||||
|
||||
Int8Array = Int8Array || makeTypedArrayConstructor(1, packInt8, unpackInt8);
|
||||
Uint8Array = Uint8Array || makeTypedArrayConstructor(1, packUint8, unpackUint8);
|
||||
Int16Array = Int16Array || makeTypedArrayConstructor(2, packInt16, unpackInt16);
|
||||
Uint16Array = Uint16Array || makeTypedArrayConstructor(2, packUint16, unpackUint16);
|
||||
Int32Array = Int32Array || makeTypedArrayConstructor(4, packInt32, unpackInt32);
|
||||
Uint32Array = Uint32Array || makeTypedArrayConstructor(4, packUint32, unpackUint32);
|
||||
Float32Array = Float32Array || makeTypedArrayConstructor(4, packFloat32, unpackFloat32);
|
||||
Float64Array = Float64Array || makeTypedArrayConstructor(8, packFloat64, unpackFloat64);
|
||||
|
||||
} ());
|
||||
}
|
||||
|
||||
|
||||
if (!DataView) {
|
||||
(function () {
|
||||
|
||||
//
|
||||
// 6 The DataView View Type
|
||||
//
|
||||
|
||||
function r(array, index) {
|
||||
if (typeof array.get === 'function') {
|
||||
return array.get(index);
|
||||
}
|
||||
else {
|
||||
return array[index];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var IS_BIG_ENDIAN = (function () {
|
||||
var u16array = new Uint16Array([0x1234]),
|
||||
u8array = new Uint8Array(u16array.buffer);
|
||||
return r(u8array, 0) === 0x12;
|
||||
} ());
|
||||
|
||||
// Constructor(ArrayBuffer buffer,
|
||||
// optional unsigned long byteOffset,
|
||||
// optional unsigned long byteLength)
|
||||
DataView = function (buffer, byteOffset, byteLength) {
|
||||
if (!(typeof buffer === 'object' && buffer instanceof ArrayBuffer)) {
|
||||
throw new TypeError("TypeError");
|
||||
}
|
||||
|
||||
this.buffer = buffer;
|
||||
|
||||
this.byteOffset = ECMAScript.ToUint32(byteOffset);
|
||||
if (this.byteOffset > this.buffer.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // byteOffset out of range
|
||||
}
|
||||
|
||||
if (arguments.length < 3) {
|
||||
this.byteLength = this.buffer.byteLength - this.byteOffset;
|
||||
}
|
||||
else {
|
||||
this.byteLength = ECMAScript.ToUint32(byteLength);
|
||||
}
|
||||
|
||||
if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // byteOffset and length reference an area beyond the end of the buffer
|
||||
}
|
||||
|
||||
// ES5-only magic
|
||||
configureProperties(this);
|
||||
};
|
||||
|
||||
if (ArrayBufferView) {
|
||||
DataView.prototype = new ArrayBufferView();
|
||||
}
|
||||
|
||||
function makeDataView_getter(arrayType) {
|
||||
return function (byteOffset, littleEndian) {
|
||||
/*jslint newcap: false*/
|
||||
byteOffset = ECMAScript.ToUint32(byteOffset);
|
||||
|
||||
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // Array index out of range
|
||||
}
|
||||
byteOffset += this.byteOffset;
|
||||
|
||||
var uint8Array = new Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
|
||||
bytes = [], i;
|
||||
for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
|
||||
bytes.push(r(uint8Array, i));
|
||||
}
|
||||
|
||||
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
|
||||
bytes.reverse();
|
||||
}
|
||||
|
||||
return r(new arrayType(new Uint8Array(bytes).buffer), 0);
|
||||
};
|
||||
}
|
||||
|
||||
DataView.prototype.getUint8 = makeDataView_getter(Uint8Array);
|
||||
DataView.prototype.getInt8 = makeDataView_getter(Int8Array);
|
||||
DataView.prototype.getUint16 = makeDataView_getter(Uint16Array);
|
||||
DataView.prototype.getInt16 = makeDataView_getter(Int16Array);
|
||||
DataView.prototype.getUint32 = makeDataView_getter(Uint32Array);
|
||||
DataView.prototype.getInt32 = makeDataView_getter(Int32Array);
|
||||
DataView.prototype.getFloat32 = makeDataView_getter(Float32Array);
|
||||
DataView.prototype.getFloat64 = makeDataView_getter(Float64Array);
|
||||
|
||||
function makeDataView_setter(arrayType) {
|
||||
return function (byteOffset, value, littleEndian) {
|
||||
/*jslint newcap: false*/
|
||||
byteOffset = ECMAScript.ToUint32(byteOffset);
|
||||
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
|
||||
raise_INDEX_SIZE_ERR(); // Array index out of range
|
||||
}
|
||||
|
||||
// Get bytes
|
||||
var typeArray = new arrayType([value]),
|
||||
byteArray = new Uint8Array(typeArray.buffer),
|
||||
bytes = [], i, byteView;
|
||||
|
||||
for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
|
||||
bytes.push(r(byteArray, i));
|
||||
}
|
||||
|
||||
// Flip if necessary
|
||||
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
|
||||
bytes.reverse();
|
||||
}
|
||||
|
||||
// Write them
|
||||
byteView = new Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
|
||||
byteView.set(bytes);
|
||||
};
|
||||
}
|
||||
|
||||
DataView.prototype.setUint8 = makeDataView_setter(Uint8Array);
|
||||
DataView.prototype.setInt8 = makeDataView_setter(Int8Array);
|
||||
DataView.prototype.setUint16 = makeDataView_setter(Uint16Array);
|
||||
DataView.prototype.setInt16 = makeDataView_setter(Int16Array);
|
||||
DataView.prototype.setUint32 = makeDataView_setter(Uint32Array);
|
||||
DataView.prototype.setInt32 = makeDataView_setter(Int32Array);
|
||||
DataView.prototype.setFloat32 = makeDataView_setter(Float32Array);
|
||||
DataView.prototype.setFloat64 = makeDataView_setter(Float64Array);
|
||||
|
||||
} ());
|
||||
}
|
||||
|
||||
} ());
|
||||
|
1
reader/js/lib/typedarray.min.js
vendored
Normal file
75
reader/js/lib/wgxpath.install.js
Normal file
|
@ -0,0 +1,75 @@
|
|||
(function(){function h(a){return function(){return this[a]}}function l(a){return function(){return a}}var m=this;
|
||||
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
||||
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return"string"==typeof a}function ca(a,b,c){return a.call.apply(a.bind,arguments)}function da(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
|
||||
function ea(a,b,c){ea=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ca:da;return ea.apply(null,arguments)}function fa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}
|
||||
function q(a){var b=r;function c(){}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new c;a.F=function(a,c,f){for(var g=Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};/*
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2007 Cybozu Labs, Inc.
|
||||
Copyright (c) 2012 Google Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
function t(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var ga=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function u(a,b){return-1!=a.indexOf(b)}function ha(a,b){return a<b?-1:a>b?1:0};var v=Array.prototype,ia=v.indexOf?function(a,b,c){return v.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},w=v.forEach?function(a,b,c){v.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},ja=v.filter?function(a,b,c){return v.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=n(a)?
|
||||
a.split(""):a,k=0;k<d;k++)if(k in g){var p=g[k];b.call(c,p,k,a)&&(e[f++]=p)}return e},x=v.reduce?function(a,b,c,d){d&&(b=ea(b,d));return v.reduce.call(a,b,c)}:function(a,b,c,d){var e=c;w(a,function(c,g){e=b.call(d,e,c,g,a)});return e},ka=v.some?function(a,b,c){return v.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1};
|
||||
function la(a,b){var c;a:{c=a.length;for(var d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:n(a)?a.charAt(c):a[c]}function ma(a){return v.concat.apply(v,arguments)}function na(a,b,c){return 2>=arguments.length?v.slice.call(a,b):v.slice.call(a,b,c)};var y;a:{var oa=m.navigator;if(oa){var pa=oa.userAgent;if(pa){y=pa;break a}}y=""};var qa=u(y,"Opera")||u(y,"OPR"),A=u(y,"Trident")||u(y,"MSIE"),ra=u(y,"Edge"),sa=u(y,"Gecko")&&!(u(y.toLowerCase(),"webkit")&&!u(y,"Edge"))&&!(u(y,"Trident")||u(y,"MSIE"))&&!u(y,"Edge"),ta=u(y.toLowerCase(),"webkit")&&!u(y,"Edge");function ua(){var a=y;if(sa)return/rv\:([^\);]+)(\)|;)/.exec(a);if(ra)return/Edge\/([\d\.]+)/.exec(a);if(A)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(ta)return/WebKit\/(\S+)/.exec(a)}function va(){var a=m.document;return a?a.documentMode:void 0}
|
||||
var wa=function(){if(qa&&m.opera){var a=m.opera.version;return"function"==ba(a)?a():a}var a="",b=ua();b&&(a=b?b[1]:"");return A&&(b=va(),b>parseFloat(a))?String(b):a}(),xa={};
|
||||
function ya(a){if(!xa[a]){for(var b=0,c=ga(String(wa)).split("."),d=ga(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"",p=RegExp("(\\d*)(\\D*)","g"),z=RegExp("(\\d*)(\\D*)","g");do{var E=p.exec(g)||["","",""],aa=z.exec(k)||["","",""];if(0==E[0].length&&0==aa[0].length)break;b=ha(0==E[1].length?0:parseInt(E[1],10),0==aa[1].length?0:parseInt(aa[1],10))||ha(0==E[2].length,0==aa[2].length)||ha(E[2],aa[2])}while(0==b)}xa[a]=0<=b}}
|
||||
var za=m.document,Aa=za&&A?va()||("CSS1Compat"==za.compatMode?parseInt(wa,10):5):void 0;var B=A&&!(9<=Aa),Ba=A&&!(8<=Aa);function C(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function Ca(a,b){var c=Ba&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new C(b,a,b.nodeName,c)};function Da(a){this.b=a;this.a=0}function Ea(a){a=a.match(Fa);for(var b=0;b<a.length;b++)Ga.test(a[b])&&a.splice(b,1);return new Da(a)}var Fa=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Ga=/^\s/;function D(a,b){return a.b[a.a+(b||0)]}function F(a){return a.b[a.a++]}function Ha(a){return a.b.length<=a.a};!sa&&!A||A&&9<=Aa||sa&&ya("1.9.1");A&&ya("9");function Ia(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
|
||||
function Ja(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!(9<=Aa)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?Ka(a,b):!c&&Ia(e,b)?-1*La(a,b):!d&&Ia(f,a)?La(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument||
|
||||
a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function La(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ka(d,a)}function Ka(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};function G(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(B&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),B&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}
|
||||
function H(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Ba&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ma(a,b,c,d,e){return(B?Na:Oa).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new I)}
|
||||
function Na(a,b,c,d,e){if(a instanceof J||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;a=Pa(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)H(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||K(e,b);return e}Qa(a,b,c,d,e);return e}
|
||||
function Oa(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.a(b)&&K(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.a(b)&&K(e,b)})):a instanceof L?Qa(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),w(b,function(a){H(a,c,d)&&K(e,a)}));return e}
|
||||
function Ra(a,b,c,d,e){var f;if((a instanceof J||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=Pa(a);if("*"!=g&&(f=ja(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ja(f,function(a){return H(a,c,d)}));w(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||K(e,a)});return e}return Sa(a,b,c,d,e)}function Sa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&K(e,b);return e}
|
||||
function Qa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&K(e,b),Qa(a,b,c,d,e)}function Pa(a){if(a instanceof L){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function I(){this.b=this.a=null;this.l=0}function Ta(a){this.node=a;this.a=this.b=null}function Ua(a,b){if(!a.a)return b;if(!b.a)return a;for(var c=a.a,d=b.a,e=null,f=null,g=0;c&&d;){var f=c.node,k=d.node;f==k||f instanceof C&&k instanceof C&&f.a==k.a?(f=c,c=c.a,d=d.a):0<Ja(c.node,d.node)?(f=d,d=d.a):(f=c,c=c.a);(f.b=e)?e.a=f:a.a=f;e=f;g++}for(f=c||d;f;)f.b=e,e=e.a=f,g++,f=f.a;a.b=e;a.l=g;return a}function Va(a,b){var c=new Ta(b);c.a=a.a;a.b?a.a.b=c:a.a=a.b=c;a.a=c;a.l++}
|
||||
function K(a,b){var c=new Ta(b);c.b=a.b;a.a?a.b.a=c:a.a=a.b=c;a.b=c;a.l++}function Wa(a){return(a=a.a)?a.node:null}function Xa(a){return(a=Wa(a))?G(a):""}function M(a,b){return new Ya(a,!!b)}function Ya(a,b){this.f=a;this.b=(this.c=b)?a.b:a.a;this.a=null}function N(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.c?b.b:b.a;return c.node};function Za(a){switch(a.nodeType){case 1:return fa($a,a);case 9:return Za(a.documentElement);case 11:case 10:case 6:case 12:return ab;default:return a.parentNode?Za(a.parentNode):ab}}function ab(){return null}function $a(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?$a(a.parentNode,b):null};function r(a){this.i=a;this.b=this.g=!1;this.f=null}function O(a){return"\n "+a.toString().split("\n").join("\n ")}function bb(a,b){a.g=b}function cb(a,b){a.b=b}function P(a,b){var c=a.a(b);return c instanceof I?+Xa(c):+c}function Q(a,b){var c=a.a(b);return c instanceof I?Xa(c):""+c}function R(a,b){var c=a.a(b);return c instanceof I?!!c.l:!!c};function db(a,b,c){r.call(this,a.i);this.c=a;this.h=b;this.o=c;this.g=b.g||c.g;this.b=b.b||c.b;this.c==eb&&(c.b||c.g||4==c.i||0==c.i||!b.f?b.b||b.g||4==b.i||0==b.i||!c.f||(this.f={name:c.f.name,s:b}):this.f={name:b.f.name,s:c})}q(db);
|
||||
function S(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof I&&c instanceof I){e=M(b);for(d=N(e);d;d=N(e))for(b=M(c),f=N(b);f;f=N(b))if(a(G(d),G(f)))return!0;return!1}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=M(e);b=typeof c;for(d=N(e);d;d=N(e)){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e?"boolean"==typeof b||"boolean"==typeof c?
|
||||
a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}db.prototype.a=function(a){return this.c.m(this.h,this.o,a)};db.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+O(this.h);return a+=O(this.o)};function fb(a,b,c,d){this.a=a;this.w=b;this.i=c;this.m=d}fb.prototype.toString=h("a");var gb={};function T(a,b,c,d){if(gb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new fb(a,b,c,d);return gb[a.toString()]=a}
|
||||
T("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});T("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});T("*",6,1,function(a,b,c){return P(a,c)*P(b,c)});T("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});T("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});T("<",4,2,function(a,b,c){return S(function(a,b){return a<b},a,b,c)});T(">",4,2,function(a,b,c){return S(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return S(function(a,b){return a<=b},a,b,c)});
|
||||
T(">=",4,2,function(a,b,c){return S(function(a,b){return a>=b},a,b,c)});var eb=T("=",3,2,function(a,b,c){return S(function(a,b){return a==b},a,b,c,!0)});T("!=",3,2,function(a,b,c){return S(function(a,b){return a!=b},a,b,c,!0)});T("and",2,2,function(a,b,c){return R(a,c)&&R(b,c)});T("or",1,2,function(a,b,c){return R(a,c)||R(b,c)});function hb(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");r.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}q(hb);hb.prototype.a=function(a){a=this.c.a(a);return ib(this.h,a)};hb.prototype.toString=function(){var a;a="Filter:"+O(this.c);return a+=O(this.h)};function jb(a,b){if(b.length<a.A)throw Error("Function "+a.j+" expects at least"+a.A+" arguments, "+b.length+" given");if(null!==a.v&&b.length>a.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&w(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});r.call(this,a.i);this.h=a;this.c=b;bb(this,a.g||ka(b,function(a){return a.g}));cb(this,a.D&&!b.length||a.C&&!!b.length||ka(b,function(a){return a.b}))}q(jb);
|
||||
jb.prototype.a=function(a){return this.h.m.apply(null,ma(a,this.c))};jb.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=x(this.c,function(a,b){return a+O(b)},"Arguments:"),a=a+O(b);return a};function kb(a,b,c,d,e,f,g,k,p){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==k?k:g;this.B=!!p}kb.prototype.toString=h("j");var lb={};
|
||||
function U(a,b,c,d,e,f,g,k){if(lb.hasOwnProperty(a))throw Error("Function already created: "+a+".");lb[a]=new kb(a,b,c,d,!1,e,f,g,k)}U("boolean",2,!1,!1,function(a,b){return R(b,a)},1);U("ceiling",1,!1,!1,function(a,b){return Math.ceil(P(b,a))},1);U("concat",3,!1,!1,function(a,b){var c=na(arguments,1);return x(c,function(b,c){return b+Q(c,a)},"")},2,null);U("contains",2,!1,!1,function(a,b,c){return u(Q(b,a),Q(c,a))},2);U("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0);
|
||||
U("false",2,!1,!1,l(!1),0);U("floor",1,!1,!1,function(a,b){return Math.floor(P(b,a))},1);U("id",4,!1,!1,function(a,b){function c(a){if(B){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return la(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];w(d,function(a){a=c(a);!a||0<=ia(f,a)||f.push(a)});f.sort(Ja);var g=new I;w(f,function(a){K(g,a)});return g},1);U("lang",2,!1,!1,l(!1),1);
|
||||
U("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);U("local-name",3,!1,!0,function(a,b){var c=b?Wa(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);U("name",3,!1,!0,function(a,b){var c=b?Wa(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);U("namespace-uri",3,!0,!1,l(""),0,1,!0);U("normalize-space",3,!1,!0,function(a,b){return(b?Q(b,a):G(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
|
||||
U("not",2,!1,!1,function(a,b){return!R(b,a)},1);U("number",1,!1,!0,function(a,b){return b?P(b,a):+G(a.a)},0,1);U("position",1,!0,!1,function(a){return a.b},0);U("round",1,!1,!1,function(a,b){return Math.round(P(b,a))},1);U("starts-with",2,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,!1,!0,function(a,b){return b?Q(b,a):G(a.a)},0,1);U("string-length",1,!1,!0,function(a,b){return(b?Q(b,a):G(a.a)).length},0,1);
|
||||
U("substring",3,!1,!1,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);U("substring-after",3,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
|
||||
U("substring-before",3,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,!1,!1,function(a,b){for(var c=M(b.a(a)),d=0,e=N(c);e;e=N(c))d+=+G(e);return d},1,1,!0);U("translate",3,!1,!1,function(a,b,c,d){b=Q(b,a);c=Q(c,a);var e=Q(d,a);a=[];for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);U("true",2,!1,!1,l(!0),0);function L(a,b){this.h=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function mb(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}L.prototype.a=function(a){return null===this.b||this.b==a.nodeType};L.prototype.f=h("h");L.prototype.toString=function(){var a="Kind Test: "+this.h;null===this.c||(a+=O(this.c));return a};function nb(a){r.call(this,3);this.c=a.substring(1,a.length-1)}q(nb);nb.prototype.a=h("c");nb.prototype.toString=function(){return"Literal: "+this.c};function J(a,b){this.j=a.toLowerCase();this.c=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}J.prototype.a=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.j&&this.j!=a.nodeName.toLowerCase()?!1:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};J.prototype.f=h("j");J.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function ob(a){r.call(this,1);this.c=a}q(ob);ob.prototype.a=h("c");ob.prototype.toString=function(){return"Number: "+this.c};function pb(a,b){r.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=qb||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}q(pb);function rb(){r.call(this,4)}q(rb);rb.prototype.a=function(a){var b=new I;a=a.a;9==a.nodeType?K(b,a):K(b,a.ownerDocument);return b};rb.prototype.toString=l("Root Helper Expression");function sb(){r.call(this,4)}q(sb);sb.prototype.a=function(a){var b=new I;K(b,a.a);return b};sb.prototype.toString=l("Context Helper Expression");
|
||||
function tb(a){return"/"==a||"//"==a}pb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof I))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.l;c++){var e=a[c],f=M(b,e.c.a),g;if(e.g||e.c!=ub)if(e.g||e.c!=vb)for(g=N(f),b=e.a(new t(g));null!=(g=N(f));)g=e.a(new t(g)),b=Ua(b,g);else g=N(f),b=e.a(new t(g));else{for(g=N(f);(b=N(f))&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new t(g))}}return b};
|
||||
pb.prototype.toString=function(){var a;a="Path Expression:"+O(this.h);if(this.c.length){var b=x(this.c,function(a,b){return a+O(b)},"Steps:");a+=O(b)}return a};function wb(a,b){this.a=a;this.b=!!b}
|
||||
function ib(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=M(b),f=b.l,g,k=0;g=N(e);k++){var p=a.b?f-k:k+1;g=d.a(new t(g,p,f));if("number"==typeof g)p=p==g;else if("string"==typeof g||"boolean"==typeof g)p=!!g;else if(g instanceof I)p=0<g.l;else throw Error("Predicate.evaluate returned an unexpected type.");if(!p){p=e;g=p.f;var z=p.a;if(!z)throw Error("Next must be called at least once before remove.");var E=z.b,z=z.a;E?E.a=z:g.a=z;z?z.b=E:g.b=E;g.l--;p.a=null}}return b}
|
||||
wb.prototype.toString=function(){return x(this.a,function(a,b){return a+O(b)},"Predicates:")};function V(a,b,c,d){r.call(this,4);this.c=a;this.o=b;this.h=c||new wb([]);this.u=!!d;b=this.h;b=0<b.a.length?b.a[0].f:null;a.b&&b&&(a=b.name,a=B?a.toLowerCase():a,this.f={name:a,s:b.s});a:{a=this.h;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.g||1==c.i||0==c.i){a=!0;break a}a=!1}this.g=a}q(V);
|
||||
V.prototype.a=function(a){var b=a.a,c=null,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.s?Q(c.s,a):null,f=1);if(this.u)if(this.g||this.c!=xb)if(a=M((new V(yb,new L("node"))).a(a)),b=N(a))for(c=this.m(b,d,e,f);null!=(b=N(a));)c=Ua(c,this.m(b,d,e,f));else c=new I;else c=Ma(this.o,b,d,e),c=ib(this.h,c,f);else c=this.m(a.a,d,e,f);return c};V.prototype.m=function(a,b,c,d){a=this.c.f(this.o,a,b,c);return a=ib(this.h,a,d)};
|
||||
V.prototype.toString=function(){var a;a="Step:"+O("Operator: "+(this.u?"//":"/"));this.c.j&&(a+=O("Axis: "+this.c));a+=O(this.o);if(this.h.a.length){var b=x(this.h.a,function(a,b){return a+O(b)},"Predicates:");a+=O(b)}return a};function zb(a,b,c,d){this.j=a;this.f=b;this.a=c;this.b=d}zb.prototype.toString=h("j");var Ab={};function W(a,b,c,d){if(Ab.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new zb(a,b,c,!!d);return Ab[a]=b}
|
||||
W("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.a(d)&&Va(c,d);return c},!0);W("ancestor-or-self",function(a,b){var c=new I,d=b;do a.a(d)&&Va(c,d);while(d=d.parentNode);return c},!0);
|
||||
var qb=W("attribute",function(a,b){var c=new I,d=a.f();if("style"==d&&b.style&&B)return K(c,new C(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof L&&null===a.b||"*"==d)for(var d=0,f;f=e[d];d++)B?f.nodeValue&&K(c,Ca(b,f)):K(c,f);else(f=e.getNamedItem(d))&&(B?f.nodeValue&&K(c,Ca(b,f)):K(c,f));return c},!1),xb=W("child",function(a,b,c,d,e){return(B?Ra:Sa).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new I)},!1,!0);W("descendant",Ma,!1,!0);
|
||||
var yb=W("descendant-or-self",function(a,b,c,d){var e=new I;H(b,c,d)&&a.a(b)&&K(e,b);return Ma(a,b,c,d,e)},!1,!0),ub=W("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)H(f,c,d)&&a.a(f)&&K(e,f),e=Ma(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);W("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.a(d)&&K(c,d);return c},!1);W("namespace",function(){return new I},!1);
|
||||
var Bb=W("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return K(c,b.ownerElement),c;var d=b.parentNode;a.a(d)&&K(c,d);return c},!1),vb=W("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var p=[];for(b=f[g];b=b.previousSibling;)p.unshift(b);for(var z=0,E=p.length;z<E;z++)b=p[z],H(b,c,d)&&a.a(b)&&K(e,b),e=Ma(a,b,c,d,e)}return e},!0,!0);
|
||||
W("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.a(d)&&Va(c,d);return c},!0);var Cb=W("self",function(a,b){var c=new I;a.a(b)&&K(c,b);return c},!1);function Db(a){r.call(this,1);this.c=a;this.g=a.g;this.b=a.b}q(Db);Db.prototype.a=function(a){return-P(this.c,a)};Db.prototype.toString=function(){return"Unary Expression: -"+O(this.c)};function Eb(a){r.call(this,4);this.c=a;bb(this,ka(this.c,function(a){return a.g}));cb(this,ka(this.c,function(a){return a.b}))}q(Eb);Eb.prototype.a=function(a){var b=new I;w(this.c,function(c){c=c.a(a);if(!(c instanceof I))throw Error("Path expression must evaluate to NodeSet.");b=Ua(b,c)});return b};Eb.prototype.toString=function(){return x(this.c,function(a,b){return a+O(b)},"Union Expression:")};function Fb(a,b){this.a=a;this.b=b}function Gb(a){for(var b,c=[];;){X(a,"Missing right hand side of binary expression.");b=Hb(a);var d=F(a.a);if(!d)break;var e=(d=gb[d]||null)&&d.w;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].w;)b=new db(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new db(c.pop(),c.pop(),b);return b}function X(a,b){if(Ha(a.a))throw Error(b);}function Ib(a,b){var c=F(a.a);if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);}
|
||||
function Jb(a){a=F(a.a);if(")"!=a)throw Error("Bad token: "+a);}function Kb(a){a=F(a.a);if(2>a.length)throw Error("Unclosed literal string");return new nb(a)}function Lb(a){var b=F(a.a),c=b.indexOf(":");if(-1==c)return new J(b);var d=b.substring(0,c);a=a.b(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new J(b,a)}
|
||||
function Mb(a){var b,c=[],d;if(tb(D(a.a))){b=F(a.a);d=D(a.a);if("/"==b&&(Ha(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new rb;d=new rb;X(a,"Missing next location step.");b=Nb(a,b);c.push(b)}else{a:{b=D(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":F(a.a);b=Gb(a);X(a,'unclosed "("');Ib(a,")");break;case '"':case "'":b=Kb(a);break;default:if(isNaN(+b))if(!mb(b)&&/(?![0-9])[\w]/.test(d)&&"("==D(a.a,1)){b=F(a.a);
|
||||
b=lb[b]||null;F(a.a);for(d=[];")"!=D(a.a);){X(a,"Missing function argument list.");d.push(Gb(a));if(","!=D(a.a))break;F(a.a)}X(a,"Unclosed function argument list.");Jb(a);b=new jb(b,d)}else{b=null;break a}else b=new ob(+F(a.a))}"["==D(a.a)&&(d=new wb(Ob(a)),b=new hb(b,d))}if(b)if(tb(D(a.a)))d=b;else return b;else b=Nb(a,"/"),d=new sb,c.push(b)}for(;tb(D(a.a));)b=F(a.a),X(a,"Missing next location step."),b=Nb(a,b),c.push(b);return new pb(d,c)}
|
||||
function Nb(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a))return d=new V(Cb,new L("node")),F(a.a),d;if(".."==D(a.a))return d=new V(Bb,new L("node")),F(a.a),d;var f;if("@"==D(a.a))f=qb,F(a.a),X(a,"Missing attribute name");else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+F(a.a));c=F(a.a);f=Ab[c]||null;if(!f)throw Error("No axis with name: "+c);F(a.a);X(a,"Missing node name")}else f=xb;c=D(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==
|
||||
D(a.a,1)){if(!mb(c))throw Error("Invalid node type: "+c);c=F(a.a);if(!mb(c))throw Error("Invalid type name: "+c);Ib(a,"(");X(a,"Bad nodetype");e=D(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Kb(a);X(a,"Bad nodetype");Jb(a);c=new L(c,g)}else c=Lb(a);else if("*"==c)c=Lb(a);else throw Error("Bad token: "+F(a.a));e=new wb(Ob(a),f.a);return d||new V(f,c,e,"//"==b)}
|
||||
function Ob(a){for(var b=[];"["==D(a.a);){F(a.a);X(a,"Missing predicate expression.");var c=Gb(a);b.push(c);X(a,"Unclosed predicate expression.");Ib(a,"]")}return b}function Hb(a){if("-"==D(a.a))return F(a.a),new Db(Hb(a));var b=Mb(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==F(a.a);)X(a,"Missing next union location path."),b.push(Mb(a));a.a.a--;a=new Eb(b)}return a};function Pb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Ea(a);if(Ha(c))throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=ea(b.lookupNamespaceURI,b)):b=l(null);var d=Gb(new Fb(c,b));if(!Ha(c))throw Error("Bad token: "+F(c));this.evaluate=function(a,b){var c=d.a(new t(a));return new Y(c,b)}}
|
||||
function Y(a,b){if(0==b)if(a instanceof I)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof I))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?Xa(a):""+a;break;case 1:this.numberValue=a instanceof I?+Xa(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.l:!!a;break;case 4:case 5:case 6:case 7:var d=
|
||||
M(a);c=[];for(var e=N(d);e;e=N(d))c.push(e instanceof C?e.a:e);this.snapshotLength=a.l;this.invalidIteratorState=!1;break;case 8:case 9:d=Wa(a);this.singleNodeValue=d instanceof C?d.a:d;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||
|
||||
0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function Qb(a){this.lookupNamespaceURI=Za(a)}
|
||||
function Rb(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=Y,b.evaluate=function(a,b,e,f){return(new Pb(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Pb(a,b)},b.createNSResolver=function(a){return new Qb(a)})}var Sb=["wgxpath","install"],Z=m;Sb[0]in Z||!Z.execScript||Z.execScript("var "+Sb[0]);for(var Tb;Sb.length&&(Tb=Sb.shift());)Sb.length||void 0===Rb?Z[Tb]?Z=Z[Tb]:Z=Z[Tb]={}:Z[Tb]=Rb;})()
|
142
reader/js/plugin.js
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017 Frank de Lange
|
||||
* Copyright (c) 2013-2014 Lukas Reschke <lukas@owncloud.com>
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3
|
||||
* or later.
|
||||
*
|
||||
* See the COPYING-README file.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
(function(OCA) {
|
||||
|
||||
OCA.Files_Reader = OCA.Files_Reader || {};
|
||||
|
||||
var isMobile = navigator.userAgent.match(/Mobi/i);
|
||||
var hasTouch = 'ontouchstart' in document.documentElement;
|
||||
|
||||
function actionHandler(fileName, mime, context) {
|
||||
var downloadUrl = '';
|
||||
if($('#isPublic').val()) {
|
||||
var sharingToken = $('#sharingToken').val();
|
||||
downloadUrl = OC.generateUrl('/s/{token}/download?files={files}&path={path}', {
|
||||
token: sharingToken,
|
||||
files: fileName,
|
||||
path: context.dir
|
||||
});
|
||||
} else {
|
||||
downloadUrl = Files.getDownloadUrl(fileName, context.dir);
|
||||
}
|
||||
OCA.Files_Reader.Plugin.show(downloadUrl, mime, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @namespace OCA.Files_Reader.Plugin
|
||||
*/
|
||||
OCA.Files_Reader.Plugin = {
|
||||
|
||||
/**
|
||||
* @param fileList
|
||||
*/
|
||||
attach: function(fileList) {
|
||||
this._extendFileActions(fileList.fileActions);
|
||||
},
|
||||
|
||||
hideControls: function() {
|
||||
$('#app-content #controls').hide();
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
if ($('#fileList').length) {
|
||||
FileList.setViewerMode(false);
|
||||
}
|
||||
$("#controls").show();
|
||||
$('#app-content #controls').removeClass('hidden');
|
||||
if ($('#isPublic').val()) {
|
||||
$('#imgframe').show();
|
||||
$('footer').show();
|
||||
$('.directLink').show();
|
||||
$('.directDownload').show();
|
||||
}
|
||||
$('iframe').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
* @param downloadUrl
|
||||
* @param isFileList
|
||||
*/
|
||||
show: function(downloadUrl, mimeType, isFileList) {
|
||||
var self = this;
|
||||
var $iframe;
|
||||
var viewer = OC.generateUrl('/apps/files_reader/?file={file}&type={type}', {file: downloadUrl, type: mimeType});
|
||||
// launch in new window on mobile and touch devices...
|
||||
if (isMobile || hasTouch) {
|
||||
window.open(viewer, downloadUrl);
|
||||
} else {
|
||||
$iframe = '<iframe style="width:100%;height:100%;display:block;position:absolute;top:0;" src="' + viewer + '" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" sandbox="allow-scripts allow-same-origin"/>';
|
||||
if (isFileList === true) {
|
||||
FileList.setViewerMode(true);
|
||||
}
|
||||
if ($('#isPublic').val()) {
|
||||
// force the preview to adjust its height
|
||||
$('#preview').append($iframe).css({ height: '100%' });
|
||||
$('body').css({ height: '100%' });
|
||||
$('footer').addClass('hidden');
|
||||
$('#imgframe').addClass('hidden');
|
||||
$('.directLink').addClass('hidden');
|
||||
$('.directDownload').addClass('hidden');
|
||||
$('#controls').addClass('hidden');
|
||||
} else {
|
||||
$('#app-content').append($iframe);
|
||||
self.hideControls();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @param fileActions
|
||||
* @private
|
||||
*/
|
||||
_extendFileActions: function(fileActions) {
|
||||
var self = this;
|
||||
fileActions.registerAction({
|
||||
name: 'view-epub',
|
||||
displayName: 'View',
|
||||
mime: 'application/epub+zip',
|
||||
permissions: OC.PERMISSION_READ,
|
||||
actionHandler: function(fileName, context){
|
||||
return actionHandler(fileName, 'application/epub+zip', context);
|
||||
}
|
||||
});
|
||||
fileActions.registerAction({
|
||||
name: 'view-cbr',
|
||||
displayName: 'View',
|
||||
mime: 'application/x-cbr',
|
||||
permissions: OC.PERMISSION_READ,
|
||||
actionHandler: function(fileName, context) {
|
||||
return actionHandler(fileName, 'application/x-cbr', context);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
fileActions.setDefault('application/epub+zip', 'view-epub');
|
||||
fileActions.setDefault('application/x-cbr', 'view-cbr');
|
||||
}
|
||||
};
|
||||
|
||||
})(OCA);
|
||||
|
||||
OC.Plugins.register('OCA.Files.FileList', OCA.Files_Reader.Plugin);
|
||||
|
||||
// FIXME: Hack for single public file view since it is not attached to the fileslist
|
||||
$(document).ready(function(){
|
||||
if ($('#isPublic').val() && ($('#mimetype').val() === 'application/epub+zip'|| $('#mimetype').val() === 'application/x-cbr)')) {
|
||||
var sharingToken = $('#sharingToken').val();
|
||||
var downloadUrl = OC.generateUrl('/s/{token}/download', {token: sharingToken});
|
||||
var viewer = OCA.Files_Reader.Plugin;
|
||||
var mime = $('#mimetype').val();
|
||||
viewer.show(downloadUrl, mime, false);
|
||||
}
|
||||
});
|
210
reader/js/ready.js
Normal file
|
@ -0,0 +1,210 @@
|
|||
function disableStyles(doc, disable) {
|
||||
for ( var i=0; i<doc.styleSheets.length; i++) {
|
||||
void(doc.styleSheets.item(i).disabled=disable);
|
||||
}
|
||||
}
|
||||
|
||||
function addStyleSheet() {
|
||||
var style = document.createElement("style");
|
||||
// WebKit hack :(
|
||||
style.appendChild(document.createTextNode(""));
|
||||
document.head.appendChild(style);
|
||||
return style.sheet;
|
||||
}
|
||||
|
||||
function getCSSRule(sheet, selector, del) {
|
||||
lcSelector = selector.toLowerCase();
|
||||
for ( var i=0; i<sheet.cssRules.length; i++) {
|
||||
if (sheet.cssRules.item(i).selectorText.toLowerCase() == lcSelector) {
|
||||
if (del) {
|
||||
sheet.deleteRule(i);
|
||||
return null;
|
||||
} else {
|
||||
return sheet.cssRules.item(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function addCSSRule(sheet, selector, rules, index) {
|
||||
if("insertRule" in sheet) {
|
||||
sheet.insertRule(selector + "{" + rules + "}", index);
|
||||
}
|
||||
else if("addRule" in sheet) {
|
||||
sheet.addRule(selector, rules, index);
|
||||
}
|
||||
}
|
||||
|
||||
function delCSSRule(sheet, selector) {
|
||||
getCSSRule(sheet, selector, true);
|
||||
}
|
||||
|
||||
/*function getUrlParameter(name) {
|
||||
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||||
var results = regex.exec(location.search);
|
||||
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||
}*/
|
||||
|
||||
function getUrlParameter(param){
|
||||
var pattern = new RegExp('[?&]'+param+'((=([^&]*))|(?=(&|$)))','i');
|
||||
var m = window.location.search.match(pattern);
|
||||
return m && ( typeof(m[3])==='undefined' ? '' : m[3] );
|
||||
}
|
||||
|
||||
function renderEpub(file) {
|
||||
// only enable close button when launched in an iframe
|
||||
if (parent !== window) {
|
||||
$('#close').show();
|
||||
$('#close').on('click', function() { reader.book.destroy(); parent.OCA.Files_Reader.Plugin.hide(); });
|
||||
}
|
||||
|
||||
// some parameters...
|
||||
EPUBJS.filePath = "vendor/epubjs/";
|
||||
EPUBJS.cssPath = "css/";
|
||||
|
||||
// touch-enabled devices...
|
||||
$('#touch_nav').prop('checked', !('ontouchstart' in document.documentElement));
|
||||
if (!($('#touch_nav').prop('checked'))) {
|
||||
$("#next").addClass("touch_nav");
|
||||
$("#prev").addClass("touch_nav");
|
||||
}
|
||||
|
||||
// idevices...
|
||||
if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
|
||||
$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', document.getElementsByTagName("base").item(0).href + 'css/idevice.css'));
|
||||
}
|
||||
|
||||
// IE < 11
|
||||
if (navigator.userAgent.indexOf("MSIE") != -1) {
|
||||
EPUBJS.Hooks.register("beforeChapterDisplay").wgxpath = function(callback, renderer){
|
||||
wgxpath.install(renderer.render.window);
|
||||
if(callback)
|
||||
callback();
|
||||
};
|
||||
wgxpath.install(window);
|
||||
}
|
||||
|
||||
function nightModeConfig() {
|
||||
delCSSRule(EPUBJS.nightSheet, EPUBJS.nightSelector);
|
||||
addCSSRule(EPUBJS.nightSheet, EPUBJS.nightSelector, 'color: ' + EPUBJS.nightModeColor + ' !important; background: ' + EPUBJS.nightModeBackground + ' !important;');
|
||||
}
|
||||
|
||||
// nightMode
|
||||
EPUBJS.nightMode = false;
|
||||
EPUBJS.nightSheet = addStyleSheet();
|
||||
EPUBJS.nightSelector = '.night *';
|
||||
EPUBJS.nightModeBackground = $('#nightModeBackground').val();
|
||||
EPUBJS.nightModeColor = $('#nightModeColor').val();
|
||||
addCSSRule(EPUBJS.nightSheet, '.nonight', 'background: initial !important;');
|
||||
nightModeConfig();
|
||||
|
||||
$('#nightModeBackground').on('change', function() {
|
||||
EPUBJS.nightModeBackground = $('#nightModeBackground').val();
|
||||
nightModeConfig();
|
||||
});
|
||||
|
||||
$('#nightModeColor').on('change', function() {
|
||||
EPUBJS.nightModeColor = $('#nightModeColor').val();
|
||||
nightModeConfig();
|
||||
});
|
||||
|
||||
//var reader = ePubReader(document.getElementById("dllink").value, { contained: true });
|
||||
var reader = ePubReader(file, { contained: true });
|
||||
|
||||
// enable night/day mode switch by clicking on the book title/author
|
||||
// just switching in the "night" class works on some browsers but not on others, hence the trickery with
|
||||
// setStyle/removeStyle...
|
||||
$('#metainfo').on('click', function() {
|
||||
if(EPUBJS.nightMode) {
|
||||
reader.book.removeStyle("background");
|
||||
reader.book.removeStyle("color");
|
||||
$("#outerContainer").removeClass("night");
|
||||
EPUBJS.nightMode = false;
|
||||
} else {
|
||||
reader.book.setStyle("background", EPUBJS.nightModeBackground);
|
||||
reader.book.setStyle("color", EPUBJS.nightModeColor);
|
||||
$("#outerContainer").addClass("night");
|
||||
EPUBJS.nightMode = true;
|
||||
}
|
||||
});
|
||||
|
||||
// extra-wide page turn area?
|
||||
$('#touch_nav').on('click', function() {
|
||||
if ($('#touch_nav').prop('checked')) {
|
||||
$("#prev").removeClass("touch_nav");
|
||||
$("#next").removeClass("touch_nav");
|
||||
} else {
|
||||
$("#prev").addClass("touch_nav");
|
||||
$("#next").addClass("touch_nav");
|
||||
}
|
||||
});
|
||||
|
||||
// user-defined font
|
||||
EPUBJS.ignore_css = false;
|
||||
EPUBJS.bookFrame = null;
|
||||
EPUBJS.user_fontFamily = $('#fontFamily').val();
|
||||
EPUBJS.user_fontSize = $('#fontSize').val() + '%';
|
||||
|
||||
$('#ignore_css').on('click', function() {
|
||||
EPUBJS.bookFrame = document.getElementsByTagName('iframe')[0].contentDocument;
|
||||
if ($('#ignore_css').prop('checked')) {
|
||||
$('#fontFamily').prop('disabled',false);
|
||||
$('#fontSize').prop('disabled',false);
|
||||
EPUBJS.ignore_css = true;
|
||||
reader.book.setStyle('font-size', EPUBJS.user_fontSize);
|
||||
reader.book.setStyle('font-family', EPUBJS.user_fontFamily);
|
||||
} else {
|
||||
$('#fontFamily').prop('disabled',true);
|
||||
$('#fontSize').prop('disabled',true);
|
||||
EPUBJS.ignore_css = false;
|
||||
reader.book.removeStyle('font-size');
|
||||
reader.book.removeStyle('font-family');
|
||||
}
|
||||
disableStyles(EPUBJS.bookFrame, EPUBJS.ignore_css);
|
||||
;
|
||||
});
|
||||
|
||||
$('#fontSize').on('change', function() {
|
||||
EPUBJS.user_fontSize = $('#fontSize').val() + '%';
|
||||
$('#font_example').css('font-size', EPUBJS.user_fontSize);
|
||||
reader.book.setStyle('font-size', EPUBJS.user_fontSize);
|
||||
});
|
||||
$('#fontFamily').on('change', function() {
|
||||
EPUBJS.user_fontFamily = $('#fontFamily').val();
|
||||
$('#font_example').css('font-family', EPUBJS.user_fontFamily);
|
||||
reader.book.setStyle('font-family', EPUBJS.user_fontFamily);
|
||||
});
|
||||
}
|
||||
|
||||
function renderCbr(file) {
|
||||
CBRJS.filePath = "vendor/cbrjs/";
|
||||
|
||||
var reader = cbReader(file, { contained: true });
|
||||
|
||||
if (parent !== window) {
|
||||
$('.close').removeClass('hide');
|
||||
$('.close').on('click', function() { parent.OCA.Files_Reader.Plugin.hide(); });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
document.onreadystatechange = function () {
|
||||
if (document.readyState == "complete") {
|
||||
var type=decodeURIComponent(getUrlParameter('type'));
|
||||
var file=decodeURIComponent(getUrlParameter('file'));
|
||||
|
||||
switch (type) {
|
||||
case 'application/epub+zip':
|
||||
renderEpub(file);
|
||||
break;
|
||||
case 'application/x-cbr':
|
||||
renderCbr(file);
|
||||
break;
|
||||
default:
|
||||
console.log(type + ' is not supported by Reader');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
100
reader/lib/Controller/BookmarkController.php
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
||||
|
||||
use OCA\Files_Reader\Service\BookmarkService;
|
||||
|
||||
error_log("in bookmarkcontroller");
|
||||
|
||||
class BookmarkController extends Controller {
|
||||
|
||||
private $bookmarkService;
|
||||
|
||||
/**
|
||||
* @param string $AppName
|
||||
* @param IRequest $request
|
||||
* @param BookmarkService $bookmarkService
|
||||
*/
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
BookmarkService $bookmarkService ) {
|
||||
|
||||
parent::__construct($AppName, $request);
|
||||
$this->bookmarkService = $bookmarkService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return bookmark
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function get($fileId, $name) {
|
||||
return $this->bookmarkService->get($fileId, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write bookmark
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function set($fileId, $name, $value) {
|
||||
return $this->bookmarkService->set($fileId, $name, $value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief return cursor for $fileId
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function getCursor($fileId) {
|
||||
return $this->bookmarkService->getCursor($fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write cursor for $fileId
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function setCursor($fileId, $value) {
|
||||
error_log("in setCursor");
|
||||
return $this->bookmarkService->setCursor($fileId, $value);
|
||||
}
|
||||
}
|
80
reader/lib/Controller/MetadataController.php
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
use OCA\Files_Reader\Service\MetadataService;
|
||||
|
||||
class MetadataController extends Controller {
|
||||
|
||||
private $metadataService;
|
||||
|
||||
/**
|
||||
* @param string $AppName
|
||||
* @param IRequest $request
|
||||
* @param MetadataService $metadataService
|
||||
*/
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
MetadataService $metadataService ) {
|
||||
|
||||
parent::__construct($AppName, $request);
|
||||
$this->metadataService = $metadataService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief write metadata
|
||||
*
|
||||
* @NoAdminRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function setAll($fileId, $value) {
|
||||
return $this->metadataService->setAll($fileId, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return metadata item
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function get($fileId, $name) {
|
||||
return $this->metadataService->get($fileId, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write metadata item
|
||||
*
|
||||
* @NoAdminRequired
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function set($fileId, $name, $value) {
|
||||
return $this->metadataService->set($fileId, $name, $value);
|
||||
}
|
||||
|
||||
}
|
113
reader/lib/Controller/PageController.php
Normal file
|
@ -0,0 +1,113 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Controller;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Files\IRootFolder;
|
||||
|
||||
use OCA\Files_Reader\Service\BookmarkService;
|
||||
use OCA\Files_Reader\Service\MetadataService;
|
||||
use OCA\Files_Reader\Service\PreferenceService;
|
||||
|
||||
class PageController extends Controller {
|
||||
|
||||
/** @var IURLGenerator */
|
||||
private $urlGenerator;
|
||||
/** @var IRootFolder */
|
||||
private $rootFolder;
|
||||
private $userId;
|
||||
private $bookmarkService;
|
||||
private $metadataService;
|
||||
private $preferenceService;
|
||||
|
||||
/**
|
||||
* @param string $AppName
|
||||
* @param IRequest $request
|
||||
* @param IURLGenerator $urlGenerator
|
||||
*/
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
IURLGenerator $urlGenerator,
|
||||
IRootFolder $rootFolder,
|
||||
$UserId,
|
||||
BookmarkService $bookmarkService,
|
||||
PreferenceService $preferenceService,
|
||||
MetadataService $metadataService) {
|
||||
parent::__construct($AppName, $request);
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->rootFolder = $rootFolder;
|
||||
$this->userId = $UserId;
|
||||
$this->bookmarkService = $bookmarkService;
|
||||
$this->metadataService = $metadataService;
|
||||
$this->preferenceService = $preferenceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @PublicPage
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @return TemplateResponse
|
||||
*/
|
||||
public function showReader() {
|
||||
$templates= [
|
||||
'application/epub+zip' => 'epubreader',
|
||||
'application/x-cbr' => 'cbreader'
|
||||
];
|
||||
|
||||
$fileId = $this->getFileIdFromDownloadPath($this->request->get['file']);
|
||||
$type = $this->request->get["type"];
|
||||
$scope = $template = $templates[$type];
|
||||
|
||||
$params = [
|
||||
'urlGenerator' => $this->urlGenerator,
|
||||
'downloadLink' => $this->request->get['file'],
|
||||
'scope' => $scope,
|
||||
'fileId' => $fileId,
|
||||
'cursor' => $this->toJson($this->bookmarkService->getCursor($fileId)),
|
||||
'defaults' => $this->toJson($this->preferenceService->getDefault($scope)),
|
||||
'preferences' => $this->toJson($this->preferenceService->get($scope, $fileId)),
|
||||
'metadata' => $this->toJson($this->metadataService->get($fileId))
|
||||
];
|
||||
|
||||
|
||||
|
||||
$response = new TemplateResponse($this->appName, $template, $params, 'blank');
|
||||
/*
|
||||
$csp = new ContentSecurityPolicy();
|
||||
$csp->addAllowedStyleDomain('\'self\'');
|
||||
$csp->addAllowedStyleDomain('blob:');
|
||||
$csp->addAllowedScriptDomain('\'self\'');
|
||||
$csp->addAllowedFrameDomain('\'self\'');
|
||||
$csp->addAllowedChildSrcDomain('\'self\'');
|
||||
$csp->addAllowedFontDomain('\'self\'');
|
||||
$csp->addAllowedImageDomain('blob:');
|
||||
$response->setContentSecurityPolicy($csp);
|
||||
*/
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
private function getFileIdFromDownloadPath($path) {
|
||||
return $this->rootFolder->getUserFolder($this->userId)
|
||||
->get(explode("/", rawurldecode($this->request->get['file']),4)[3])
|
||||
->getFileInfo()
|
||||
->getId();
|
||||
}
|
||||
|
||||
private function toJson($value) {
|
||||
return htmlspecialchars(json_encode($value), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
105
reader/lib/Controller/PreferenceController.php
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
use OCA\Files_Reader\Service\PreferenceService;
|
||||
|
||||
class PreferenceController extends Controller {
|
||||
|
||||
private $urlGenerator;
|
||||
private $preferenceService;
|
||||
|
||||
/**
|
||||
* @param string $AppName
|
||||
* @param IRequest $request
|
||||
* @param IURLGenerator $urlGenerator
|
||||
* @param PreferenceService $preferenceService
|
||||
*/
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
IURLGenerator $urlGenerator,
|
||||
PreferenceService $preferenceService ) {
|
||||
|
||||
parent::__construct($AppName, $request);
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->preferenceService = $preferenceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return preference for $fileId
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name if null, return all preferences for $scope + $fileId
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function get($scope, $fileId, $name) {
|
||||
return $this->preferenceService->get($scope, $fileId, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write preference for $fileId
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function set($scope, $fileId, $name, $value) {
|
||||
return $this->preferenceService->set($scope, $fileId, $name, $value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief return default preference
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param string $scope
|
||||
* @param string $name if null, return all default preferences for scope
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function getDefault($scope, $name) {
|
||||
return $this->preferenceService->getDefault($scope, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write default preference
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param string $scope
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array|\OCP\AppFramework\Http\JSONResponse
|
||||
*/
|
||||
public function setDefault($scope, $name, $value) {
|
||||
return $this->preferenceService->setDefault($scope, $name, $value);
|
||||
}
|
||||
}
|
23
reader/lib/Db/Bookmark.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Bookmark extends Entity {
|
||||
|
||||
protected $userId; // user
|
||||
protected $fileId; // book (identified by fileId) for which this mark is valid
|
||||
protected $name; // name, defaults to $location
|
||||
protected $value; // bookmark value (format-specific, eg. page number for PDF, CFI for epub, etc)
|
||||
protected $lastModified; // modification timestamp
|
||||
}
|
||||
|
95
reader/lib/Db/BookmarkMapper.php
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
|
||||
use OCP\IDBConnection;
|
||||
|
||||
use OCA\Files_Reader\Utility\Time;
|
||||
|
||||
error_log("in bookmarkmapper");
|
||||
|
||||
class BookmarkMapper extends ReaderMapper {
|
||||
|
||||
private $userId;
|
||||
|
||||
/**
|
||||
* @param IDbConnection $db
|
||||
* @param $UserId
|
||||
* @param Time $time
|
||||
*/
|
||||
public function __construct(IDBConnection $db, $UserId, Time $time) {
|
||||
parent::__construct($db, 'reader_bookmarks', Bookmark::class, $time);
|
||||
/** @var int $UserId */
|
||||
$this->userId = $UserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get bookmarks for $fileId+$userId(+$name)
|
||||
* @param $fileId
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
public function get($fileId, $name=null) {
|
||||
if (!empty($name)) {
|
||||
$sql = "SELECT * FROM `*PREFIX*reader_bookmarks` WHERE file_id=? AND `user_id`=? AND `name`=?";
|
||||
$args = [
|
||||
$fileId,
|
||||
$this->userId,
|
||||
$name];
|
||||
} else {
|
||||
$sql = "SELECT * FROM `*PREFIX*reader_bookmarks` WHERE file_id=? AND `user_id`=?";
|
||||
$args = [
|
||||
$fileId,
|
||||
$this->userId];
|
||||
}
|
||||
|
||||
return $this->findEntities($sql, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write bookmark to database
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return Bookmark the newly created or updated bookmark
|
||||
*/
|
||||
public function set($fileId, $name, $value) {
|
||||
|
||||
$result = $this->get($fileId, $name);
|
||||
|
||||
if(empty($result)) {
|
||||
|
||||
// anonymous bookmarks are named after their contents
|
||||
if(empty($name)) {
|
||||
$name = $value;
|
||||
}
|
||||
|
||||
$bookmark = new Bookmark();
|
||||
$bookmark->setFileId($fileId);
|
||||
$bookmark->setUserId($this->userId);
|
||||
$bookmark->setName($name);
|
||||
$bookmark->setValue($value);
|
||||
|
||||
$this->insert($bookmark);
|
||||
} else {
|
||||
$bookmark = $result[0];
|
||||
$bookmark->setValue($value);
|
||||
|
||||
$this->update($bookmark);
|
||||
}
|
||||
|
||||
return $bookmark;
|
||||
}
|
||||
}
|
||||
|
24
reader/lib/Db/Preference.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Preference extends Entity {
|
||||
|
||||
protected $userId; // user for whom this preference is valid
|
||||
protected $scope; // scope (default or specific renderer)
|
||||
protected $fileId; // file for which this preference is set
|
||||
protected $name; // preference name
|
||||
protected $value; // preference value
|
||||
protected $lastModified; // modification timestamp
|
||||
}
|
||||
|
84
reader/lib/Db/PreferenceMapper.php
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
use OCA\Files_Reader\Utility\Time;
|
||||
use OCP\IDBConnection;
|
||||
|
||||
class PreferenceMapper extends ReaderMapper {
|
||||
|
||||
public function __construct(IDBConnection $db, $UserId, Time $time) {
|
||||
parent::__construct($db, 'reader_preferences', Preference::class, $time);
|
||||
$this->userId = $UserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get preferences for $scope+$fileId+$userId(+$name)
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
public function get($scope, $fileId, $name=null) {
|
||||
if(!empty($name)) {
|
||||
$sql = "SELECT * FROM `*PREFIX*reader_preferences` WHERE `scope`=? AND `file_id`=? AND `user_id`=? AND `name`=?";
|
||||
$args = array(
|
||||
$scope,
|
||||
$fileId,
|
||||
$this->userId,
|
||||
$name);
|
||||
} else {
|
||||
$sql = "SELECT * FROM `*PREFIX*reader_preferences` WHERE `scope`=? AND `file_id`=? AND `user_id`=?";
|
||||
$args = array(
|
||||
$scope,
|
||||
$fileId,
|
||||
$this->userId);
|
||||
}
|
||||
|
||||
return $this->findEntities($sql, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write preference to database
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return Preference the newly created or updated preference
|
||||
*/
|
||||
public function set($scope, $fileId, $name, $value) {
|
||||
|
||||
$result = $this->get($scope, $fileId, $name);
|
||||
error_log(print_r($result,true));
|
||||
|
||||
if(empty($result)) {
|
||||
|
||||
$preference = new Preference();
|
||||
$preference->setScope($scope);
|
||||
$preference->setFileId($fileId);
|
||||
$preference->setUserId($this->userId);
|
||||
$preference->setName($name);
|
||||
$preference->setValue($value);
|
||||
|
||||
$this->insert($preference);
|
||||
} else {
|
||||
$preference = $result[0];
|
||||
$preference->setValue($value);
|
||||
|
||||
$this->update($preference);
|
||||
}
|
||||
|
||||
return $preference;
|
||||
}
|
||||
}
|
42
reader/lib/Db/ReaderMapper.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
use OCP\IDBConnection;
|
||||
use OCP\AppFramework\Db\Mapper;
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
use OCA\Files_Reader\Utility\Time;
|
||||
|
||||
error_log("in readermapper");
|
||||
|
||||
abstract class ReaderMapper extends Mapper {
|
||||
|
||||
/**
|
||||
* @var Time
|
||||
*/
|
||||
private $time;
|
||||
|
||||
public function __construct(IDBConnection $db, $table, $entity, Time $time) {
|
||||
parent::__construct($db, $table, $entity);
|
||||
$this->time = $time;
|
||||
}
|
||||
|
||||
public function update(Entity $entity) {
|
||||
$entity->setLastModified($this->time->getMicroTime());
|
||||
return parent::update($entity);
|
||||
}
|
||||
|
||||
public function insert(Entity $entity) {
|
||||
$entity->setLastModified($this->time->getMicroTime());
|
||||
return parent::insert($entity);
|
||||
}
|
||||
}
|
94
reader/lib/Service/BookmarkService.php
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Service;
|
||||
|
||||
|
||||
use OCA\Files_Reader\Db\BookmarkMapper;
|
||||
|
||||
class BookmarkService extends Service {
|
||||
|
||||
// use 'CURSOR_$UserId' to identify cursor (current position in book)
|
||||
const CURSOR = 'CURSOR';
|
||||
|
||||
private $bookmarkMapper;
|
||||
private $userId;
|
||||
|
||||
public function __construct(BookmarkMapper $bookmarkMapper, $UserId) {
|
||||
parent::__construct($bookmarkMapper);
|
||||
$this->bookmarkMapper = $bookmarkMapper;
|
||||
$this->userId = $UserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get bookmark
|
||||
*
|
||||
* bookmark type is format-dependent, eg CFI for epub, page number for CBR/CBZ, etc
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get($fileId, $name=null) {
|
||||
$result = $this->bookmarkMapper->get($fileId, $name);
|
||||
return array_map(
|
||||
function($entity) {
|
||||
return [
|
||||
'name' => $entity->getName(),
|
||||
'value' => $entity->getValue(),
|
||||
'lastModified' => $entity->getLastModified()
|
||||
];
|
||||
}, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write bookmark
|
||||
*
|
||||
* position type is format-dependent, eg CFI for epub, page number for CBR/CBZ, etc
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function set($fileId, $name, $value) {
|
||||
return $this->bookmarkMapper->set($fileId, $name, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get cursor (current position in book)
|
||||
*
|
||||
* @param int $fileId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getCursor($fileId) {
|
||||
$cursor = self::CURSOR . '_' . $this->userId;
|
||||
if (!empty($value = $this->get($fileId, $cursor))) {
|
||||
return $value[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set cursor (current position in book)
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function setCursor($fileId, $value) {
|
||||
$cursor = self::CURSOR . '_' . $this->userId;
|
||||
return $this->bookmarkMapper->set($fileId, $cursor, $value);
|
||||
}
|
||||
}
|
||||
|
64
reader/lib/Service/MetadataService.php
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Service;
|
||||
|
||||
class MetadataService {
|
||||
|
||||
/**
|
||||
* @brief get metadata item(s)
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get($fileId, $name=null) {
|
||||
if (class_exists('\OCA\Files_Opds\Meta')) {
|
||||
if ($meta = \OCA\Files_Opds\Meta::get($fileId)) {
|
||||
if (!empty($name) && array_key_exists($name, $meta)) {
|
||||
return [$item => $meta[$name]];
|
||||
} else {
|
||||
return $meta;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write metadata to database
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param array $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function setAll($fileId, $value) {
|
||||
// no-op for now
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write metadata item to database
|
||||
*
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param array $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function set($fileId, $name, $value) {
|
||||
// no-op for now
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
96
reader/lib/Service/PreferenceService.php
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Service;
|
||||
|
||||
use OCA\Files_Reader\Db\PreferenceMapper;
|
||||
|
||||
class PreferenceService extends Service {
|
||||
|
||||
// (ab)use the fact that $fileId never goes below 1 by using the
|
||||
// value 0 to indicate a default preference
|
||||
const DEFAULTS = 0;
|
||||
|
||||
private $preferenceMapper;
|
||||
|
||||
/**
|
||||
* @param PreferenceMapper $preferenceMapper
|
||||
*/
|
||||
public function __construct(PreferenceMapper $preferenceMapper) {
|
||||
parent::__construct($preferenceMapper);
|
||||
$this->preferenceMapper = $preferenceMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get preference
|
||||
*
|
||||
* scope identifies preference source, i.e. which renderer the preference applies to
|
||||
* preference type is format-dependent, eg CFI for epub, page number for CBR/CBZ, etc
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get($scope, $fileId, $name=null) {
|
||||
$result = $this->preferenceMapper->get($scope, $fileId, $name);
|
||||
return array_map(
|
||||
function($entity) {
|
||||
return [
|
||||
'name' => $entity->getName(),
|
||||
'value' => $entity->getValue(),
|
||||
'lastModified' => $entity->getLastModified()
|
||||
];
|
||||
}, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write preference
|
||||
*
|
||||
* scope identifies preference source, i.e. which renderer the preference applies to
|
||||
* position type is format-dependent, eg CFI for epub, page number for CBR/CBZ, etc
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $fileId
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function set($scope, $fileId, $name, $value) {
|
||||
return $this->preferenceMapper->set($scope, $fileId, $name, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get default preference
|
||||
*
|
||||
* @param string $scope
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDefault($scope, $name=null) {
|
||||
return $this->get($scope, static::DEFAULTS, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set default preference
|
||||
*
|
||||
* @param string $scope
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function setDefault($scope, $name, $value) {
|
||||
return $this->preferenceMapper->set($scope, static::DEFAULTS, $name, $value);
|
||||
}
|
||||
}
|
27
reader/lib/Service/Service.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Service;
|
||||
|
||||
error_log("in service.php");
|
||||
|
||||
use OCA\Files_Reader\Db\ReaderMapper;
|
||||
|
||||
abstract class Service {
|
||||
|
||||
protected $mapper;
|
||||
|
||||
public function __construct(ReaderMapper $mapper){
|
||||
$this->mapper = $mapper;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
27
reader/lib/Utility/Time.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2017 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Utility;
|
||||
|
||||
class Time {
|
||||
public function getTime() {
|
||||
return time();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return int the current unix time in miliseconds
|
||||
*/
|
||||
public function getMicroTime() {
|
||||
list($millisecs, $secs) = explode(" ", microtime());
|
||||
return $secs . substr($millisecs, 2, 6);
|
||||
}
|
||||
|
||||
}
|
210
reader/templates/cbreader.php
Normal file
|
@ -0,0 +1,210 @@
|
|||
<?php
|
||||
/** @var array $_ */
|
||||
/** @var OCP\IURLGenerator $urlGenerator */
|
||||
$urlGenerator = $_['urlGenerator'];
|
||||
$downloadLink = $_['downloadLink'];
|
||||
$fileId = $_['fileId'];
|
||||
$scope = $_['scope'];
|
||||
$cursor = $_['cursor'];
|
||||
$defaults = $_['defaults'];
|
||||
$preferences = $_['preferences'];
|
||||
$metadata = $_['metadata'];
|
||||
$revision = '0017';
|
||||
$version = \OCP\App::getAppVersion('files_reader') . '.' . $revision;
|
||||
error_log("file_id: " . $fileId);
|
||||
|
||||
/* Owncloud currently does not implement CSPv3, remove this test when it does */
|
||||
$nonce = class_exists('\OC\Security\CSP\ContentSecurityPolicyNonceManager')
|
||||
? \OC::$server->getContentSecurityPolicyNonceManager()->getNonce()
|
||||
: 'nonce_not_implemented';
|
||||
?>
|
||||
|
||||
<html dir="ltr">
|
||||
|
||||
<head class="session" data-downloadlink='<?php print_unescaped($downloadLink);?>' data-fileid='<?php print_unescaped($fileId);?>' data-basepath='<?php p($urlGenerator->linkTo('files_reader',''));?>' data-scope='<?php print_unescaped($scope);?>' data-cursor='<?php print_unescaped($cursor);?>' data-defaults='<?php print_unescaped($defaults);?>' data-preferences='<?php print_unescaped($preferences);?>' data-metadata='<?php print_unescaped($metadata);?>'>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<base href="<?php p($urlGenerator->linkTo('files_reader',''));?>">
|
||||
<title>
|
||||
<?php p($_['title']);?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="img/book.png">
|
||||
<link rel="stylesheet" href="vendor/cbrjs/cbr.css?v=<?php p($version) ?>">
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/lib/Blob.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/libs/jquery.min.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/sindresorhus/screenfull.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/bitjs/archive.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/cbrjs/cbr.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/ready.js')) ?>?v=<?php p($version) ?>">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- data -->
|
||||
<!-- /data -->
|
||||
|
||||
<!-- loading progressbar -->
|
||||
<div id="progressbar" style="display:none;">
|
||||
<span class="progress"><span class="bar"></span></span>
|
||||
<br>
|
||||
<div class="message"><span class="message-icons"><span class="icon-cloud_download"></span><span class="icon-unarchive"></span></span> <span class="message-text"></span></div>
|
||||
</div>
|
||||
<!-- /loading progressbar -->
|
||||
|
||||
<!-- toolbar -->
|
||||
<div class="toolbar control" name="toolbar">
|
||||
<div class="pull-left">
|
||||
<button data-trigger="click" data-action="openSidebar" title="open sidebar" class="icon-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="metainfo">
|
||||
<span class="book-title"></span> <span class="current-page"></span> / <span class="page-count"></span>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<div>
|
||||
<button data-trigger="click" data-action="toggleLayout" title="toggle one/two pages at a time" class="icon-single_page_mode layout layout-single"></button>
|
||||
<button data-trigger="click" data-action="toggleLayout" title="toggle one/two pages at a time" class="icon-double_page_mode layout layout-double"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="zoomOut" title="zoom out" class="icon-zoom_out"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="zoomIn" title="zoom in" class="icon-zoom_in"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="fitWidth" title="fit page to window width" class="icon-icon-fit-width"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="fitWindow" title="fit page to window" class="icon-icon-fit-window"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="toggleReadingMode" title="switch reading direction" class="icon-format_textdirection_l_to_r manga-false"></button>
|
||||
<button data-trigger="click" data-action="toggleReadingMode" title="switch reading direction" class="icon-format_textdirection_r_to_l manga-true"></button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-trigger="click" data-action="toggleFullscreen" title="toggle fullscreen" class="icon-fullscreen fullscreen-false"></button>
|
||||
<button data-trigger="click" data-action="toggleFullscreen" title="toggle fullscreen" class="icon-fullscreen_exit fullscreen-true"></button>
|
||||
</div>
|
||||
<div class="hide close separator"></div>
|
||||
<div class="hide close">
|
||||
<button data-trigger="click" data-action="close" title="close" class="icon-exit"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /toolbar -->
|
||||
|
||||
<!-- loading overlay -->
|
||||
<div id="cb-loading-overlay" class="cb-control control" name="loadingOverlay" style="display:none"></div>
|
||||
<!-- /loading overlay -->
|
||||
|
||||
<!-- navigation -->
|
||||
<div data-trigger="click" data-action="navigation" data-navigate-side="left" class="cb-control navigate navigate-left control" name="navigateLeft">
|
||||
<span class="icon-navigate_before"></span>
|
||||
</div>
|
||||
<div data-trigger="click" data-action="toggleToolbar" class="toggle-controls control" name="toggleToolbar"></div>
|
||||
<div data-trigger="click" data-action="navigation" data-navigate-side="right" class="cb-control navigate navigate-right control" name="navigateRight">
|
||||
<span class="icon-navigate_next"></span>
|
||||
</div>
|
||||
<!-- /navigation -->
|
||||
|
||||
<!-- inline progressbar -->
|
||||
<div id="cb-status" class="cb-control control" name="progressbar" style="display:none">
|
||||
<div id="cb-progress-bar">
|
||||
<div class="progressbar-value"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /inline progressbar -->
|
||||
|
||||
<!-- sidebar -->
|
||||
<div class="sidebar control" name="sidebar">
|
||||
<div class="panels">
|
||||
<div class="pull-left">
|
||||
<button data-trigger="click" data-action="showToc" title="show table of contents" class="icon-format_list_numbered toc-view open"></button>
|
||||
<button data-trigger="click" data-action="showBookSettings" title="show book settings" class="icon-rate_review book-settings-view"></button>
|
||||
<button data-trigger="click" data-action="showSettings" title="show settings" class="icon-settings settings-view"></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button data-trigger="click" data-action="closeSidebar" title="close sidebar" class="icon-menu"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toc-view view open">
|
||||
<ul id="toc">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="book-settings-view view">
|
||||
<div class="metadata">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Title:</td><td class="book-title"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Format:</td><td class="book-format"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Page count:</td><td class="book-pagecount"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size:</td><td class="book-size"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="settings-container" name="enhancements">
|
||||
<form name="image-enhancements" data-trigger="reset" data-action="resetEnhancements">
|
||||
<div class="sliders">
|
||||
<div class="control-group">
|
||||
<label title="adjust brightness" class="icon-brightness_low"></label>
|
||||
<input data-trigger="change" data-action="brightness" type="range" min="-100" max="100" step="1" value="0">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label title="adjust contrast" class="icon-contrast"></label>
|
||||
<input data-trigger="change" data-action="contrast" type="range" min="-1" max="1" step="0.1" value="0">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label title="sharpen" class="icon-droplet"></label>
|
||||
<input data-trigger="change" data-action="sharpen" type="range" min="0" max="1" step="0.1" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group pull-left">
|
||||
<input id="image-desaturate" type="checkbox" data-trigger="change" data-action="desaturate">
|
||||
<label for="image-desaturate">desaturate</label>
|
||||
<input id="image-removenoise" type="checkbox" data-trigger="change" data-action="removenoise">
|
||||
<label for="image-removenoise">remove noise</label>
|
||||
</div>
|
||||
<div class="control-group pull-right">
|
||||
<input type="reset" value="reset">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-view view">
|
||||
<div class="settings-container" name="settings">
|
||||
<form name="settings" data-trigger="reset" data-action="resetSettings">
|
||||
<div class="control-group pull-left">
|
||||
<input id="thumbnail-width" type="number" min="50" max="500" step="10" value="200" >
|
||||
<label for="thumbnail-width">Thumbnail width</label>
|
||||
<input id="thumbnail-generate" type="checkbox" checked>
|
||||
<label for="thumbnail-generate">Thumbnails in index (disable to save memory)</label>
|
||||
</div>
|
||||
<div class="control-group pull-right">
|
||||
<input type="submit" value="save">
|
||||
<input type="reset" value="reset">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /sidebar -->
|
||||
<canvas id="viewer" style="display:none;"></canvas>
|
||||
</body>
|
||||
|
||||
</html>
|
196
reader/templates/epubreader.php
Normal file
|
@ -0,0 +1,196 @@
|
|||
<?php
|
||||
/** @var array $_ */
|
||||
/** @var OCP\IURLGenerator $urlGenerator */
|
||||
$urlGenerator = $_['urlGenerator'];
|
||||
$version = \OCP\App::getAppVersion('files_reader');
|
||||
$dllink = isset($_GET['file']) ? $_GET['file'] : '';
|
||||
|
||||
/* Owncloud currently does not implement CSPv3, remove this test when it does */
|
||||
$nonce = class_exists('\OC\Security\CSP\ContentSecurityPolicyNonceManager')
|
||||
? \OC::$server->getContentSecurityPolicyNonceManager()->getNonce()
|
||||
: 'nonce_not_implemented';
|
||||
?>
|
||||
|
||||
<html dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<base href="<?php p($urlGenerator->linkTo('files_reader',''));?>">
|
||||
<title>
|
||||
<?php p($_['title']);?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="img/book.png">
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<link rel="stylesheet" href="css/popup.css">
|
||||
<link rel="stylesheet" href="css/tooltip.css">
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/lib/typedarray.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/lib/Blob.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/lib/wgxpath.install.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/libs/jquery.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/libs/screenfull.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/libs/zip.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/epub.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/hooks.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/hooks/extensions/highlight.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/reader.min.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
|
||||
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/ready.js')) ?>?v=<?php p($version) ?>"> </script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="hidden" id="dllink" value="<?php print_unescaped($dllink);?>">
|
||||
<div id="outerContainer">
|
||||
<div id="sidebar">
|
||||
<div id="panels">
|
||||
<input id="searchBox" placeholder="not implemented yet" type="search" disabled="">
|
||||
<a id="show-Search" class="show_view icon-search" data-view="Search">
|
||||
<?php p($l->t("Search")); ?>
|
||||
</a>
|
||||
<a id="show-Toc" class="show_view icon-list-1 active" data-view="Toc">
|
||||
<?php p($l->t("TOC")); ?>
|
||||
</a>
|
||||
<a id="show-Bookmarks" class="show_view icon-bookmark" data-view="Bookmarks">
|
||||
<?php p($l->t("Bookmarks")); ?>
|
||||
</a>
|
||||
<a id="show-Notes" class="show_view icon-edit" data-view="Notes">
|
||||
<?php p($l->t("Notes")); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div id="tocView" class="view">
|
||||
</div>
|
||||
<div id="searchView" class="view">
|
||||
<ul id="searchResults">
|
||||
</ul>
|
||||
</div>
|
||||
<div id="bookmarksView" class="view">
|
||||
<ul id="bookmarks">
|
||||
</ul>
|
||||
</div>
|
||||
<div id="notesView" class="view">
|
||||
<div id="new-note">
|
||||
<textarea id="note-text">
|
||||
</textarea>
|
||||
<button id="note-anchor">
|
||||
<?php p($l->t("Anchor")); ?>
|
||||
</button>
|
||||
</div>
|
||||
<ol id="notes">
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="titlebar">
|
||||
<div id="opener">
|
||||
<a id="slider" class="icon-menu">
|
||||
<?php p($l->t("Menu")); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div id="metainfo">
|
||||
<span id="book-title">
|
||||
</span>
|
||||
<span id="title-seperator">
|
||||
–
|
||||
</span>
|
||||
<span id="chapter-title">
|
||||
</span>
|
||||
</div>
|
||||
<div id="title-controls">
|
||||
<a id="bookmark" class="icon-bookmark-empty">
|
||||
<?php p($l->t("Bookmark")); ?>
|
||||
</a>
|
||||
<a id="setting" class="icon-cog">
|
||||
<?php p($l->t("Settings")); ?>
|
||||
</a>
|
||||
<a id="fullscreen" class="icon-resize-full">
|
||||
<?php p($l->t("Fullscreen")); ?>
|
||||
</a>
|
||||
<a id="close" class="icon-cancel-circled2" style="display:none">
|
||||
<?php p($l->t("Close")); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divider">
|
||||
</div>
|
||||
<div id="prev" class="arrow nonight">
|
||||
<div class="nonight">
|
||||
‹
|
||||
</div>
|
||||
</div>
|
||||
<div id="viewer">
|
||||
</div>
|
||||
<div id="next" class="arrow nonight">
|
||||
<div class="nonight">
|
||||
›
|
||||
</div>
|
||||
</div>
|
||||
<div id="loader" class="nonight">
|
||||
<img src="img/loading.gif">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal md-effect-1" id="settings-modal">
|
||||
<div class="md-content">
|
||||
<h3>
|
||||
<?php p($l->t("Settings")); ?>
|
||||
</h3>
|
||||
<div>
|
||||
<p>
|
||||
<input type="checkbox" id="ignore_css" name="ignore_css">
|
||||
<label for="ignore_css">
|
||||
<?php p($l->t("Always use")); ?>
|
||||
</label>
|
||||
<select id="fontFamily" disabled="">
|
||||
<option value="verdana, trebuchet, droid sans serif, sans, sans-serif">
|
||||
Sans
|
||||
</option>
|
||||
<option value="georgia, times new roman, droid serif, serif">
|
||||
Serif
|
||||
</option>
|
||||
<option value="monospace">
|
||||
Monospace
|
||||
</option>
|
||||
</select>
|
||||
<?php p($l->t("font scaled to")); ?>
|
||||
<input type="number" id="fontSize" value="100" min="50" max="150" disabled="">
|
||||
%
|
||||
</p>
|
||||
<div id="font_example" class="user">
|
||||
<?php p($l->t("Et nos esse veri viri scire volemus")); ?>
|
||||
</div>
|
||||
<p>
|
||||
<input type="checkbox" id="sidebarReflow" name="sidebarReflow">
|
||||
<label for="sidebarReflow">
|
||||
<?php p($l->t("Reflow text when sidebars are open.")); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<?php p($l->t("Night mode background")); ?>
|
||||
<input type="color" id="nightModeBackground" value="#000000">
|
||||
<?php p($l->t("and text")); ?>
|
||||
<input type="color" id="nightModeColor" value="#3A516B">
|
||||
<?php p($l->t("colour")); ?>
|
||||
</p>
|
||||
<div id="nightModeExample" class="night">
|
||||
<div>
|
||||
Et nos esse veri viri scire volemus
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<input type="checkbox" id="touch_nav" name="touch_nav">
|
||||
<label for="touch_nav" class="tooltip">
|
||||
<?php p($l->t("Disable extra-wide page turn areas")); ?>
|
||||
<span>
|
||||
<?php p($l->t("The extra-wide page turn areas as used by default on touch-screen devices interfere with the ability to select links in ebooks. When this option is enabled, the page-turn area is always outside the ebook margins so links are reachable.")); ?>
|
||||
</span>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
<div class="closer icon-cancel-circled nonight">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay nonight">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
reader/vendor/bitjs
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1f76d7611598b88fe736ec77eb4626bcf1e9ee06
|
669
reader/vendor/cbrjs/cbr.css
vendored
Normal file
|
@ -0,0 +1,669 @@
|
|||
/* reader */
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* remember to define focus styles! */
|
||||
:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* remember to highlight inserts somehow! */
|
||||
ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* tables still need 'cellspacing="0"' in the markup */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.cb-control {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.cb-control {
|
||||
color: #fff;
|
||||
background-color: #111;
|
||||
padding: 10px;
|
||||
position: fixed !important;
|
||||
box-shadow: 0 0 4px #000;
|
||||
}
|
||||
|
||||
.navigate {
|
||||
top: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
width: 20%;
|
||||
opacity: 0;
|
||||
background: center no-repeat;
|
||||
box-shadow: none;
|
||||
padding: 0 3em;
|
||||
}
|
||||
|
||||
.navigate > span {
|
||||
color: #000;
|
||||
font-size: 10em;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 1em;
|
||||
top: 45%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body:not(.mobile) .navigate:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.navigate-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.navigate-left > span {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navigate-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.navigate-right > span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.toggle-controls {
|
||||
cursor: pointer;
|
||||
width: 20%;
|
||||
height: 20%;
|
||||
left: 40%;
|
||||
top: 40%;
|
||||
border: none;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#cb-loading-overlay {
|
||||
z-index: 100;
|
||||
opacity: 0.8;
|
||||
background: #000 url("img/loading.gif") no-repeat center;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#cb-status {
|
||||
z-index: 101;
|
||||
font-size: 12px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#cb-progress-bar {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#cb-progress-bar,
|
||||
#cb-progress-bar .progressbar-value {
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
#cb-progress-bar .progressbar-value {
|
||||
width: 0;
|
||||
background: #86C441;
|
||||
border-color: #3E7600;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.toolbar,
|
||||
.panels {
|
||||
color: white;
|
||||
overflow: visible;
|
||||
/* padding: 0.75em 0; */
|
||||
background: #4e4e4e;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
margin-bottom: 0;
|
||||
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
transition: opacity 0.1s ease-in-out;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.toolbar .metainfo {
|
||||
font-size: 1.2em;
|
||||
top: 0.5em;
|
||||
}
|
||||
|
||||
.mobile .metainfo .book-title,
|
||||
.mobile .metainfo .title-separator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body:not(.mobile) .toolbar:hover,
|
||||
.mobile .toolbar,
|
||||
.toolbar.open {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.toolbar div,
|
||||
.sidebar div {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toolbar .separator {
|
||||
/* border: solid 1px; */
|
||||
height: 1em;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.toolbar button, .sidebar button {
|
||||
color: white;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.toolbar div > button,
|
||||
.sidebar div > button {
|
||||
font-size: 1.5em;
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mobile .toolbar div > button,
|
||||
.mobile .sidebar div > button {
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body:not(.mobile) .toolbar div > button:hover,
|
||||
body:not(.mobile) .sidebar div > button:hover {
|
||||
color: #8CC746;
|
||||
}
|
||||
|
||||
body:not(.mobile) .toolbar button[data-action=close]:hover {
|
||||
color: #FF6464;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* sidebar */
|
||||
.sidebar.open {
|
||||
box-shadow: 3px 0px 3px 0px rgba(0, 0, 0, 0.4);
|
||||
/* transitions and animations cause problems on older devices...
|
||||
transform: translate3d(0,0,0);
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
transition: all 0.3s ease-out;
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
... so use display instead ...*/
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background: #6b6b6b;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 20%;
|
||||
min-width: 25em;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
/* transitions and animations cause problems on older devices...
|
||||
transform: translate3d(-20vw,0,0);
|
||||
-webkit-transform: translate3d(-20vw,0,0);
|
||||
transition: all 0.3s ease-out;
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
... so use display instead ...*/
|
||||
display: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.panels {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 1px 3px rgba(0,0,0,.6);
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
.panels .open {
|
||||
background-color: #6B6B6B;
|
||||
}
|
||||
|
||||
.view.open {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.view {
|
||||
overflow-x: hidden;
|
||||
display: none !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.toc-view li {
|
||||
margin: 1em;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
.toc-view img {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toc-view img + span {
|
||||
position: absolute;
|
||||
font-size: 5em;
|
||||
font-weight: bold;
|
||||
color: #F8F8F8;
|
||||
left: 60%;
|
||||
margin-top: 75%;
|
||||
text-shadow: 0.05em 0.05em 0.02em rgba(70, 70, 70, 0.8);
|
||||
-webkit-text-stroke: 2px black;
|
||||
}
|
||||
|
||||
.settings-container {
|
||||
font-size: 1em;
|
||||
background: #F8F8F8;
|
||||
color: #111;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.view .control-group input[type=range] {
|
||||
width: 90%;
|
||||
float: right;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.view .control-group {
|
||||
padding: 0.5em;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.view .sliders {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.view .control-group span {
|
||||
float: left;
|
||||
margin: 0 2px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.view .control-group input[type=reset] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.metadata {
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.metadata table {
|
||||
font-size: 1.2em;
|
||||
color: #F8F8F8;
|
||||
}
|
||||
|
||||
.metadata td:nth-child(1) {
|
||||
font-weight: bold;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
/* END sidebar */
|
||||
|
||||
/* progressbar (loading/unarchiving) */
|
||||
|
||||
.progress, .bar {
|
||||
width: 100%;
|
||||
height: 0.3em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
.progress {
|
||||
border: none;
|
||||
}
|
||||
.bar {
|
||||
width: 0;
|
||||
background-color: red;
|
||||
box-shadow: 0px 1px 3px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.message {
|
||||
margin: 3em;
|
||||
}
|
||||
|
||||
.message-icons {
|
||||
font-size: 3em;
|
||||
color: lightgrey;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.message-text {
|
||||
font-size: 1.5em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.active {
|
||||
color:black;
|
||||
}
|
||||
|
||||
.ok {
|
||||
color:green;
|
||||
}
|
||||
|
||||
.error {
|
||||
color:red;
|
||||
}
|
||||
|
||||
/* END progressbar */
|
||||
|
||||
/* icon font */
|
||||
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('fonts/icomoon.eot?g4qvho');
|
||||
src: url('fonts/icomoon.eot?g4qvho#iefix') format('embedded-opentype'),
|
||||
url('fonts/icomoon.ttf?g4qvho') format('truetype'),
|
||||
url('fonts/icomoon.woff?g4qvho') format('woff'),
|
||||
url('fonts/icomoon.svg?g4qvho#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-double_page_mode:before {
|
||||
content: "\e86d";
|
||||
}
|
||||
.icon-single_page_mode:before {
|
||||
content: "\e86e";
|
||||
}
|
||||
.icon-local_library:before {
|
||||
content: "\e54b";
|
||||
}
|
||||
.icon-rate_review:before {
|
||||
content: "\e560";
|
||||
}
|
||||
.icon-arrow_back:before {
|
||||
content: "\e5c4";
|
||||
}
|
||||
.icon-arrow_forward:before {
|
||||
content: "\e5c8";
|
||||
}
|
||||
.icon-icon-fit-window:before {
|
||||
content: "\e85b";
|
||||
}
|
||||
.icon-icon-fit-width:before {
|
||||
content: "\e85c";
|
||||
}
|
||||
.icon-turned_in:before {
|
||||
content: "\e8e6";
|
||||
}
|
||||
.icon-turned_in_not:before {
|
||||
content: "\e8e7";
|
||||
}
|
||||
.icon-brightness_low:before {
|
||||
content: "\e1ad";
|
||||
}
|
||||
.icon-build:before {
|
||||
content: "\e869";
|
||||
}
|
||||
.icon-cancel:before {
|
||||
content: "\e5c9";
|
||||
}
|
||||
.icon-navigate_before:before {
|
||||
content: "\e408";
|
||||
}
|
||||
.icon-navigate_next:before {
|
||||
content: "\e409";
|
||||
}
|
||||
.icon-close:before {
|
||||
content: "\e5cd";
|
||||
}
|
||||
.icon-cloud_download:before {
|
||||
content: "\e2c0";
|
||||
}
|
||||
.icon-content_copy:before {
|
||||
content: "\e14d";
|
||||
}
|
||||
.icon-mode_edit:before {
|
||||
content: "\e254";
|
||||
}
|
||||
.icon-crop_free:before {
|
||||
content: "\e3c2";
|
||||
}
|
||||
.icon-crop_portrait:before {
|
||||
content: "\e3c5";
|
||||
}
|
||||
.icon-dehaze:before {
|
||||
content: "\e3c7";
|
||||
}
|
||||
.icon-dns:before {
|
||||
content: "\e875";
|
||||
}
|
||||
.icon-exit_to_app:before {
|
||||
content: "\e879";
|
||||
}
|
||||
.icon-featured_play_list:before {
|
||||
content: "\e06d";
|
||||
}
|
||||
.icon-format_list_bulleted:before {
|
||||
content: "\e241";
|
||||
}
|
||||
.icon-format_list_numbered:before {
|
||||
content: "\e242";
|
||||
}
|
||||
.icon-format_textdirection_l_to_r:before {
|
||||
content: "\e247";
|
||||
}
|
||||
.icon-format_textdirection_r_to_l:before {
|
||||
content: "\e248";
|
||||
}
|
||||
.icon-fullscreen:before {
|
||||
content: "\e5d0";
|
||||
}
|
||||
.icon-fullscreen_exit:before {
|
||||
content: "\e5d1";
|
||||
}
|
||||
.icon-keyboard_arrow_left:before {
|
||||
content: "\e314";
|
||||
}
|
||||
.icon-keyboard_arrow_right:before {
|
||||
content: "\e315";
|
||||
}
|
||||
.icon-list:before {
|
||||
content: "\e896";
|
||||
}
|
||||
.icon-sync:before {
|
||||
content: "\e627";
|
||||
}
|
||||
.icon-menu:before {
|
||||
content: "\e5d2";
|
||||
}
|
||||
.icon-open_with:before {
|
||||
content: "\e89f";
|
||||
}
|
||||
.icon-pages:before {
|
||||
content: "\e7f9";
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e8b6";
|
||||
}
|
||||
.icon-settings:before {
|
||||
content: "\e8b8";
|
||||
}
|
||||
.icon-settings_overscan:before {
|
||||
content: "\e8c4";
|
||||
}
|
||||
.icon-tune:before {
|
||||
content: "\e429";
|
||||
}
|
||||
.icon-unarchive:before {
|
||||
content: "\e169";
|
||||
}
|
||||
.icon-wb_sunny:before {
|
||||
content: "\e430";
|
||||
}
|
||||
.icon-zoom_in:before {
|
||||
content: "\e8ff";
|
||||
}
|
||||
.icon-zoom_out:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-zoom_out_map:before {
|
||||
content: "\e56b";
|
||||
}
|
||||
.icon-droplet:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-box-remove:before {
|
||||
content: "\e95f";
|
||||
}
|
||||
.icon-download:before {
|
||||
content: "\e960";
|
||||
}
|
||||
.icon-spinner:before {
|
||||
content: "\e97a";
|
||||
}
|
||||
.icon-spinner3:before {
|
||||
content: "\e97c";
|
||||
}
|
||||
.icon-spinner6:before {
|
||||
content: "\e97f";
|
||||
}
|
||||
.icon-spinner9:before {
|
||||
content: "\e982";
|
||||
}
|
||||
.icon-spinner11:before {
|
||||
content: "\e984";
|
||||
}
|
||||
.icon-search2:before {
|
||||
content: "\e986";
|
||||
}
|
||||
.icon-enlarge:before {
|
||||
content: "\e989";
|
||||
}
|
||||
.icon-enlarge2:before {
|
||||
content: "\e98b";
|
||||
}
|
||||
.icon-equalizer:before {
|
||||
content: "\e992";
|
||||
}
|
||||
.icon-cog:before {
|
||||
content: "\e994";
|
||||
}
|
||||
.icon-menu2:before {
|
||||
content: "\e9bd";
|
||||
}
|
||||
.icon-contrast:before {
|
||||
content: "\e9d5";
|
||||
}
|
||||
.icon-cancel-circle:before {
|
||||
content: "\ea0d";
|
||||
}
|
||||
.icon-exit:before {
|
||||
content: "\ea14";
|
||||
}
|
||||
.icon-arrow-right:before {
|
||||
content: "\ea34";
|
||||
}
|
||||
.icon-arrow-left:before {
|
||||
content: "\ea38";
|
||||
}
|
||||
.icon-arrow-right2:before {
|
||||
content: "\ea3c";
|
||||
}
|
||||
.icon-arrow-left2:before {
|
||||
content: "\ea40";
|
||||
}
|
||||
.icon-circle-right:before {
|
||||
content: "\ea42";
|
||||
}
|
||||
.icon-circle-left:before {
|
||||
content: "\ea44";
|
||||
}
|
||||
|
||||
/* END icon font */
|
3070
reader/vendor/cbrjs/cbr.js
vendored
Normal file
2712
reader/vendor/cbrjs/cbr.js-refactor-in-progress
vendored
Normal file
2894
reader/vendor/cbrjs/cbr.js.OK
vendored
Normal file
1460
reader/vendor/cbrjs/cbr2.js
vendored
Normal file
11
reader/vendor/cbrjs/fonts.org/license.txt
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
Icon Set: IcoMoon - Free -- http://keyamoon.com/icomoon/
|
||||
License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/Set: Font Awesome -- http://fortawesome.github.com/Font-Awesome/
|
||||
License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
|
||||
Icon Set: IcoMoon - Free -- http://keyamoon.com/icomoon/
|
||||
License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
|
||||
Icon Set: Iconic -- http://somerandomdude.com/work/iconic/
|
||||
License: CC BY-SA 3.0 -- http://creativecommons.org/licenses/by-sa/3.0/us/
|
110
reader/vendor/cbrjs/fonts.org/toolbar.dev.svg
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG font generated by IcoMoon.
|
||||
<iconset grid="20"></iconset>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="toolbar" horiz-adv-x="640" >
|
||||
<font-face units-per-em="640" ascent="608" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="640" />
|
||||
<glyph class="hidden" unicode="" d="M0,608L 640 -32L0 -32 z" horiz-adv-x="0" />
|
||||
<glyph unicode="" d="M 557.574,490.426l-75.146,75.148C 459.091,588.909, 413,608, 380,608L 100,608 C 67,608, 40,581, 40,548l0-520 c0-33, 27-60, 60-60l 440,0
|
||||
c 33,0, 60,27, 60,60L 600,388 C 600,421, 580.909,467.091, 557.574,490.426z M 400,523.274c 1.373-0.503, 2.782-1.050, 4.224-1.647
|
||||
c 11.287-4.676, 19.124-10.11, 21.635-12.621l 75.148-75.149c 2.511-2.511, 7.945-10.346, 12.621-21.634c 0.597-1.441, 1.145-2.851, 1.647-4.223
|
||||
L 400,408 L 400,523.274 z M 520,48L 120,48 L 120,528 l 240,0 l0-160 l 160,0 L 520,48 z" data-tags="file, paper, page, new, empty, blank, document" />
|
||||
<glyph unicode="" d="M 560,488 L 80,488 L 80,88 L 560,88 L 560,488 Z M 640,568 L 640,568 L 640,8 L 0,8 L 0,568 L 640,568 ZM 520,128 L 120,128 L 120,208 L 240,408 L 404.375,208 L 520,288 L 520,248 ZM 400,388A60,60 3060 1 1 520,388A60,60 3060 1 1 400,388z" data-tags="image, picture, photo, graphic" />
|
||||
<glyph unicode="" d="M 620.164,63.378L 468.569,192.311c-15.671,14.104-32.431,20.579-45.97,19.954C 458.384,254.183, 480,308.564, 480,368
|
||||
C 480,500.549, 372.549,608, 240,608C 107.453,608,0,500.549,0,368c0-132.549, 107.451-240, 240-240c 59.436,0, 113.817,21.616, 155.735,57.402
|
||||
c-0.625-13.539, 5.85-30.299, 19.954-45.97l 128.934-151.595c 22.076-24.529, 58.139-26.596, 80.138-4.598S 644.692,41.301, 620.164,63.378
|
||||
z M 240,208c-88.365,0-160,71.635-160,160S 151.635,528, 240,528s 160-71.635, 160-160S 328.366,208, 240,208zM 120,408L 360,408L 360,328L 120,328z" data-tags="zoom out, smaller, scale, reduce" />
|
||||
<glyph unicode="" d="M 620.164,63.378L 468.569,192.311c-15.671,14.104-32.431,20.579-45.97,19.954C 458.384,254.183, 480,308.564, 480,368
|
||||
C 480,500.549, 372.549,608, 240,608C 107.453,608,0,500.549,0,368c0-132.549, 107.451-240, 240-240c 59.436,0, 113.817,21.616, 155.735,57.402
|
||||
c-0.625-13.539, 5.85-30.299, 19.954-45.97l 128.934-151.595c 22.076-24.529, 58.139-26.596, 80.138-4.598S 644.692,41.301, 620.164,63.378
|
||||
z M 240,208c-88.365,0-160,71.635-160,160S 151.635,528, 240,528s 160-71.635, 160-160S 328.366,208, 240,208zM 280,488L 200,488L 200,408L 120,408L 120,328L 200,328L 200,248L 280,248L 280,328L 360,328L 360,408L 280,408 z" data-tags="zoom in, enlarge, scale" />
|
||||
<glyph unicode="" d="M 640,608 L 640,348 L 540,448 L 420,328 L 360,388 L 480,508 L 380,608 ZM 280,188 L 160,68 L 260-32 L 0-32 L 0,228 L 100,128 L 220,248 Z" data-tags="expand, enlarge, maximize, fullscreen" />
|
||||
<glyph unicode="" d="M 640,608 L 640,368 L 553.587,454.412 L 421.087,321.913 L 353.913,389.088 L 486.413,521.588 L 400,608 ZM 153.588,521.588 L 286.087,389.088 L 218.912,321.913 L 86.412,454.412 L 0,368 L 0,608 L 240,608 ZM 553.587,121.587 L 640,208 L 640-32 L 400-32 L 486.413,54.413 L 353.913,186.913 L 421.087,254.087 ZM 286.087,186.913 L 153.588,54.413 L 240-32 L 0-32 L 0,208 L 86.412,121.587 L 218.912,254.087 Z" data-tags="expand, enlarge, maximize, fullscreen" />
|
||||
<glyph unicode="" d="M 520,8L 640,328L 120,328L0,8 zM 80,368 L 0,8 L 0,528 L 180,528 L 260,448 L 520,448 L 520,368 Z" data-tags="folder-open, directory, category, browse" />
|
||||
<glyph unicode="" d="M 0,408 L 640,408 L 600,8 L 40,8 L 0,408 Z M 580,488 L 600,448 L 40,448 L 80,528 L 300,528 L 320,488 L 580,488 Z" data-tags="folder, directory, category, browse" />
|
||||
<glyph unicode="" d="M 583.619,226.594c-33.579,58.159-13.385,132.69, 45.095,166.555l-62.891,108.933c-17.969-10.534-38.86-16.574-61.154-16.574
|
||||
c-67.21,0-121.692,54.841-121.692,122.494L 257.19,608.001 c 0.166-20.881-5.046-42.051-16.224-61.407
|
||||
c-33.578-58.16-108.222-77.939-166.789-44.224L 11.287,393.437c 18.106-10.295, 33.781-25.367, 44.929-44.674
|
||||
c 33.524-58.068, 13.445-132.45-44.817-166.39l 62.891-108.933c 17.906,10.435, 38.697,16.409, 60.875,16.409
|
||||
c 66.998,0, 121.34-54.495, 121.688-121.849l 125.784,0 c-0.054,20.671, 5.17,41.606, 16.229,60.761
|
||||
c 33.523,58.066, 107.985,77.871, 166.509,44.383l 62.891,108.931C 610.277,192.368, 594.707,207.387, 583.619,226.594z M 320,158.418
|
||||
c-71.567,0-129.585,58.015-129.585,129.584c0,71.567, 58.016,129.584, 129.585,129.584c 71.567,0, 129.582-58.016, 129.582-129.584
|
||||
C 449.581,216.433, 391.567,158.418, 320,158.418z" data-tags="cog, preferences, settings, gear, generate, control, options" />
|
||||
<glyph unicode="" d="M 40,488L 600,488L 600,368L 40,368zM 40,328L 600,328L 600,208L 40,208zM 40,168L 600,168L 600,48L 40,48z" data-tags="menu, list, items, lines, options" />
|
||||
<glyph unicode="" d="M 626.834,96.827l-287.845,246.725C 352.394,368.739, 360,397.479, 360,428C 360,527.411, 279.411,608, 180,608
|
||||
c-18.184,0-35.733-2.708-52.279-7.721l 103.994-103.994c 15.556-15.556, 15.556-41.013,0-56.569l-63.431-63.431
|
||||
c-15.556-15.556-41.013-15.556-56.569,0L 7.721,480.279C 2.708,463.732,0,446.184,0,428c0-99.411, 80.589-180, 180-180
|
||||
c 30.521,0, 59.261,7.606, 84.448,21.012l 246.725-287.845c 14.318-16.703, 38.76-17.641, 54.315-2.086l 63.433,63.433
|
||||
C 644.475,58.069, 643.536,82.51, 626.834,96.827z" data-tags="wrench, settings, control, tool, options, preferences, fix" />
|
||||
<glyph unicode="" d="M 280,528l0,10 c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,528 l0-80 l 120,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 360,0 L 640,528 L 280,528 z M 160,448L 160,528 l 80,0 l0-80 L 160,448 zM 520,338c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,328 l0-80 l 360,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 120,0 l0,80 l-120,0 L 520,338 z M 400,248l0,80 l 80,0 l0-80 L 400,248 zM 280,138c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,128 l0-80 l 120,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 360,0 l0,80 L 280,128 L 280,138 z M 160,48l0,80 l 80,0 l0-80 L 160,48 z" data-tags="settings, preferences, options" />
|
||||
<glyph unicode="" d="M 546.264,514.263C 488.356,572.172, 408.366,608, 320,608C 182.82,608, 65.819,521.67, 20.314,400.382l 74.922-28.096
|
||||
C 129.364,463.252, 217.115,528, 320,528c 66.275,0, 126.263-26.875, 169.691-70.309L 400,368l 240,0 L 640,608 L 546.264,514.263zM 320,48c-66.275,0-126.266,26.87-169.695,70.305L 240,208L0,208 l0-240 l 93.746,93.746C 151.65,3.832, 231.633-32, 320-32
|
||||
c 137.181,0, 254.183,86.33, 299.688,207.618l-74.922,28.096C 510.637,112.748, 422.886,48, 320,48z" data-tags="loop, repeat, reload, refresh, update, upgrade, synchronize, media control, arrows" />
|
||||
<glyph unicode="" d="M 640,448c0,88.32-71.72,160-160,160c-59.68,0-111.24-33.16-138.76-81.72c0,0.040, 0.080,0.080, 0.080,0.12
|
||||
c-7.34,0.7-14.46,2.22-21.96,2.22c-132.58,0-240-107.42-240-240c0-50.54, 15.78-97.34, 42.42-135.94L0-32l 185.78,121.24
|
||||
c 38.2-25.62, 84.14-40.62, 133.6-40.62c 132.58,0, 240,107.42, 240,240c0,6.92-1.4,13.4-2.040,20.16C 606.4,336.12, 640,387.88, 640,448z
|
||||
M 319.38,128.62c-88.28,0-160,71.72-160,160c0,88.24, 71.72,160, 160,160c 0.24,0, 0.46-0.080, 0.62-0.080c0,0.16, 0.080,0.28, 0.080,0.4
|
||||
C 320.080,448.62, 320,448.32, 320,448c0-13.9, 2.34-27.1, 5.62-39.96l-63.44-63.48c-31.24-31.24-31.24-81.88,0-113.12s 81.88-31.24, 113.12,0
|
||||
l 62.82,62.82c 13.2-3.6, 26.88-6.1, 41.18-6.18C 478.98,200.040, 407.42,128.62, 319.38,128.62z M 480,368c-44.060,0-80,35.9-80,80
|
||||
s 35.94,80, 80,80s 80-35.9, 80-80S 524.060,368, 480,368z" data-tags="pin, location" />
|
||||
<glyph unicode="" d="M 239.52,288c0-8.256, 8.384-14.144, 8.384-14.144l 232.8-146.208C 497.952,116.352, 512,124.672, 512,146.048L 512,429.952
|
||||
c0,21.408-14.048,29.728-31.296,18.432l-232.8-146.24C 247.904,302.112, 239.52,296.256, 239.52,288z M 128,436.576l0-297.152 c0-28.416, 19.584-37.12, 48-37.12
|
||||
S 224,111.008, 224,139.392L 224,436.576 c0,28.448-19.584,37.152-48,37.152S 128,464.992, 128,436.576z" data-tags="first, start, media control" />
|
||||
<glyph unicode="" d="M 392.096,302.144l-232.8,146.24C 142.080,459.648, 128,451.36, 128,429.92l0-283.872 c0-21.44, 14.080-29.696, 31.296-18.432l 232.8,146.208
|
||||
c0,0, 8.416,5.92, 8.416,14.144S 392.096,302.144, 392.096,302.144z M 464,473.728c-28.416,0-48-8.736-48-37.152l0-297.152
|
||||
c0-28.448, 19.584-37.184, 48-37.184s 48,8.736, 48,37.184L 512,436.576 C 512,464.992, 492.416,473.728, 464,473.728z" data-tags="last, end, media control" />
|
||||
<glyph unicode="" d="M 614.4,288c0,162.592-131.808,294.4-294.4,294.4S 25.6,450.592, 25.6,288c0-162.624, 131.808-294.432, 294.4-294.432S 614.4,125.408, 614.4,288z M 89.6,288
|
||||
c0,127.232, 103.168,230.4, 230.4,230.4s 230.4-103.168, 230.4-230.4c0-127.264-103.168-230.432-230.4-230.432S 89.6,160.736, 89.6,288z M 443.2,230.4L 443.2,345.6 L 312.32,345.6 L 312.32,417.6
|
||||
L 190.4,288l 121.92-129.6L 312.32,230.4 L 443.2,230.4 z" data-tags="arrow-left, left, previous" />
|
||||
<glyph unicode="" d="M 25.6,288c0-162.592, 131.84-294.4, 294.4-294.4c 162.592,0, 294.4,131.808, 294.4,294.4C 614.4,450.592, 482.592,582.4, 320,582.4C 157.408,582.4, 25.6,450.592, 25.6,288z
|
||||
M 550.4,288c0-127.232-103.168-230.4-230.4-230.4S 89.6,160.736, 89.6,288C 89.6,415.264, 192.736,518.4, 320,518.4S 550.4,415.264, 550.4,288z M 196.8,345.6l0-115.2 l 130.88,0 l0-72
|
||||
L 449.6,288l-121.92,129.6L 327.68,345.6 L 196.8,345.6 z" data-tags="arrow-right, right, next" />
|
||||
<glyph unicode="" d="M 447.968,435.2L 448,140.8L 192,288 z" data-tags="arrow-left, left, triangle, previous" />
|
||||
<glyph unicode="" d="M 192.032,435.2L 192,140.8L 448,288 z" data-tags="arrow-right, triangle, right, next" />
|
||||
<glyph unicode="" d="M 319.52,531.2L 319.52,408.704L 544.064,408.736L 544.064,167.072L 319.52,167.072L 319.52,44.8L 76.864,288 z" data-tags="arrow-left, left, previous" />
|
||||
<glyph unicode="" d="M 320.48,531.2L 320.48,408.704L 95.936,408.736L 95.936,167.072L 320.48,167.072L 320.48,44.8L 563.136,288 z" data-tags="arrow-right, right, next" />
|
||||
<glyph unicode="" d="M 44.768,288c0-8.928, 8.928-15.328, 8.928-15.328l 238.816-158.368c 18.304-12.256, 33.344-3.264, 33.344,19.968L 325.856,441.76
|
||||
c0,23.232-15.040,32.192-33.344,20l-238.816-158.4C 53.728,303.328, 44.768,296.928, 44.768,288z M 335.2,288c0-8.928, 8.928-15.328, 8.928-15.328
|
||||
l 230.496-158.368c 18.336-12.256, 33.344-3.264, 33.344,19.968L 607.968,441.76 c0,23.232-15.008,32.192-33.344,20l-230.496-158.4
|
||||
C 344.128,303.328, 335.2,296.928, 335.2,288z" data-tags="previous, media control" />
|
||||
<glyph unicode="" d="M 586.272,303.328l-238.784,158.4C 329.152,473.952, 314.112,464.96, 314.112,441.76l0-307.488 c0-23.232, 15.040-32.224, 33.376-19.968l 238.784,158.368
|
||||
c0,0, 8.928,6.4, 8.928,15.328S 586.272,303.328, 586.272,303.328z M 295.872,303.328L 65.344,461.76C 47.040,473.952, 32.032,464.96, 32.032,441.76l0-307.488
|
||||
c0-23.232, 15.008-32.224, 33.344-19.968l 230.528,158.368c0,0, 8.928,6.4, 8.928,15.328S 295.872,303.328, 295.872,303.328z" data-tags="next, media control" />
|
||||
<glyph unicode="" d="M 559.963,212.061c-0.007,0.441-0.019,0.876-0.026,1.316c-0.020,0.892-0.044,1.784-0.074,2.675C 553.594,413.332, 320,608, 320,608
|
||||
S 86.404,413.332, 80.138,216.049c-0.027-0.894-0.055-1.782-0.075-2.676c-0.009-0.44-0.019-0.876-0.026-1.316
|
||||
c-0.022-1.35-0.035-2.702-0.035-4.060c0-1.48, 0.018-2.951, 0.044-4.424c 0.003-0.122, 0.004-0.244, 0.009-0.366
|
||||
C 82.602,72.874, 189.051-32, 320-32c 130.947,0, 237.395,104.874, 239.949,235.21c 0.003,0.122, 0.005,0.245, 0.006,0.366
|
||||
c 0.026,1.472, 0.045,2.946, 0.045,4.424C 560,209.358, 559.985,210.71, 559.963,212.061z M 479.969,205.038l-0.005-0.254
|
||||
c-0.824-42.054-17.832-81.459-47.891-110.968C 401.984,64.271, 362.179,48, 320,48c-7.789,0-15.496,0.559-23.078,1.649
|
||||
c 86.91,51.779, 145.135,146.69, 145.135,255.201c0,12.16-0.737,24.146-2.157,35.925c 25.17-46.212, 38.79-89.25, 40.001-127.266
|
||||
l 0.003-0.090c 0.020-0.593, 0.033-1.182, 0.049-1.777l 0.018-0.905C 479.988,209.826, 480,208.913, 480,208
|
||||
C 480,207.010, 479.988,206.024, 479.969,205.038z" data-tags="droplet, colors, water" />
|
||||
<glyph unicode="" d="M 274,562.286q 74.643,0 137.679-36.786t 99.821-99.821t 36.786-137.679t-36.786-137.679t-99.821-99.821t-137.679-36.786t-137.679,36.786t-99.821,99.821t-36.786,137.679t 36.786,137.679t 99.821,99.821t 137.679,36.786zM 91.143,288q0-37.143 14.464-70.893t 39.107-58.393t 58.393-39.107t 70.893-14.464l0,365.714 q-37.143,0 -70.893-14.464 t-58.393-39.107t-39.107-58.393t-14.464-70.893z" horiz-adv-x="548" data-tags="adjust, contrast" />
|
||||
<glyph unicode="" d="M 608,313.6c-5.824,0-25.568,0-31.36,0c-17.664,0-32-11.456-32-25.6s 14.336-25.6, 32-25.6c 5.824,0, 25.568,0, 31.36,0c 17.696,0, 32,11.456, 32,25.6
|
||||
S 625.696,313.6, 608,313.6z M 320,464C 222.4,464, 144,385.6, 144,288c0-97.632, 78.4-176, 176-176c 97.632,0, 176,78.368, 176,176
|
||||
C 496,385.6, 417.632,464, 320,464z M 320,160c-70.72,0-128,57.28-128,128c0,70.688, 57.28,128, 128,128s 128-57.312, 128-128C 448,217.28, 390.72,160, 320,160z M 95.328,288
|
||||
c0,14.144-13.664,25.6-31.328,25.6c-5.92,0-26.112,0-32,0c-17.664,0-32-11.456-32-25.6s 14.336-25.6, 32-25.6c 5.888,0, 26.080,0, 32,0
|
||||
C 81.664,262.4, 95.328,273.856, 95.328,288z M 320,512c 14.112,0, 25.6,14.336, 25.6,32c0,5.856,0,26.144,0,32c0,17.664-11.456,32-25.6,32S 294.4,593.664, 294.4,576
|
||||
c0-5.856,0-26.144,0-32C 294.4,526.336, 305.888,512, 320,512z M 320,64c-14.112,0-25.6-14.336-25.6-32c0-5.856,0-26.144,0-32c0-17.696, 11.456-32, 25.6-32
|
||||
s 25.6,14.304, 25.6,32c0,5.856,0,26.144,0,32C 345.6,49.664, 334.112,64, 320,64z M 555.68,487.488c 12.512,12.512, 14.528,30.752, 4.544,40.736
|
||||
s-28.224,7.968-40.704-4.544c-3.424-3.456-18.944-18.944-22.4-22.4c-12.512-12.512-14.528-30.72-4.544-40.704s 28.256-8, 40.736,4.512
|
||||
C 536.736,468.544, 552.256,484.032, 555.68,487.488z M 106.688,110.912c-3.456-3.456-18.944-18.976-22.4-22.4c-12.48-12.512-14.496-30.72-4.512-40.704
|
||||
c 9.984-9.984, 28.224-7.968, 40.704,4.512c 3.456,3.424, 18.976,18.944, 22.4,22.4c 12.512,12.512, 14.528,30.72, 4.512,40.704
|
||||
S 119.168,123.36, 106.688,110.912z M 120.512,523.712C 108,536.192, 89.792,538.24, 79.776,528.224S 71.808,500, 84.288,487.488
|
||||
c 3.456-3.456, 18.944-18.944, 22.4-22.4c 12.512-12.48, 30.72-14.528, 40.704-4.512s 8,28.224-4.512,40.704C 139.456,504.736, 123.968,520.256, 120.512,523.712z
|
||||
M 497.088,74.688c 3.456-3.456, 18.976-18.976, 22.4-22.4c 12.512-12.48, 30.752-14.496, 40.736-4.512c 9.984,9.984, 7.936,28.224-4.544,40.704
|
||||
c-3.456,3.424-18.976,18.944-22.4,22.4c-12.512,12.48-30.752,14.496-40.736,4.512S 484.64,87.2, 497.088,74.688z" data-tags="sun, brightness, lightness" />
|
||||
<glyph unicode="" d="M 410.071,207.286q0,9.286 -6.786,16.071l-64.643,64.643l 64.643,64.643q 6.786,6.786 6.786,16.071q0,9.643 -6.786,16.429l-32.143,32.143q-6.786,6.786 -16.429,6.786q-9.286,0 -16.071-6.786l-64.643-64.643l-64.643,64.643q-6.786,6.786 -16.071,6.786q-9.643,0 -16.429-6.786l-32.143-32.143q-6.786-6.786 -6.786-16.429q0-9.286 6.786-16.071l 64.643-64.643l-64.643-64.643q-6.786-6.786 -6.786-16.071q0-9.643 6.786-16.429l 32.143-32.143q 6.786-6.786 16.429-6.786 q 9.286,0 16.071,6.786l 64.643,64.643l 64.643-64.643q 6.786-6.786 16.071-6.786q 9.643,0 16.429,6.786l 32.143,32.143q 6.786,6.786 6.786,16.429zM 548.285,288q0-74.643 -36.786-137.679t-99.821-99.821t-137.679-36.786t-137.679,36.786t-99.821,99.821t-36.786,137.679t 36.786,137.679t 99.821,99.821t 137.679,36.786t 137.679-36.786t 99.821-99.821t 36.786-137.679z" horiz-adv-x="548" data-tags="remove-sign, cancel, remove, delete, close, sign" />
|
||||
<glyph unicode="" d="M 463.142,135.857q0-14.286 -10-24.286l-48.571-48.571q-10-10 -24.286-10t-24.286,10l-105,105l-105-105q-10-10 -24.286-10t-24.286,10l-48.571,48.571q-10,10 -10,24.286t 10,24.286l 105,105l-105,105q-10,10 -10,24.286t 10,24.286l 48.571,48.571q 10,10 24.286,10t 24.286-10l 105-105l 105,105q 10,10 24.286,10t 24.286-10l 48.571-48.571q 10-10 10-24.286 t-10-24.286l-105-105l 105-105q 10-10 10-24.286z" horiz-adv-x="502" data-tags="remove, cancel, close, delete, mutiply" />
|
||||
<glyph unicode="" d="M 520,448l-120,0 L 400,488 L 280,608L0,608 l0-480 l 240,0 l0-160 l 400,0 L 640,328 L 520,448z M 520,391.431L 583.431,328L 520,328 L 520,391.431 z M 280,551.431L 343.431,488L 280,488
|
||||
L 280,551.431 z M 40,568l 200,0 l0-120 l 120,0 l0-280 L 40,168 L 40,568 z M 600,8L 280,8 l0,120 l 120,0 L 400,408 l 80,0 l0-120 l 120,0 L 600,8 z" data-tags="copy, duplicate, files, pages, papers, documents" />
|
||||
<glyph unicode=" " horiz-adv-x="320" />
|
||||
</font></defs></svg>
|
After Width: | Height: | Size: 16 KiB |
BIN
reader/vendor/cbrjs/fonts.org/toolbar.eot
vendored
Normal file
110
reader/vendor/cbrjs/fonts.org/toolbar.svg
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG font generated by IcoMoon.
|
||||
<iconset grid="20"></iconset>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="toolbar" horiz-adv-x="640" >
|
||||
<font-face units-per-em="640" ascent="608" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="640" />
|
||||
<glyph class="hidden" unicode="" d="M0,608L 640 -32L0 -32 z" horiz-adv-x="0" />
|
||||
<glyph unicode="" d="M 557.574,490.426l-75.146,75.148C 459.091,588.909, 413,608, 380,608L 100,608 C 67,608, 40,581, 40,548l0-520 c0-33, 27-60, 60-60l 440,0
|
||||
c 33,0, 60,27, 60,60L 600,388 C 600,421, 580.909,467.091, 557.574,490.426z M 400,523.274c 1.373-0.503, 2.782-1.050, 4.224-1.647
|
||||
c 11.287-4.676, 19.124-10.11, 21.635-12.621l 75.148-75.149c 2.511-2.511, 7.945-10.346, 12.621-21.634c 0.597-1.441, 1.145-2.851, 1.647-4.223
|
||||
L 400,408 L 400,523.274 z M 520,48L 120,48 L 120,528 l 240,0 l0-160 l 160,0 L 520,48 z" />
|
||||
<glyph unicode="" d="M 560,488 L 80,488 L 80,88 L 560,88 L 560,488 Z M 640,568 L 640,568 L 640,8 L 0,8 L 0,568 L 640,568 ZM 520,128 L 120,128 L 120,208 L 240,408 L 404.375,208 L 520,288 L 520,248 ZM 400,388A60,60 3060 1 1 520,388A60,60 3060 1 1 400,388z" />
|
||||
<glyph unicode="" d="M 620.164,63.378L 468.569,192.311c-15.671,14.104-32.431,20.579-45.97,19.954C 458.384,254.183, 480,308.564, 480,368
|
||||
C 480,500.549, 372.549,608, 240,608C 107.453,608,0,500.549,0,368c0-132.549, 107.451-240, 240-240c 59.436,0, 113.817,21.616, 155.735,57.402
|
||||
c-0.625-13.539, 5.85-30.299, 19.954-45.97l 128.934-151.595c 22.076-24.529, 58.139-26.596, 80.138-4.598S 644.692,41.301, 620.164,63.378
|
||||
z M 240,208c-88.365,0-160,71.635-160,160S 151.635,528, 240,528s 160-71.635, 160-160S 328.366,208, 240,208zM 120,408L 360,408L 360,328L 120,328z" />
|
||||
<glyph unicode="" d="M 620.164,63.378L 468.569,192.311c-15.671,14.104-32.431,20.579-45.97,19.954C 458.384,254.183, 480,308.564, 480,368
|
||||
C 480,500.549, 372.549,608, 240,608C 107.453,608,0,500.549,0,368c0-132.549, 107.451-240, 240-240c 59.436,0, 113.817,21.616, 155.735,57.402
|
||||
c-0.625-13.539, 5.85-30.299, 19.954-45.97l 128.934-151.595c 22.076-24.529, 58.139-26.596, 80.138-4.598S 644.692,41.301, 620.164,63.378
|
||||
z M 240,208c-88.365,0-160,71.635-160,160S 151.635,528, 240,528s 160-71.635, 160-160S 328.366,208, 240,208zM 280,488L 200,488L 200,408L 120,408L 120,328L 200,328L 200,248L 280,248L 280,328L 360,328L 360,408L 280,408 z" />
|
||||
<glyph unicode="" d="M 640,608 L 640,348 L 540,448 L 420,328 L 360,388 L 480,508 L 380,608 ZM 280,188 L 160,68 L 260-32 L 0-32 L 0,228 L 100,128 L 220,248 Z" />
|
||||
<glyph unicode="" d="M 640,608 L 640,368 L 553.587,454.412 L 421.087,321.913 L 353.913,389.088 L 486.413,521.588 L 400,608 ZM 153.588,521.588 L 286.087,389.088 L 218.912,321.913 L 86.412,454.412 L 0,368 L 0,608 L 240,608 ZM 553.587,121.587 L 640,208 L 640-32 L 400-32 L 486.413,54.413 L 353.913,186.913 L 421.087,254.087 ZM 286.087,186.913 L 153.588,54.413 L 240-32 L 0-32 L 0,208 L 86.412,121.587 L 218.912,254.087 Z" />
|
||||
<glyph unicode="" d="M 520,8L 640,328L 120,328L0,8 zM 80,368 L 0,8 L 0,528 L 180,528 L 260,448 L 520,448 L 520,368 Z" />
|
||||
<glyph unicode="" d="M 0,408 L 640,408 L 600,8 L 40,8 L 0,408 Z M 580,488 L 600,448 L 40,448 L 80,528 L 300,528 L 320,488 L 580,488 Z" />
|
||||
<glyph unicode="" d="M 583.619,226.594c-33.579,58.159-13.385,132.69, 45.095,166.555l-62.891,108.933c-17.969-10.534-38.86-16.574-61.154-16.574
|
||||
c-67.21,0-121.692,54.841-121.692,122.494L 257.19,608.001 c 0.166-20.881-5.046-42.051-16.224-61.407
|
||||
c-33.578-58.16-108.222-77.939-166.789-44.224L 11.287,393.437c 18.106-10.295, 33.781-25.367, 44.929-44.674
|
||||
c 33.524-58.068, 13.445-132.45-44.817-166.39l 62.891-108.933c 17.906,10.435, 38.697,16.409, 60.875,16.409
|
||||
c 66.998,0, 121.34-54.495, 121.688-121.849l 125.784,0 c-0.054,20.671, 5.17,41.606, 16.229,60.761
|
||||
c 33.523,58.066, 107.985,77.871, 166.509,44.383l 62.891,108.931C 610.277,192.368, 594.707,207.387, 583.619,226.594z M 320,158.418
|
||||
c-71.567,0-129.585,58.015-129.585,129.584c0,71.567, 58.016,129.584, 129.585,129.584c 71.567,0, 129.582-58.016, 129.582-129.584
|
||||
C 449.581,216.433, 391.567,158.418, 320,158.418z" />
|
||||
<glyph unicode="" d="M 40,488L 600,488L 600,368L 40,368zM 40,328L 600,328L 600,208L 40,208zM 40,168L 600,168L 600,48L 40,48z" />
|
||||
<glyph unicode="" d="M 626.834,96.827l-287.845,246.725C 352.394,368.739, 360,397.479, 360,428C 360,527.411, 279.411,608, 180,608
|
||||
c-18.184,0-35.733-2.708-52.279-7.721l 103.994-103.994c 15.556-15.556, 15.556-41.013,0-56.569l-63.431-63.431
|
||||
c-15.556-15.556-41.013-15.556-56.569,0L 7.721,480.279C 2.708,463.732,0,446.184,0,428c0-99.411, 80.589-180, 180-180
|
||||
c 30.521,0, 59.261,7.606, 84.448,21.012l 246.725-287.845c 14.318-16.703, 38.76-17.641, 54.315-2.086l 63.433,63.433
|
||||
C 644.475,58.069, 643.536,82.51, 626.834,96.827z" />
|
||||
<glyph unicode="" d="M 280,528l0,10 c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,528 l0-80 l 120,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 360,0 L 640,528 L 280,528 z M 160,448L 160,528 l 80,0 l0-80 L 160,448 zM 520,338c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,328 l0-80 l 360,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 120,0 l0,80 l-120,0 L 520,338 z M 400,248l0,80 l 80,0 l0-80 L 400,248 zM 280,138c0,16.5-13.5,30-30,30l-100,0 c-16.5,0-30-13.5-30-30l0-10 L0,128 l0-80 l 120,0 l0-10 c0-16.5, 13.5-30, 30-30l 100,0 c 16.5,0, 30,13.5, 30,30l0,10
|
||||
l 360,0 l0,80 L 280,128 L 280,138 z M 160,48l0,80 l 80,0 l0-80 L 160,48 z" />
|
||||
<glyph unicode="" d="M 546.264,514.263C 488.356,572.172, 408.366,608, 320,608C 182.82,608, 65.819,521.67, 20.314,400.382l 74.922-28.096
|
||||
C 129.364,463.252, 217.115,528, 320,528c 66.275,0, 126.263-26.875, 169.691-70.309L 400,368l 240,0 L 640,608 L 546.264,514.263zM 320,48c-66.275,0-126.266,26.87-169.695,70.305L 240,208L0,208 l0-240 l 93.746,93.746C 151.65,3.832, 231.633-32, 320-32
|
||||
c 137.181,0, 254.183,86.33, 299.688,207.618l-74.922,28.096C 510.637,112.748, 422.886,48, 320,48z" />
|
||||
<glyph unicode="" d="M 640,448c0,88.32-71.72,160-160,160c-59.68,0-111.24-33.16-138.76-81.72c0,0.040, 0.080,0.080, 0.080,0.12
|
||||
c-7.34,0.7-14.46,2.22-21.96,2.22c-132.58,0-240-107.42-240-240c0-50.54, 15.78-97.34, 42.42-135.94L0-32l 185.78,121.24
|
||||
c 38.2-25.62, 84.14-40.62, 133.6-40.62c 132.58,0, 240,107.42, 240,240c0,6.92-1.4,13.4-2.040,20.16C 606.4,336.12, 640,387.88, 640,448z
|
||||
M 319.38,128.62c-88.28,0-160,71.72-160,160c0,88.24, 71.72,160, 160,160c 0.24,0, 0.46-0.080, 0.62-0.080c0,0.16, 0.080,0.28, 0.080,0.4
|
||||
C 320.080,448.62, 320,448.32, 320,448c0-13.9, 2.34-27.1, 5.62-39.96l-63.44-63.48c-31.24-31.24-31.24-81.88,0-113.12s 81.88-31.24, 113.12,0
|
||||
l 62.82,62.82c 13.2-3.6, 26.88-6.1, 41.18-6.18C 478.98,200.040, 407.42,128.62, 319.38,128.62z M 480,368c-44.060,0-80,35.9-80,80
|
||||
s 35.94,80, 80,80s 80-35.9, 80-80S 524.060,368, 480,368z" />
|
||||
<glyph unicode="" d="M 239.52,288c0-8.256, 8.384-14.144, 8.384-14.144l 232.8-146.208C 497.952,116.352, 512,124.672, 512,146.048L 512,429.952
|
||||
c0,21.408-14.048,29.728-31.296,18.432l-232.8-146.24C 247.904,302.112, 239.52,296.256, 239.52,288z M 128,436.576l0-297.152 c0-28.416, 19.584-37.12, 48-37.12
|
||||
S 224,111.008, 224,139.392L 224,436.576 c0,28.448-19.584,37.152-48,37.152S 128,464.992, 128,436.576z" />
|
||||
<glyph unicode="" d="M 392.096,302.144l-232.8,146.24C 142.080,459.648, 128,451.36, 128,429.92l0-283.872 c0-21.44, 14.080-29.696, 31.296-18.432l 232.8,146.208
|
||||
c0,0, 8.416,5.92, 8.416,14.144S 392.096,302.144, 392.096,302.144z M 464,473.728c-28.416,0-48-8.736-48-37.152l0-297.152
|
||||
c0-28.448, 19.584-37.184, 48-37.184s 48,8.736, 48,37.184L 512,436.576 C 512,464.992, 492.416,473.728, 464,473.728z" />
|
||||
<glyph unicode="" d="M 614.4,288c0,162.592-131.808,294.4-294.4,294.4S 25.6,450.592, 25.6,288c0-162.624, 131.808-294.432, 294.4-294.432S 614.4,125.408, 614.4,288z M 89.6,288
|
||||
c0,127.232, 103.168,230.4, 230.4,230.4s 230.4-103.168, 230.4-230.4c0-127.264-103.168-230.432-230.4-230.432S 89.6,160.736, 89.6,288z M 443.2,230.4L 443.2,345.6 L 312.32,345.6 L 312.32,417.6
|
||||
L 190.4,288l 121.92-129.6L 312.32,230.4 L 443.2,230.4 z" />
|
||||
<glyph unicode="" d="M 25.6,288c0-162.592, 131.84-294.4, 294.4-294.4c 162.592,0, 294.4,131.808, 294.4,294.4C 614.4,450.592, 482.592,582.4, 320,582.4C 157.408,582.4, 25.6,450.592, 25.6,288z
|
||||
M 550.4,288c0-127.232-103.168-230.4-230.4-230.4S 89.6,160.736, 89.6,288C 89.6,415.264, 192.736,518.4, 320,518.4S 550.4,415.264, 550.4,288z M 196.8,345.6l0-115.2 l 130.88,0 l0-72
|
||||
L 449.6,288l-121.92,129.6L 327.68,345.6 L 196.8,345.6 z" />
|
||||
<glyph unicode="" d="M 447.968,435.2L 448,140.8L 192,288 z" />
|
||||
<glyph unicode="" d="M 192.032,435.2L 192,140.8L 448,288 z" />
|
||||
<glyph unicode="" d="M 319.52,531.2L 319.52,408.704L 544.064,408.736L 544.064,167.072L 319.52,167.072L 319.52,44.8L 76.864,288 z" />
|
||||
<glyph unicode="" d="M 320.48,531.2L 320.48,408.704L 95.936,408.736L 95.936,167.072L 320.48,167.072L 320.48,44.8L 563.136,288 z" />
|
||||
<glyph unicode="" d="M 44.768,288c0-8.928, 8.928-15.328, 8.928-15.328l 238.816-158.368c 18.304-12.256, 33.344-3.264, 33.344,19.968L 325.856,441.76
|
||||
c0,23.232-15.040,32.192-33.344,20l-238.816-158.4C 53.728,303.328, 44.768,296.928, 44.768,288z M 335.2,288c0-8.928, 8.928-15.328, 8.928-15.328
|
||||
l 230.496-158.368c 18.336-12.256, 33.344-3.264, 33.344,19.968L 607.968,441.76 c0,23.232-15.008,32.192-33.344,20l-230.496-158.4
|
||||
C 344.128,303.328, 335.2,296.928, 335.2,288z" />
|
||||
<glyph unicode="" d="M 586.272,303.328l-238.784,158.4C 329.152,473.952, 314.112,464.96, 314.112,441.76l0-307.488 c0-23.232, 15.040-32.224, 33.376-19.968l 238.784,158.368
|
||||
c0,0, 8.928,6.4, 8.928,15.328S 586.272,303.328, 586.272,303.328z M 295.872,303.328L 65.344,461.76C 47.040,473.952, 32.032,464.96, 32.032,441.76l0-307.488
|
||||
c0-23.232, 15.008-32.224, 33.344-19.968l 230.528,158.368c0,0, 8.928,6.4, 8.928,15.328S 295.872,303.328, 295.872,303.328z" />
|
||||
<glyph unicode="" d="M 559.963,212.061c-0.007,0.441-0.019,0.876-0.026,1.316c-0.020,0.892-0.044,1.784-0.074,2.675C 553.594,413.332, 320,608, 320,608
|
||||
S 86.404,413.332, 80.138,216.049c-0.027-0.894-0.055-1.782-0.075-2.676c-0.009-0.44-0.019-0.876-0.026-1.316
|
||||
c-0.022-1.35-0.035-2.702-0.035-4.060c0-1.48, 0.018-2.951, 0.044-4.424c 0.003-0.122, 0.004-0.244, 0.009-0.366
|
||||
C 82.602,72.874, 189.051-32, 320-32c 130.947,0, 237.395,104.874, 239.949,235.21c 0.003,0.122, 0.005,0.245, 0.006,0.366
|
||||
c 0.026,1.472, 0.045,2.946, 0.045,4.424C 560,209.358, 559.985,210.71, 559.963,212.061z M 479.969,205.038l-0.005-0.254
|
||||
c-0.824-42.054-17.832-81.459-47.891-110.968C 401.984,64.271, 362.179,48, 320,48c-7.789,0-15.496,0.559-23.078,1.649
|
||||
c 86.91,51.779, 145.135,146.69, 145.135,255.201c0,12.16-0.737,24.146-2.157,35.925c 25.17-46.212, 38.79-89.25, 40.001-127.266
|
||||
l 0.003-0.090c 0.020-0.593, 0.033-1.182, 0.049-1.777l 0.018-0.905C 479.988,209.826, 480,208.913, 480,208
|
||||
C 480,207.010, 479.988,206.024, 479.969,205.038z" />
|
||||
<glyph unicode="" d="M 274,562.286q 74.643,0 137.679-36.786t 99.821-99.821t 36.786-137.679t-36.786-137.679t-99.821-99.821t-137.679-36.786t-137.679,36.786t-99.821,99.821t-36.786,137.679t 36.786,137.679t 99.821,99.821t 137.679,36.786zM 91.143,288q0-37.143 14.464-70.893t 39.107-58.393t 58.393-39.107t 70.893-14.464l0,365.714 q-37.143,0 -70.893-14.464 t-58.393-39.107t-39.107-58.393t-14.464-70.893z" horiz-adv-x="548" />
|
||||
<glyph unicode="" d="M 608,313.6c-5.824,0-25.568,0-31.36,0c-17.664,0-32-11.456-32-25.6s 14.336-25.6, 32-25.6c 5.824,0, 25.568,0, 31.36,0c 17.696,0, 32,11.456, 32,25.6
|
||||
S 625.696,313.6, 608,313.6z M 320,464C 222.4,464, 144,385.6, 144,288c0-97.632, 78.4-176, 176-176c 97.632,0, 176,78.368, 176,176
|
||||
C 496,385.6, 417.632,464, 320,464z M 320,160c-70.72,0-128,57.28-128,128c0,70.688, 57.28,128, 128,128s 128-57.312, 128-128C 448,217.28, 390.72,160, 320,160z M 95.328,288
|
||||
c0,14.144-13.664,25.6-31.328,25.6c-5.92,0-26.112,0-32,0c-17.664,0-32-11.456-32-25.6s 14.336-25.6, 32-25.6c 5.888,0, 26.080,0, 32,0
|
||||
C 81.664,262.4, 95.328,273.856, 95.328,288z M 320,512c 14.112,0, 25.6,14.336, 25.6,32c0,5.856,0,26.144,0,32c0,17.664-11.456,32-25.6,32S 294.4,593.664, 294.4,576
|
||||
c0-5.856,0-26.144,0-32C 294.4,526.336, 305.888,512, 320,512z M 320,64c-14.112,0-25.6-14.336-25.6-32c0-5.856,0-26.144,0-32c0-17.696, 11.456-32, 25.6-32
|
||||
s 25.6,14.304, 25.6,32c0,5.856,0,26.144,0,32C 345.6,49.664, 334.112,64, 320,64z M 555.68,487.488c 12.512,12.512, 14.528,30.752, 4.544,40.736
|
||||
s-28.224,7.968-40.704-4.544c-3.424-3.456-18.944-18.944-22.4-22.4c-12.512-12.512-14.528-30.72-4.544-40.704s 28.256-8, 40.736,4.512
|
||||
C 536.736,468.544, 552.256,484.032, 555.68,487.488z M 106.688,110.912c-3.456-3.456-18.944-18.976-22.4-22.4c-12.48-12.512-14.496-30.72-4.512-40.704
|
||||
c 9.984-9.984, 28.224-7.968, 40.704,4.512c 3.456,3.424, 18.976,18.944, 22.4,22.4c 12.512,12.512, 14.528,30.72, 4.512,40.704
|
||||
S 119.168,123.36, 106.688,110.912z M 120.512,523.712C 108,536.192, 89.792,538.24, 79.776,528.224S 71.808,500, 84.288,487.488
|
||||
c 3.456-3.456, 18.944-18.944, 22.4-22.4c 12.512-12.48, 30.72-14.528, 40.704-4.512s 8,28.224-4.512,40.704C 139.456,504.736, 123.968,520.256, 120.512,523.712z
|
||||
M 497.088,74.688c 3.456-3.456, 18.976-18.976, 22.4-22.4c 12.512-12.48, 30.752-14.496, 40.736-4.512c 9.984,9.984, 7.936,28.224-4.544,40.704
|
||||
c-3.456,3.424-18.976,18.944-22.4,22.4c-12.512,12.48-30.752,14.496-40.736,4.512S 484.64,87.2, 497.088,74.688z" />
|
||||
<glyph unicode="" d="M 410.071,207.286q0,9.286 -6.786,16.071l-64.643,64.643l 64.643,64.643q 6.786,6.786 6.786,16.071q0,9.643 -6.786,16.429l-32.143,32.143q-6.786,6.786 -16.429,6.786q-9.286,0 -16.071-6.786l-64.643-64.643l-64.643,64.643q-6.786,6.786 -16.071,6.786q-9.643,0 -16.429-6.786l-32.143-32.143q-6.786-6.786 -6.786-16.429q0-9.286 6.786-16.071l 64.643-64.643l-64.643-64.643q-6.786-6.786 -6.786-16.071q0-9.643 6.786-16.429l 32.143-32.143q 6.786-6.786 16.429-6.786 q 9.286,0 16.071,6.786l 64.643,64.643l 64.643-64.643q 6.786-6.786 16.071-6.786q 9.643,0 16.429,6.786l 32.143,32.143q 6.786,6.786 6.786,16.429zM 548.285,288q0-74.643 -36.786-137.679t-99.821-99.821t-137.679-36.786t-137.679,36.786t-99.821,99.821t-36.786,137.679t 36.786,137.679t 99.821,99.821t 137.679,36.786t 137.679-36.786t 99.821-99.821t 36.786-137.679z" horiz-adv-x="548" />
|
||||
<glyph unicode="" d="M 463.142,135.857q0-14.286 -10-24.286l-48.571-48.571q-10-10 -24.286-10t-24.286,10l-105,105l-105-105q-10-10 -24.286-10t-24.286,10l-48.571,48.571q-10,10 -10,24.286t 10,24.286l 105,105l-105,105q-10,10 -10,24.286t 10,24.286l 48.571,48.571q 10,10 24.286,10t 24.286-10l 105-105l 105,105q 10,10 24.286,10t 24.286-10l 48.571-48.571q 10-10 10-24.286 t-10-24.286l-105-105l 105-105q 10-10 10-24.286z" horiz-adv-x="502" />
|
||||
<glyph unicode="" d="M 520,448l-120,0 L 400,488 L 280,608L0,608 l0-480 l 240,0 l0-160 l 400,0 L 640,328 L 520,448z M 520,391.431L 583.431,328L 520,328 L 520,391.431 z M 280,551.431L 343.431,488L 280,488
|
||||
L 280,551.431 z M 40,568l 200,0 l0-120 l 120,0 l0-280 L 40,168 L 40,568 z M 600,8L 280,8 l0,120 l 120,0 L 400,408 l 80,0 l0-120 l 120,0 L 600,8 z" />
|
||||
<glyph unicode=" " horiz-adv-x="320" />
|
||||
</font></defs></svg>
|
After Width: | Height: | Size: 15 KiB |
BIN
reader/vendor/cbrjs/fonts.org/toolbar.ttf
vendored
Normal file
BIN
reader/vendor/cbrjs/fonts.org/toolbar.woff
vendored
Normal file
BIN
reader/vendor/cbrjs/fonts/icomoon.eot
vendored
Normal file
80
reader/vendor/cbrjs/fonts/icomoon.svg
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="featured_play_list" d="M512 640.667v84h-384v-84h384zM512 468.667v86h-384v-86h384zM896 810.667c46 0 86-40 86-86v-596c0-46-40-86-86-86h-768c-46 0-86 40-86 86v596c0 46 40 86 86 86h768z" />
|
||||
<glyph unicode="" glyph-name="content_copy" d="M810 42.667v598h-468v-598h468zM810 724.667c46 0 86-38 86-84v-598c0-46-40-86-86-86h-468c-46 0-86 40-86 86v598c0 46 40 84 86 84h468zM682 896.667v-86h-512v-598h-84v598c0 46 38 86 84 86h512z" />
|
||||
<glyph unicode="" glyph-name="unarchive" d="M218 724.667h588l-40 44h-512zM512 532.667l-234-234h148v-86h172v86h148zM876 716.667c12-14 20-36 20-56v-532c0-46-40-86-86-86h-596c-48 0-86 40-86 86v532c0 20 8 42 20 56l58 70c12 14 30 24 50 24h512c20 0 38-10 50-24z" />
|
||||
<glyph unicode="" glyph-name="brightness_low" d="M512 170.667c142 0 256 114 256 256s-114 256-256 256-256-114-256-256 114-256 256-256zM854 284.667v-200h-200l-142-140-142 140h-200v200l-140 142 140 142v200h200l142 140 142-140h200v-200l140-142z" />
|
||||
<glyph unicode="" glyph-name="format_list_bulleted" d="M298 724.667h598v-84h-598v84zM298 384.667v84h598v-84h-598zM298 128.667v84h598v-84h-598zM170 234.667c36 0 64-30 64-64s-30-64-64-64-64 30-64 64 28 64 64 64zM170 746.667c36 0 64-28 64-64s-28-64-64-64-64 28-64 64 28 64 64 64zM170 490.667c36 0 64-28 64-64s-28-64-64-64-64 28-64 64 28 64 64 64z" />
|
||||
<glyph unicode="" glyph-name="format_list_numbered" d="M298 384.667v84h598v-84h-598zM298 128.667v84h598v-84h-598zM298 724.667h598v-84h-598v84zM86 468.667v44h128v-40l-78-88h78v-44h-128v40l76 88h-76zM128 596.667v128h-42v44h84v-172h-42zM86 212.667v44h128v-172h-128v44h84v20h-42v44h42v20h-84z" />
|
||||
<glyph unicode="" glyph-name="format_textdirection_l_to_r" d="M896 170.667l-170-170v128h-512v84h512v128zM384 512.667c-94 0-170 76-170 170s76 170 170 170h342v-84h-86v-470h-86v470h-84v-470h-86v214z" />
|
||||
<glyph unicode="" glyph-name="format_textdirection_r_to_l" d="M342 212.667h512v-84h-512v-128l-172 170 172 170v-128zM426 512.667c-94 0-170 76-170 170s76 170 170 170h342v-84h-86v-470h-84v470h-86v-470h-86v214z" />
|
||||
<glyph unicode="" glyph-name="mode_edit" d="M884 638.667l-78-78-160 160 78 78c16 16 44 16 60 0l100-100c16-16 16-44 0-60zM128 202.667l472 472 160-160-472-472h-160v160z" />
|
||||
<glyph unicode="" glyph-name="cloud_download" d="M726 384.667h-128v170h-172v-170h-128l214-214zM826 510.667c110-8 198-100 198-212 0-118-96-214-214-214h-554c-142 0-256 114-256 256 0 132 100 240 228 254 54 102 160 174 284 174 156 0 284-110 314-258z" />
|
||||
<glyph unicode="" glyph-name="keyboard_arrow_left" d="M658 252.667l-60-60-256 256 256 256 60-60-196-196z" />
|
||||
<glyph unicode="" glyph-name="keyboard_arrow_right" d="M366 240.667l196 196-196 196 60 60 256-256-256-256z" />
|
||||
<glyph unicode="" glyph-name="crop_free" d="M810 810.667c46 0 86-40 86-86v-170h-86v170h-170v86h170zM810 128.667v170h86v-170c0-46-40-86-86-86h-170v86h170zM214 298.667v-170h170v-86h-170c-46 0-86 40-86 86v170h86zM128 724.667c0 46 40 86 86 86h170v-86h-170v-170h-86v170z" />
|
||||
<glyph unicode="" glyph-name="crop_portrait" d="M726 128.667v596h-428v-596h428zM726 810.667c46 0 84-40 84-86v-596c0-46-38-86-84-86h-428c-46 0-84 40-84 86v596c0 46 38 86 84 86h428z" />
|
||||
<glyph unicode="" glyph-name="dehaze" d="M86 704.667h852v-86h-852v86zM86 490.667h852v-86h-852v86zM86 276.667h852v-84h-852v84z" />
|
||||
<glyph unicode="" glyph-name="navigate_before" d="M658 622.667l-196-196 196-196-60-60-256 256 256 256z" />
|
||||
<glyph unicode="" glyph-name="navigate_next" d="M426 682.667l256-256-256-256-60 60 196 196-196 196z" />
|
||||
<glyph unicode="" glyph-name="tune" d="M640 554.667v256h86v-86h170v-84h-170v-86h-86zM896 384.667h-426v84h426v-84zM298 554.667h86v-256h-86v86h-170v84h170v86zM554 42.667h-84v256h84v-86h342v-84h-342v-86zM128 724.667h426v-84h-426v84zM128 212.667h256v-84h-256v84z" />
|
||||
<glyph unicode="" glyph-name="wb_sunny" d="M152 146.667l76 78 60-60-76-78zM470-19.333v126h84v-126h-84zM512 704.667c142 0 256-114 256-256s-114-256-256-256-256 114-256 256 114 256 256 256zM854 490.667h128v-86h-128v86zM736 164.667l60 58 76-76-60-60zM872 748.667l-76-76-60 60 76 76zM554 914.667v-126h-84v126h84zM170 490.667v-86h-128v86h128zM288 732.667l-60-60-76 76 60 60z" />
|
||||
<glyph unicode="" glyph-name="local_library" d="M512 596.667c-70 0-128 58-128 128s58 128 128 128 128-58 128-128-58-128-128-128zM512 446.667c100 94 236 150 384 150v-468c-148 0-284-58-384-152-100 94-236 152-384 152v468c148 0 284-56 384-150z" />
|
||||
<glyph unicode="" glyph-name="rate_review" d="M768 340.667v86h-234l-86-86h320zM256 340.667h106l294 294c8 8 8 22 0 30l-76 76c-8 8-22 8-30 0l-294-294v-106zM854 852.667c46 0 84-38 84-84v-512c0-46-38-86-84-86h-598l-170-170v768c0 46 38 84 84 84h684z" />
|
||||
<glyph unicode="" glyph-name="zoom_out_map" d="M896 298.667v-256h-256l98 98-124 122 62 62 122-124zM384 42.667h-256v256l98-98 122 124 62-62-124-122zM128 554.667v256h256l-98-98 124-122-62-62-122 124zM640 810.667h256v-256l-98 98-122-124-62 62 124 122z" />
|
||||
<glyph unicode="" glyph-name="arrow_back" d="M854 468.667v-84h-520l238-240-60-60-342 342 342 342 60-60-238-240h520z" />
|
||||
<glyph unicode="" glyph-name="arrow_forward" d="M512 768.667l342-342-342-342-60 60 238 240h-520v84h520l-238 240z" />
|
||||
<glyph unicode="" glyph-name="cancel" d="M726 272.667l-154 154 154 154-60 60-154-154-154 154-60-60 154-154-154-154 60-60 154 154 154-154zM512 852.667c236 0 426-190 426-426s-190-426-426-426-426 190-426 426 190 426 426 426z" />
|
||||
<glyph unicode="" glyph-name="close" d="M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z" />
|
||||
<glyph unicode="" glyph-name="fullscreen" d="M598 724.667h212v-212h-84v128h-128v84zM726 212.667v128h84v-212h-212v84h128zM214 512.667v212h212v-84h-128v-128h-84zM298 340.667v-128h128v-84h-212v212h84z" />
|
||||
<glyph unicode="" glyph-name="fullscreen_exit" d="M682 596.667h128v-84h-212v212h84v-128zM598 128.667v212h212v-84h-128v-128h-84zM342 596.667v128h84v-212h-212v84h128zM214 256.667v84h212v-212h-84v128h-128z" />
|
||||
<glyph unicode="" glyph-name="menu" d="M128 682.667h768v-86h-768v86zM128 384.667v84h768v-84h-768zM128 170.667v86h768v-86h-768z" />
|
||||
<glyph unicode="" glyph-name="sync" d="M512 170.667v128l170-170-170-172v128c-188 0-342 154-342 342 0 66 20 130 54 182l62-62c-20-36-30-76-30-120 0-142 114-256 256-256zM512 768.667c188 0 342-154 342-342 0-66-20-130-54-182l-62 62c20 36 30 76 30 120 0 142-114 256-256 256v-128l-170 170 170 172v-128z" />
|
||||
<glyph unicode="" glyph-name="pages" d="M810 810.667c46 0 86-40 86-86v-256h-214l44 172-172-44v214h256zM726 212.667l-44 172h214v-256c0-46-40-86-86-86h-256v214zM342 384.667l-44-172 172 44v-214h-256c-46 0-86 40-86 86v256h214zM128 724.667c0 46 40 86 86 86h256v-214l-172 44 44-172h-214v256z" />
|
||||
<glyph unicode="" glyph-name="icon-fit-window" d="M514.011 433.334v-13.333h13.333v13.333zM515.345 432h10.667v-10.667h-10.667zM512.678 429.334l-2.667-2.667 2.667-2.667zM528.678 429.334v-5.333l2.667 2.667zM215.333 727.797v-596.384h596.384v596.384zM274.972 668.159h477.107v-477.107h-477.107zM155.695 548.882l-119.277-119.277 119.277-119.277zM871.356 548.882v-238.554l119.277 119.277zM811.717 727.797h-596.384v-596.384h596.384zM752.079 668.159v-477.107h-477.107v477.107zM632.802 787.435l-119.277 119.277-119.277-119.277zM632.802 71.774h-238.554l119.277-119.277z" />
|
||||
<glyph unicode="" glyph-name="icon-fit-width" d="M514.011 433.334v-13.333h13.333v13.333zM515.345 432h10.667v-10.667h-10.667zM512.678 429.334l-2.667-2.667 2.667-2.667zM528.678 429.334v-5.333l2.667 2.667zM215.333 727.797v-596.384h596.384v596.384zM274.972 668.159h477.107v-477.107h-477.107zM155.695 548.882l-119.277-119.277 119.277-119.277zM871.356 548.882v-238.554l119.277 119.277z" />
|
||||
<glyph unicode="" glyph-name="build" d="M968 128.667c18-12 18-42-4-60l-98-98c-18-18-42-18-60 0l-388 388c-98-38-212-18-294 64-86 86-108 214-56 316l188-184 128 128-184 184c102 46 230 30 316-56 82-82 102-196 64-294z" />
|
||||
<glyph unicode="" glyph-name="double_page_mode" d="M125.831 770.49c-46 0-86-40-86-86v-554c0-46 40-86 86-86h768c46 0 86 40 86 86v554c0 46-40 86-86 86h-768zM112.497 684.49h384v-554h-384v554zM523.164 684.49h384v-554h-384v554zM154.497 534.49v-64h300v64h-300zM565.164 534.49v-64h300v64h-300zM154.497 428.49v-64h300v64h-300zM565.164 428.49v-64h300v64h-300zM154.497 322.49v-64h300v64h-300zM565.164 322.49v-64h300v64h-300z" />
|
||||
<glyph unicode="" glyph-name="single_page_mode" d="M704 128.667v554h-384v-554zM896 768.667c46 0 86-40 86-86v-554c0-46-40-86-86-86h-768c-46 0-86 40-86 86v554c0 46 40 86 86 86zM362 320.667h300v-64h-300zM362 532.667h300v-64h-300zM362 426.667h300v-64h-300z" />
|
||||
<glyph unicode="" glyph-name="dns" d="M298 554.667c46 0 86 40 86 86s-40 84-86 84-84-38-84-84 38-86 84-86zM854 810.667c24 0 42-18 42-42v-256c0-24-18-44-42-44h-684c-24 0-42 20-42 44v256c0 24 18 42 42 42h684zM298 128.667c46 0 86 38 86 84s-40 86-86 86-84-40-84-86 38-84 84-84zM854 384.667c24 0 42-20 42-44v-256c0-24-18-42-42-42h-684c-24 0-42 18-42 42v256c0 24 18 44 42 44h684z" />
|
||||
<glyph unicode="" glyph-name="exit_to_app" d="M810 810.667c46 0 86-40 86-86v-596c0-46-40-86-86-86h-596c-48 0-86 40-86 86v170h86v-170h596v596h-596v-170h-86v170c0 46 38 86 86 86h596zM430 272.667l110 112h-412v84h412l-110 112 60 60 214-214-214-214z" />
|
||||
<glyph unicode="" glyph-name="list" d="M298 640.667h598v-86h-598v86zM298 212.667v86h598v-86h-598zM298 384.667v84h598v-84h-598zM128 554.667v86h86v-86h-86zM128 212.667v86h86v-86h-86zM128 384.667v84h86v-84h-86z" />
|
||||
<glyph unicode="" glyph-name="open_with" d="M598 298.667v-128h128l-214-214-214 214h128v128h172zM982 426.667l-214-214v128h-128v172h128v128zM384 512.667v-172h-128v-128l-214 214 214 214v-128h128zM426 554.667v128h-128l214 214 214-214h-128v-128h-172z" />
|
||||
<glyph unicode="" glyph-name="search" d="M406 340.667c106 0 192 86 192 192s-86 192-192 192-192-86-192-192 86-192 192-192zM662 340.667l212-212-64-64-212 212v34l-12 12c-48-42-112-66-180-66-154 0-278 122-278 276s124 278 278 278 276-124 276-278c0-68-24-132-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="settings" d="M512 276.667c82 0 150 68 150 150s-68 150-150 150-150-68-150-150 68-150 150-150zM830 384.667l90-70c8-6 10-18 4-28l-86-148c-6-10-16-12-26-8l-106 42c-22-16-46-32-72-42l-16-112c-2-10-10-18-20-18h-172c-10 0-18 8-20 18l-16 112c-26 10-50 24-72 42l-106-42c-10-4-20-2-26 8l-86 148c-6 10-4 22 4 28l90 70c-2 14-2 28-2 42s0 28 2 42l-90 70c-8 6-10 18-4 28l86 148c6 10 16 12 26 8l106-42c22 16 46 32 72 42l16 112c2 10 10 18 20 18h172c10 0 18-8 20-18l16-112c26-10 50-24 72-42l106 42c10 4 20 2 26-8l86-148c6-10 4-22-4-28l-90-70c2-14 2-28 2-42s0-28-2-42z" />
|
||||
<glyph unicode="" glyph-name="settings_overscan" d="M896 126.667v600h-768v-600h768zM896 810.667c46 0 86-40 86-86v-596c0-46-40-86-86-86h-768c-46 0-86 40-86 86v596c0 46 40 86 86 86h768zM598 256.667l-86-108-86 108h172zM256 512.667v-172l-106 86zM768 512.667l106-86-106-86v172zM512 704.667l86-108h-172z" />
|
||||
<glyph unicode="" glyph-name="turned_in" d="M726 810.667c46 0 84-40 84-86v-682l-298 128-298-128v682c0 46 38 86 84 86h428z" />
|
||||
<glyph unicode="" glyph-name="turned_in_not" d="M726 170.667v554h-428v-554l214 94zM726 810.667c46 0 84-40 84-86v-682l-298 128-298-128v682c0 46 38 86 84 86h428z" />
|
||||
<glyph unicode="" glyph-name="zoom_in" d="M512 512.667h-86v-86h-42v86h-86v42h86v86h42v-86h86v-42zM406 340.667c106 0 192 86 192 192s-86 192-192 192-192-86-192-192 86-192 192-192zM662 340.667l212-212-64-64-212 212v34l-12 12c-48-42-112-66-180-66-154 0-278 122-278 276s124 278 278 278 276-124 276-278c0-68-24-132-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="zoom_out" d="M298 554.667h214v-42h-214v42zM406 340.667c106 0 192 86 192 192s-86 192-192 192-192-86-192-192 86-192 192-192zM662 340.667l212-212-64-64-212 212v34l-12 12c-48-42-112-66-180-66-154 0-278 122-278 276s124 278 278 278 276-124 276-278c0-68-24-132-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="droplet" d="M864.626 486.838c-65.754 183.44-205.11 348.15-352.626 473.162-147.516-125.012-286.87-289.722-352.626-473.162-40.664-113.436-44.682-236.562 12.584-345.4 65.846-125.14 198.632-205.438 340.042-205.438s274.196 80.298 340.040 205.44c57.27 108.838 53.25 231.962 12.586 345.398zM738.764 201.044c-43.802-83.252-132.812-137.044-226.764-137.044-55.12 0-108.524 18.536-152.112 50.652 13.242-1.724 26.632-2.652 40.112-2.652 117.426 0 228.668 67.214 283.402 171.242 44.878 85.292 40.978 173.848 23.882 244.338 14.558-28.15 26.906-56.198 36.848-83.932 22.606-63.062 40.024-156.34-5.368-242.604z" />
|
||||
<glyph unicode="" glyph-name="box-remove" d="M832 896h-640l-192-192v-672c0-17.674 14.326-32 32-32h960c17.672 0 32 14.326 32 32v672l-192 192zM640 320v-192h-256v192h-192l320 256 320-256h-192zM154.51 768l64 64h586.976l64-64h-714.976z" />
|
||||
<glyph unicode="" glyph-name="download" d="M512 384l256 256h-192v256h-128v-256h-192zM744.726 488.728l-71.74-71.742 260.080-96.986-421.066-157.018-421.066 157.018 260.080 96.986-71.742 71.742-279.272-104.728v-256l512-192 512 192v256z" />
|
||||
<glyph unicode="" glyph-name="spinner" d="M384 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM655.53 719.53c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM832 448c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM719.53 176.47c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM448.002 64c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM176.472 176.47c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM144.472 719.53c0 0 0 0 0 0 0 53.019 42.981 96 96 96s96-42.981 96-96c0 0 0 0 0 0 0-53.019-42.981-96-96-96s-96 42.981-96 96zM56 448c0 39.765 32.235 72 72 72s72-32.235 72-72c0-39.765-32.235-72-72-72s-72 32.235-72 72z" />
|
||||
<glyph unicode="" glyph-name="spinner3" d="M512 656.904c-32.964 0-59.686 26.724-59.686 59.686v179.060c0 32.964 26.722 59.686 59.686 59.686 32.962 0 59.688-26.722 59.688-59.686v-179.060c0-32.964-26.726-59.686-59.688-59.686zM512-36.956c-20.602 0-37.304 16.702-37.304 37.304v179.060c0 20.602 16.702 37.304 37.304 37.304 20.604 0 37.304-16.704 37.304-37.304v-179.060c0-20.602-16.7-37.304-37.304-37.304zM377.756 624.64c-19.34 0-38.146 10.034-48.512 27.988l-89.53 155.070c-15.452 26.764-6.282 60.986 20.482 76.438 26.762 15.45 60.986 6.284 76.438-20.482l89.53-155.072c15.452-26.764 6.282-60.986-20.482-76.438-8.81-5.084-18.432-7.504-27.926-7.504zM735.856 26.744c-11.602 0-22.886 6.022-29.108 16.792l-89.53 155.070c-9.27 16.056-3.77 36.592 12.29 45.864 16.056 9.264 36.59 3.77 45.864-12.292l89.532-155.068c9.27-16.058 3.768-36.592-12.292-45.864-5.286-3.048-11.060-4.502-16.756-4.502zM279.344 530.060c-8.86 0-17.838 2.256-26.064 7.006l-155.072 89.53c-24.978 14.422-33.538 46.362-19.116 71.342 14.42 24.978 46.364 33.538 71.342 19.116l155.070-89.53c24.98-14.422 33.538-46.362 19.116-71.34-9.668-16.756-27.226-26.124-45.276-26.124zM899.648 194.326c-5.064 0-10.196 1.29-14.894 4.004l-155.068 89.53c-14.274 8.24-19.164 26.494-10.924 40.768 8.242 14.276 26.496 19.166 40.766 10.924l155.070-89.532c14.274-8.24 19.164-26.492 10.924-40.766-5.53-9.574-15.562-14.928-25.874-14.928zM243.41 399.504h-179.060c-26.784 0-48.496 21.712-48.496 48.496s21.712 48.496 48.496 48.496h179.060c26.784 0 48.496-21.712 48.496-48.496s-21.712-48.496-48.496-48.496zM959.65 418.156c-0.002 0 0 0 0 0h-179.060c-16.482 0.002-29.844 13.364-29.844 29.844s13.364 29.844 29.844 29.844c0.002 0 0 0 0 0h179.060c16.482 0 29.844-13.362 29.844-29.844 0-16.48-13.364-29.844-29.844-29.844zM124.366 179.402c-15.472 0-30.518 8.028-38.81 22.39-12.362 21.41-5.026 48.79 16.384 61.148l155.072 89.532c21.41 12.368 48.79 5.028 61.15-16.384 12.362-21.412 5.026-48.79-16.384-61.15l-155.072-89.53c-7.050-4.070-14.748-6.006-22.34-6.006zM744.632 552.448c-10.314 0-20.346 5.352-25.874 14.926-8.24 14.274-3.35 32.526 10.924 40.768l155.070 89.528c14.272 8.236 32.526 3.352 40.768-10.922 8.24-14.274 3.35-32.526-10.924-40.768l-155.070-89.528c-4.7-2.714-9.83-4.004-14.894-4.004zM288.136 19.284c-6.962 0-14.016 1.774-20.48 5.504-19.626 11.332-26.35 36.428-15.020 56.054l89.53 155.070c11.33 19.628 36.426 26.352 56.054 15.022 19.626-11.332 26.35-36.43 15.020-56.054l-89.53-155.072c-7.598-13.166-21.392-20.524-35.574-20.524zM646.266 650.758c-5.062 0-10.196 1.29-14.894 4.002-14.274 8.242-19.164 26.494-10.924 40.766l89.534 155.070c8.24 14.274 26.492 19.166 40.766 10.922 14.274-8.242 19.164-26.494 10.924-40.766l-89.532-155.070c-5.53-9.57-15.56-14.924-25.874-14.924z" />
|
||||
<glyph unicode="" glyph-name="spinner6" d="M384 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM790.994 448c0 0 0 0 0 0 0 57.993 47.013 105.006 105.006 105.006s105.006-47.013 105.006-105.006c0 0 0 0 0 0 0-57.993-47.013-105.006-105.006-105.006s-105.006 47.013-105.006 105.006zM688.424 176.47c0 52.526 42.58 95.106 95.106 95.106s95.106-42.58 95.106-95.106c0-52.526-42.58-95.106-95.106-95.106s-95.106 42.58-95.106 95.106zM425.862 64c0 47.573 38.565 86.138 86.138 86.138s86.138-38.565 86.138-86.138c0-47.573-38.565-86.138-86.138-86.138s-86.138 38.565-86.138 86.138zM162.454 176.47c0 43.088 34.93 78.018 78.018 78.018s78.018-34.93 78.018-78.018c0-43.088-34.93-78.018-78.018-78.018s-78.018 34.93-78.018 78.018zM57.338 448c0 39.026 31.636 70.662 70.662 70.662s70.662-31.636 70.662-70.662c0-39.026-31.636-70.662-70.662-70.662s-70.662 31.636-70.662 70.662zM176.472 719.528c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM899.464 719.528c0-64.024-51.906-115.934-115.936-115.934-64.024 0-115.936 51.91-115.936 115.934 0 64.032 51.912 115.934 115.936 115.934 64.030 0 115.936-51.902 115.936-115.934z" />
|
||||
<glyph unicode="" glyph-name="spinner9" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96s96 42.98 96 96c0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96s-96-42.98-96-96c0-282.77 229.23-512 512-512z" />
|
||||
<glyph unicode="" glyph-name="spinner11" d="M1024 576h-384l143.53 143.53c-72.53 72.526-168.96 112.47-271.53 112.47s-199-39.944-271.53-112.47c-72.526-72.53-112.47-168.96-112.47-271.53s39.944-199 112.47-271.53c72.53-72.526 168.96-112.47 271.53-112.47s199 39.944 271.528 112.472c6.056 6.054 11.86 12.292 17.456 18.668l96.32-84.282c-93.846-107.166-231.664-174.858-385.304-174.858-282.77 0-512 229.23-512 512s229.23 512 512 512c141.386 0 269.368-57.326 362.016-149.984l149.984 149.984v-384z" />
|
||||
<glyph unicode="" glyph-name="search2" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
|
||||
<glyph unicode="" glyph-name="enlarge" d="M1024 960h-416l160-160-192-192 96-96 192 192 160-160zM1024-64v416l-160-160-192 192-96-96 192-192-160-160zM0-64h416l-160 160 192 192-96 96-192-192-160 160zM0 960v-416l160 160 192-192 96 96-192 192 160 160z" />
|
||||
<glyph unicode="" glyph-name="enlarge2" d="M1024 960v-416l-160 160-192-192-96 96 192 192-160 160zM448 288l-192-192 160-160h-416v416l160-160 192 192z" />
|
||||
<glyph unicode="" glyph-name="equalizer" d="M448 832v16c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576zM256 704v128h128v-128h-128zM832 528c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-576v-128h576v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h192v128h-192v16zM640 384v128h128v-128h-128zM448 208c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576v16zM256 64v128h128v-128h-128z" />
|
||||
<glyph unicode="" glyph-name="cog" d="M933.79 349.75c-53.726 93.054-21.416 212.304 72.152 266.488l-100.626 174.292c-28.75-16.854-62.176-26.518-97.846-26.518-107.536 0-194.708 87.746-194.708 195.99h-201.258c0.266-33.41-8.074-67.282-25.958-98.252-53.724-93.056-173.156-124.702-266.862-70.758l-100.624-174.292c28.97-16.472 54.050-40.588 71.886-71.478 53.638-92.908 21.512-211.92-71.708-266.224l100.626-174.292c28.65 16.696 61.916 26.254 97.4 26.254 107.196 0 194.144-87.192 194.7-194.958h201.254c-0.086 33.074 8.272 66.57 25.966 97.218 53.636 92.906 172.776 124.594 266.414 71.012l100.626 174.29c-28.78 16.466-53.692 40.498-71.434 71.228zM512 240.668c-114.508 0-207.336 92.824-207.336 207.334 0 114.508 92.826 207.334 207.336 207.334 114.508 0 207.332-92.826 207.332-207.334-0.002-114.51-92.824-207.334-207.332-207.334z" />
|
||||
<glyph unicode="" glyph-name="menu2" d="M64 768h896v-192h-896zM64 512h896v-192h-896zM64 256h896v-192h-896z" />
|
||||
<glyph unicode="" glyph-name="contrast" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM128 448c0 212.078 171.922 384 384 384v-768c-212.078 0-384 171.922-384 384z" />
|
||||
<glyph unicode="" glyph-name="cancel-circle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM672 704l-160-160-160 160-96-96 160-160-160-160 96-96 160 160 160-160 96 96-160 160 160 160z" />
|
||||
<glyph unicode="" glyph-name="exit" d="M768 320v128h-320v128h320v128l192-192zM704 384v-256h-320v-192l-384 192v832h704v-320h-64v256h-512l256-128v-576h256v192z" />
|
||||
<glyph unicode="" glyph-name="arrow-right" d="M992 448l-480 480v-288h-512v-384h512v-288z" />
|
||||
<glyph unicode="" glyph-name="arrow-left" d="M32 448l480-480v288h512v384h-512v288z" />
|
||||
<glyph unicode="" glyph-name="arrow-right2" d="M621.254 82.746l320 320c24.994 24.992 24.994 65.516 0 90.51l-320 320c-24.994 24.992-65.516 24.992-90.51 0-24.994-24.994-24.994-65.516 0-90.51l210.746-210.746h-613.49c-35.346 0-64-28.654-64-64s28.654-64 64-64h613.49l-210.746-210.746c-12.496-12.496-18.744-28.876-18.744-45.254s6.248-32.758 18.744-45.254c24.994-24.994 65.516-24.994 90.51 0z" />
|
||||
<glyph unicode="" glyph-name="arrow-left2" d="M402.746 82.746l-320 320c-24.994 24.992-24.994 65.516 0 90.51l320 320c24.994 24.992 65.516 24.992 90.51 0 24.994-24.994 24.994-65.516 0-90.51l-210.746-210.746h613.49c35.346 0 64-28.654 64-64s-28.654-64-64-64h-613.49l210.746-210.746c12.496-12.496 18.744-28.876 18.744-45.254s-6.248-32.758-18.744-45.254c-24.994-24.994-65.516-24.994-90.51 0z" />
|
||||
<glyph unicode="" glyph-name="circle-right" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM354.744 253.256l90.512-90.512 285.254 285.256-285.256 285.254-90.508-90.508 194.744-194.746z" />
|
||||
<glyph unicode="" glyph-name="circle-left" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM669.256 642.744l-90.512 90.512-285.254-285.256 285.256-285.254 90.508 90.508-194.744 194.746z" />
|
||||
</font></defs></svg>
|
After Width: | Height: | Size: 24 KiB |
BIN
reader/vendor/cbrjs/fonts/icomoon.ttf
vendored
Normal file
BIN
reader/vendor/cbrjs/fonts/icomoon.woff
vendored
Normal file
2050
reader/vendor/cbrjs/fonts/selection.json
vendored
Normal file
237
reader/vendor/cbrjs/fonts/style.css
vendored
Normal file
|
@ -0,0 +1,237 @@
|
|||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('fonts/icomoon.eot?g4qvho');
|
||||
src: url('fonts/icomoon.eot?g4qvho#iefix') format('embedded-opentype'),
|
||||
url('fonts/icomoon.ttf?g4qvho') format('truetype'),
|
||||
url('fonts/icomoon.woff?g4qvho') format('woff'),
|
||||
url('fonts/icomoon.svg?g4qvho#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-double_page_mode:before {
|
||||
content: "\e86d";
|
||||
}
|
||||
.icon-single_page_mode:before {
|
||||
content: "\e86e";
|
||||
}
|
||||
.icon-local_library:before {
|
||||
content: "\e54b";
|
||||
}
|
||||
.icon-rate_review:before {
|
||||
content: "\e560";
|
||||
}
|
||||
.icon-arrow_back:before {
|
||||
content: "\e5c4";
|
||||
}
|
||||
.icon-arrow_forward:before {
|
||||
content: "\e5c8";
|
||||
}
|
||||
.icon-icon-fit-window:before {
|
||||
content: "\e85b";
|
||||
}
|
||||
.icon-icon-fit-width:before {
|
||||
content: "\e85c";
|
||||
}
|
||||
.icon-turned_in:before {
|
||||
content: "\e8e6";
|
||||
}
|
||||
.icon-turned_in_not:before {
|
||||
content: "\e8e7";
|
||||
}
|
||||
.icon-brightness_low:before {
|
||||
content: "\e1ad";
|
||||
}
|
||||
.icon-build:before {
|
||||
content: "\e869";
|
||||
}
|
||||
.icon-cancel:before {
|
||||
content: "\e5c9";
|
||||
}
|
||||
.icon-navigate_before:before {
|
||||
content: "\e408";
|
||||
}
|
||||
.icon-navigate_next:before {
|
||||
content: "\e409";
|
||||
}
|
||||
.icon-close:before {
|
||||
content: "\e5cd";
|
||||
}
|
||||
.icon-cloud_download:before {
|
||||
content: "\e2c0";
|
||||
}
|
||||
.icon-content_copy:before {
|
||||
content: "\e14d";
|
||||
}
|
||||
.icon-mode_edit:before {
|
||||
content: "\e254";
|
||||
}
|
||||
.icon-crop_free:before {
|
||||
content: "\e3c2";
|
||||
}
|
||||
.icon-crop_portrait:before {
|
||||
content: "\e3c5";
|
||||
}
|
||||
.icon-dehaze:before {
|
||||
content: "\e3c7";
|
||||
}
|
||||
.icon-dns:before {
|
||||
content: "\e875";
|
||||
}
|
||||
.icon-exit_to_app:before {
|
||||
content: "\e879";
|
||||
}
|
||||
.icon-featured_play_list:before {
|
||||
content: "\e06d";
|
||||
}
|
||||
.icon-format_list_bulleted:before {
|
||||
content: "\e241";
|
||||
}
|
||||
.icon-format_list_numbered:before {
|
||||
content: "\e242";
|
||||
}
|
||||
.icon-format_textdirection_l_to_r:before {
|
||||
content: "\e247";
|
||||
}
|
||||
.icon-format_textdirection_r_to_l:before {
|
||||
content: "\e248";
|
||||
}
|
||||
.icon-fullscreen:before {
|
||||
content: "\e5d0";
|
||||
}
|
||||
.icon-fullscreen_exit:before {
|
||||
content: "\e5d1";
|
||||
}
|
||||
.icon-keyboard_arrow_left:before {
|
||||
content: "\e314";
|
||||
}
|
||||
.icon-keyboard_arrow_right:before {
|
||||
content: "\e315";
|
||||
}
|
||||
.icon-list:before {
|
||||
content: "\e896";
|
||||
}
|
||||
.icon-sync:before {
|
||||
content: "\e627";
|
||||
}
|
||||
.icon-menu:before {
|
||||
content: "\e5d2";
|
||||
}
|
||||
.icon-open_with:before {
|
||||
content: "\e89f";
|
||||
}
|
||||
.icon-pages:before {
|
||||
content: "\e7f9";
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e8b6";
|
||||
}
|
||||
.icon-settings:before {
|
||||
content: "\e8b8";
|
||||
}
|
||||
.icon-settings_overscan:before {
|
||||
content: "\e8c4";
|
||||
}
|
||||
.icon-tune:before {
|
||||
content: "\e429";
|
||||
}
|
||||
.icon-unarchive:before {
|
||||
content: "\e169";
|
||||
}
|
||||
.icon-wb_sunny:before {
|
||||
content: "\e430";
|
||||
}
|
||||
.icon-zoom_in:before {
|
||||
content: "\e8ff";
|
||||
}
|
||||
.icon-zoom_out:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-zoom_out_map:before {
|
||||
content: "\e56b";
|
||||
}
|
||||
.icon-droplet:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-box-remove:before {
|
||||
content: "\e95f";
|
||||
}
|
||||
.icon-download:before {
|
||||
content: "\e960";
|
||||
}
|
||||
.icon-spinner:before {
|
||||
content: "\e97a";
|
||||
}
|
||||
.icon-spinner3:before {
|
||||
content: "\e97c";
|
||||
}
|
||||
.icon-spinner6:before {
|
||||
content: "\e97f";
|
||||
}
|
||||
.icon-spinner9:before {
|
||||
content: "\e982";
|
||||
}
|
||||
.icon-spinner11:before {
|
||||
content: "\e984";
|
||||
}
|
||||
.icon-search2:before {
|
||||
content: "\e986";
|
||||
}
|
||||
.icon-enlarge:before {
|
||||
content: "\e989";
|
||||
}
|
||||
.icon-enlarge2:before {
|
||||
content: "\e98b";
|
||||
}
|
||||
.icon-equalizer:before {
|
||||
content: "\e992";
|
||||
}
|
||||
.icon-cog:before {
|
||||
content: "\e994";
|
||||
}
|
||||
.icon-menu2:before {
|
||||
content: "\e9bd";
|
||||
}
|
||||
.icon-contrast:before {
|
||||
content: "\e9d5";
|
||||
}
|
||||
.icon-cancel-circle:before {
|
||||
content: "\ea0d";
|
||||
}
|
||||
.icon-exit:before {
|
||||
content: "\ea14";
|
||||
}
|
||||
.icon-arrow-right:before {
|
||||
content: "\ea34";
|
||||
}
|
||||
.icon-arrow-left:before {
|
||||
content: "\ea38";
|
||||
}
|
||||
.icon-arrow-right2:before {
|
||||
content: "\ea3c";
|
||||
}
|
||||
.icon-arrow-left2:before {
|
||||
content: "\ea40";
|
||||
}
|
||||
.icon-circle-right:before {
|
||||
content: "\ea42";
|
||||
}
|
||||
.icon-circle-left:before {
|
||||
content: "\ea44";
|
||||
}
|
||||
|
BIN
reader/vendor/cbrjs/img/icon_128.png
vendored
Executable file
After Width: | Height: | Size: 4.7 KiB |
BIN
reader/vendor/cbrjs/img/icon_196.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
reader/vendor/cbrjs/img/loading.gif
vendored
Normal file
After Width: | Height: | Size: 3.1 KiB |
1263
reader/vendor/cbrjs/js/cbr.js.OK
vendored
Normal file
11
reader/vendor/epubjs/epub.min.js
vendored
Normal file
1
reader/vendor/epubjs/epub.min.map
vendored
Normal file
1
reader/vendor/epubjs/hooks.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
EPUBJS.Hooks.register("beforeChapterDisplay").endnotes=function(a,b){var c=b.contents.querySelectorAll("a[href]"),d=Array.prototype.slice.call(c),e="epub:type",f="noteref",g=EPUBJS.core.folder(location.pathname),h=(g+EPUBJS.cssPath||g,{});EPUBJS.core.addCss(EPUBJS.cssPath+"popup.css",!1,b.render.document.head),d.forEach(function(a){function c(){var c,e,f=b.height,j=b.width,p=225;o||(c=l.cloneNode(!0),o=c.querySelector("p")),h[k]||(h[k]=document.createElement("div"),h[k].setAttribute("class","popup"),pop_content=document.createElement("div"),h[k].appendChild(pop_content),pop_content.appendChild(o),pop_content.setAttribute("class","pop_content"),b.render.document.body.appendChild(h[k]),h[k].addEventListener("mouseover",d,!1),h[k].addEventListener("mouseout",g,!1),b.on("renderer:pageChanged",i,this),b.on("renderer:pageChanged",g,this)),c=h[k],e=a.getBoundingClientRect(),m=e.left,n=e.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width/2+"px",c.style.top=n+"px",p>f/2.5&&(p=f/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),m-popRect.width<=0?(c.style.left=m+"px",c.classList.add("left")):c.classList.remove("left"),m+popRect.width/2>=j?(c.style.left=m-300+"px",popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width+"px",popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")}function d(){h[k].classList.add("on")}function g(){h[k].classList.remove("on")}function i(){setTimeout(function(){h[k].classList.remove("show")},100)}var j,k,l,m,n,o,p=a.getAttribute(e);p==f&&(j=a.getAttribute("href"),k=j.replace("#",""),l=b.render.document.getElementById(k),a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",i,!1))}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").mathml=function(a,b){if(b.currentChapter.manifestProperties.indexOf("mathml")!==-1){b.render.iframe.contentWindow.mathmlCallback=a;var c=document.createElement("script");c.type="text/x-mathjax-config",c.innerHTML=' MathJax.Hub.Register.StartupHook("End",function () { window.mathmlCallback(); }); MathJax.Hub.Config({jax: ["input/TeX","input/MathML","output/SVG"],extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"],TeX: {extensions: ["noErrors.js","noUndefined.js","autoload-all.js"]},MathMenu: {showRenderer: false},menuSettings: {zoom: "Click"},messageStyle: "none"}); ',b.doc.body.appendChild(c),EPUBJS.core.addScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",null,b.doc.head)}else a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").smartimages=function(a,b){var c=b.contents.querySelectorAll("img"),d=Array.prototype.slice.call(c),e=b.height;return"reflowable"!=b.layoutSettings.layout?void a():(d.forEach(function(a){var c=function(){var c,d=a.getBoundingClientRect(),f=d.height,g=d.top,h=a.getAttribute("data-height"),i=h||f,j=Number(getComputedStyle(a,"").fontSize.match(/(\d*(\.\d*)?)px/)[1]),k=j?j/2:0;e=b.contents.clientHeight,g<0&&(g=0),i+g>=e?(g<e/2?(c=e-g-k,a.style.maxHeight=c+"px",a.style.width="auto"):(i>e&&(a.style.maxHeight=e+"px",a.style.width="auto",d=a.getBoundingClientRect(),i=d.height),a.style.display="block",a.style.WebkitColumnBreakBefore="always",a.style.breakBefore="column"),a.setAttribute("data-height",c)):(a.style.removeProperty("max-height"),a.style.removeProperty("margin-top"))},d=function(){b.off("renderer:resized",c),b.off("renderer:chapterUnload",this)};a.addEventListener("load",c,!1),b.on("renderer:resized",c),b.on("renderer:chapterUnload",d),c()}),void(a&&a()))},EPUBJS.Hooks.register("beforeChapterDisplay").transculsions=function(a,b){var c=b.contents.querySelectorAll("[transclusion]"),d=Array.prototype.slice.call(c);d.forEach(function(a){function c(){j=g,k=h,j>chapter.colWidth&&(d=chapter.colWidth/j,j=chapter.colWidth,k*=d),f.width=j,f.height=k}var d,e=a.getAttribute("ref"),f=document.createElement("iframe"),g=a.getAttribute("width"),h=a.getAttribute("height"),i=a.parentNode,j=g,k=h;c(),b.listenUntil("renderer:resized","renderer:chapterUnloaded",c),f.src=e,i.replaceChild(f,a)}),a&&a()};
|
1
reader/vendor/epubjs/hooks.min.map
vendored
Normal file
73
reader/vendor/epubjs/hooks/default/smartimages.js
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
EPUBJS.Hooks.register("beforeChapterDisplay").smartimages = function(callback, renderer){
|
||||
var images = renderer.contents.querySelectorAll('img'),
|
||||
items = Array.prototype.slice.call(images),
|
||||
iheight = renderer.height,//chapter.bodyEl.clientHeight,//chapter.doc.body.getBoundingClientRect().height,
|
||||
oheight;
|
||||
|
||||
if(renderer.layoutSettings.layout != "reflowable") {
|
||||
callback();
|
||||
return; //-- Only adjust images for reflowable text
|
||||
}
|
||||
|
||||
items.forEach(function(item){
|
||||
|
||||
var size = function() {
|
||||
var itemRect = item.getBoundingClientRect(),
|
||||
rectHeight = itemRect.height,
|
||||
top = itemRect.top,
|
||||
oHeight = item.getAttribute('data-height'),
|
||||
height = oHeight || rectHeight,
|
||||
newHeight,
|
||||
fontSize = Number(getComputedStyle(item, "").fontSize.match(/(\d*(\.\d*)?)px/)[1]),
|
||||
fontAdjust = fontSize ? fontSize / 2 : 0;
|
||||
|
||||
iheight = renderer.contents.clientHeight;
|
||||
if(top < 0) top = 0;
|
||||
|
||||
if(height + top >= iheight) {
|
||||
|
||||
if(top < iheight/2) {
|
||||
// Remove top and half font-size from height to keep container from overflowing
|
||||
newHeight = iheight - top - fontAdjust;
|
||||
item.style.maxHeight = newHeight + "px";
|
||||
item.style.width= "auto";
|
||||
}else{
|
||||
if(height > iheight) {
|
||||
item.style.maxHeight = iheight + "px";
|
||||
item.style.width= "auto";
|
||||
itemRect = item.getBoundingClientRect();
|
||||
height = itemRect.height;
|
||||
}
|
||||
item.style.display = "block";
|
||||
item.style["WebkitColumnBreakBefore"] = "always";
|
||||
item.style["breakBefore"] = "column";
|
||||
|
||||
}
|
||||
|
||||
item.setAttribute('data-height', newHeight);
|
||||
|
||||
}else{
|
||||
item.style.removeProperty('max-height');
|
||||
item.style.removeProperty('margin-top');
|
||||
}
|
||||
}
|
||||
|
||||
var unloaded = function(){
|
||||
// item.removeEventListener('load', size); // crashes in IE
|
||||
renderer.off("renderer:resized", size);
|
||||
renderer.off("renderer:chapterUnload", this);
|
||||
};
|
||||
|
||||
item.addEventListener('load', size, false);
|
||||
|
||||
renderer.on("renderer:resized", size);
|
||||
|
||||
renderer.on("renderer:chapterUnload", unloaded);
|
||||
|
||||
size();
|
||||
|
||||
});
|
||||
|
||||
if(callback) callback();
|
||||
|
||||
}
|
14
reader/vendor/epubjs/hooks/extensions/highlight.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
EPUBJS.Hooks.register("beforeChapterDisplay").highlight = function(callback, renderer){
|
||||
|
||||
// EPUBJS.core.addScript("js/libs/jquery.highlight.js", null, renderer.doc.head);
|
||||
|
||||
var s = document.createElement("style");
|
||||
s.innerHTML =".highlight { background: yellow; font-weight: normal; }";
|
||||
|
||||
renderer.render.document.head.appendChild(s);
|
||||
|
||||
if(callback) callback();
|
||||
|
||||
}
|
||||
|
||||
|
4
reader/vendor/epubjs/libs/jquery.min.js
vendored
Normal file
7
reader/vendor/epubjs/libs/screenfull.min.js
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*!
|
||||
* screenfull
|
||||
* v1.1.0 - 2013-09-06
|
||||
* https://github.com/sindresorhus/screenfull.js
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(a,b){"use strict";var c="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,d=function(){for(var a,c,d=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenchange","MSFullscreenerror"]],e=0,f=d.length,g={};f>e;e++)if(a=d[e],a&&a[1]in b){for(e=0,c=a.length;c>e;e++)g[d[0][e]]=a[e];return g}return!1}(),e={request:function(a){var e=d.requestFullscreen;a=a||b.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?a[e]():a[e](c&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){b[d.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){},onerror:function(){},raw:d};return d?(Object.defineProperties(e,{isFullscreen:{get:function(){return!!b[d.fullscreenElement]}},element:{enumerable:!0,get:function(){return b[d.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!b[d.fullscreenEnabled]}}}),b.addEventListener(d.fullscreenchange,function(a){e.onchange.call(e,a)}),b.addEventListener(d.fullscreenerror,function(a){e.onerror.call(e,a)}),a.screenfull=e,void 0):(a.screenfull=!1,void 0)}(window,document);
|
14
reader/vendor/epubjs/libs/zip.min.js
vendored
Normal file
1
reader/vendor/epubjs/reader.min.js
vendored
Normal file
1
reader/vendor/epubjs/reader.min.map
vendored
Normal file
1276
reader/vendor/pixastic/pixastic.effects.js
vendored
Normal file
286
reader/vendor/pixastic/pixastic.js
vendored
Normal file
|
@ -0,0 +1,286 @@
|
|||
/*!
|
||||
* Pixastic - JavaScript Image Processing
|
||||
* http://pixastic.com/
|
||||
* Copyright 2012, Jacob Seidelin
|
||||
*
|
||||
* Dual licensed under the MPL 1.1 or GPLv3 licenses.
|
||||
* http://pixastic.com/license-mpl.txt
|
||||
* http://pixastic.com/license-gpl-3.0.txt
|
||||
*
|
||||
*/
|
||||
|
||||
var Pixastic = (function() {
|
||||
|
||||
var worker;
|
||||
|
||||
function createImageData(ctx, width, height) {
|
||||
if (ctx.createImageData) {
|
||||
return ctx.createImageData(width, height);
|
||||
} else {
|
||||
return ctx.getImageData(0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
function Pixastic(ctx, workerControlPath) {
|
||||
|
||||
var P = {},
|
||||
width = ctx.canvas.width,
|
||||
height = ctx.canvas.height,
|
||||
queue = [],
|
||||
workerControlPath = workerControlPath || "";
|
||||
|
||||
if (!worker) {
|
||||
if (typeof window.Worker != "undefined") {
|
||||
try {
|
||||
worker = new window.Worker(workerControlPath + "pixastic.worker.control.js");
|
||||
} catch(e) {
|
||||
if (location.protocol == "file:") {
|
||||
Pixastic.log("Could not create native worker, running from file://")
|
||||
} else {
|
||||
Pixastic.log("Could not create native worker.")
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!worker) {
|
||||
worker = new Pixastic.Worker();
|
||||
}
|
||||
}
|
||||
|
||||
for (var e in Pixastic.Effects) {
|
||||
if (Pixastic.Effects.hasOwnProperty(e)) {
|
||||
(function(e) {
|
||||
P[e] = function(options) {
|
||||
queue.push({
|
||||
effect : e,
|
||||
options : options
|
||||
});
|
||||
return P;
|
||||
}
|
||||
|
||||
P.done = function(callback, progress) {
|
||||
var inData, outData;
|
||||
|
||||
try {
|
||||
inData = ctx.getImageData(0, 0, width, height);
|
||||
} catch(e) {
|
||||
if (location.protocol == "file:") {
|
||||
throw new Error("Could not access image data, running from file://");
|
||||
} else {
|
||||
throw new Error("Could not access image data, is canvas tainted by cross-origin data?");
|
||||
}
|
||||
}
|
||||
|
||||
outData = createImageData(ctx, width, height);
|
||||
|
||||
worker.postMessage({
|
||||
queue : queue,
|
||||
inData : inData,
|
||||
outData : outData,
|
||||
width : width,
|
||||
height : height
|
||||
});
|
||||
|
||||
worker.onmessage = function(message) {
|
||||
var d = message.data;
|
||||
switch (d.event) {
|
||||
case "done" :
|
||||
ctx.putImageData(d.data, 0, 0);
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
if (progress) {
|
||||
progress(1);
|
||||
}
|
||||
break;
|
||||
case "progress" :
|
||||
if (progress) {
|
||||
progress(d.data);
|
||||
}
|
||||
break;
|
||||
case "error" :
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (progress) {
|
||||
progress(0);
|
||||
}
|
||||
}
|
||||
})(e);
|
||||
}
|
||||
}
|
||||
return P;
|
||||
}
|
||||
|
||||
|
||||
Pixastic.Worker = function() {
|
||||
var me = this;
|
||||
function processMessage(data) {
|
||||
var queue = data.queue,
|
||||
inData = data.inData,
|
||||
outData = data.outData,
|
||||
width = data.width,
|
||||
height = data.height,
|
||||
tmpData;
|
||||
|
||||
for (var i=0;i<queue.length;i++) {
|
||||
var e = queue[i].effect,
|
||||
options = queue[i].options,
|
||||
progressCallback;
|
||||
|
||||
if (i > 0) {
|
||||
tmpData = inData;
|
||||
inData = outData;
|
||||
outData = tmpData;
|
||||
}
|
||||
|
||||
if (typeof importScripts == "function") {
|
||||
progressCallback = function(p) {
|
||||
me.onmessage({
|
||||
data : {
|
||||
event : "progress",
|
||||
data : (i + p) / queue.length
|
||||
}
|
||||
});
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
Pixastic.Effects[e](inData.data, outData.data, width, height, options, progressCallback);
|
||||
|
||||
me.onmessage({
|
||||
data : {
|
||||
event : "progress",
|
||||
data : (i+1) / queue.length
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
me.onmessage({
|
||||
data : {
|
||||
event : "done",
|
||||
data : outData
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.postMessage = function(data) {
|
||||
setTimeout(function() {
|
||||
processMessage(data)
|
||||
}, 0);
|
||||
};
|
||||
|
||||
this.onmessage = function() {};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Pixastic.log = function(str) {
|
||||
if (typeof console != "undefined" && console.log) {
|
||||
console.log("Pixastic: " + str);
|
||||
}
|
||||
};
|
||||
|
||||
function toCanvas(o) {
|
||||
var canvas;
|
||||
if (typeof o == "object") {
|
||||
if (typeof o.tagName == "string") {
|
||||
if (o.tagName.toLowerCase() == "canvas" || o.tagName.toLowerCase() == "img") {
|
||||
canvas = document.createElement("canvas");
|
||||
canvas.width = o.width;
|
||||
canvas.height = o.height;
|
||||
canvas.getContext("2d").drawImage(o, 0,0);
|
||||
}
|
||||
} else if ((window.ImageData && o instanceof window.ImageData)
|
||||
|| (typeof o.width == "number" && typeof o.height == "number" && typeof o.data == "object")) {
|
||||
canvas = document.createElement("canvas");
|
||||
canvas.width = o.width;
|
||||
canvas.height = o.height;
|
||||
canvas.getContext("2d").putImageData(o, 0, 0);
|
||||
}
|
||||
}
|
||||
return canvas;
|
||||
};
|
||||
|
||||
function toImage(o) {
|
||||
var canvas = toCanvas(o),
|
||||
image = new Image();
|
||||
image.width = canvas.width;
|
||||
image.height = canvas.height;
|
||||
image.src = canvas.toDataURL();
|
||||
return image;
|
||||
};
|
||||
|
||||
function toImageData(o) {
|
||||
var canvas = toCanvas(o),
|
||||
ctx = canvas.getContext("2d");
|
||||
return ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||
};
|
||||
|
||||
function histogram(imageData) {
|
||||
var values = [],
|
||||
i, p,
|
||||
data = imageData.data,
|
||||
round = Math.round,
|
||||
maxValue,
|
||||
n = imageData.width * imageData.height;
|
||||
|
||||
for (i=0;i<256;i++) {
|
||||
values[i] = 0;
|
||||
}
|
||||
|
||||
for (i=0;i<n;i++) {
|
||||
p = i * 4;
|
||||
values[ round((data[p]+data[p+1]+data[p+2])/3) ]++;
|
||||
}
|
||||
|
||||
maxValue = 0;
|
||||
for (i=0;i<256;i++) {
|
||||
if (values[i] > maxValue) {
|
||||
maxValue = values[i];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
maxValue : maxValue,
|
||||
values : values
|
||||
};
|
||||
}
|
||||
|
||||
Pixastic.toCanvas = toCanvas;
|
||||
Pixastic.toImage = toImage;
|
||||
Pixastic.toImageData = toImageData;
|
||||
Pixastic.histogram = histogram;
|
||||
|
||||
Pixastic.Color = {
|
||||
rgb2hsl : function(r, g, b) {
|
||||
if (r < 0) r = 0;
|
||||
if (g < 0) g = 0;
|
||||
if (b < 0) b = 0;
|
||||
if (r > 255) r = 0;
|
||||
if (g > 255) g = 0;
|
||||
if (b > 255) b = 0;
|
||||
},
|
||||
|
||||
rgb2hsv : function(r, g, b) {
|
||||
},
|
||||
|
||||
rgb2hex : function(r, g, b) {
|
||||
},
|
||||
|
||||
hsl2rgb : function(h, s, l) {
|
||||
},
|
||||
|
||||
hsv2rgb : function(h, s, v) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Pixastic;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
|
||||
|
1580
reader/vendor/pixastic/pixastic.worker.control.js
vendored
Normal file
47
reader/vendor/pixastic/pixastic.worker.js
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
Pixastic.Worker = function() {
|
||||
var me = this;
|
||||
function processMessage(data) {
|
||||
var queue = data.queue,
|
||||
inData = data.inData,
|
||||
outData = data.outData,
|
||||
width = data.width,
|
||||
height = data.height,
|
||||
tmpData;
|
||||
|
||||
for (var i=0;i<queue.length;i++) {
|
||||
var e = queue[i].effect,
|
||||
options = queue[i].options;
|
||||
|
||||
if (i > 0) {
|
||||
tmpData = inData;
|
||||
inData = outData;
|
||||
outData = tmpData;
|
||||
}
|
||||
|
||||
Pixastic.Effects[e](inData.data, outData.data, width, height, options);
|
||||
|
||||
me.onmessage({
|
||||
data : {
|
||||
event : "progress",
|
||||
data : (i+1) / queue.length
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
me.onmessage({
|
||||
data : {
|
||||
event : "done",
|
||||
data : outData
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.postMessage = function(data) {
|
||||
setTimeout(function() {
|
||||
processMessage(data)
|
||||
}, 0);
|
||||
}
|
||||
|
||||
this.onmessage = function() {};
|
||||
|
||||
}
|
145
reader/vendor/sindresorhus/screenfull.js
vendored
Normal file
|
@ -0,0 +1,145 @@
|
|||
/*!
|
||||
* screenfull
|
||||
* v3.0.0 - 2015-11-24
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var isCommonjs = typeof module !== 'undefined' && module.exports;
|
||||
var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element;
|
||||
|
||||
var fn = (function () {
|
||||
var val;
|
||||
var valLength;
|
||||
|
||||
var fnMap = [
|
||||
[
|
||||
'requestFullscreen',
|
||||
'exitFullscreen',
|
||||
'fullscreenElement',
|
||||
'fullscreenEnabled',
|
||||
'fullscreenchange',
|
||||
'fullscreenerror'
|
||||
],
|
||||
// new WebKit
|
||||
[
|
||||
'webkitRequestFullscreen',
|
||||
'webkitExitFullscreen',
|
||||
'webkitFullscreenElement',
|
||||
'webkitFullscreenEnabled',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror'
|
||||
|
||||
],
|
||||
// old WebKit (Safari 5.1)
|
||||
[
|
||||
'webkitRequestFullScreen',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitCurrentFullScreenElement',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror'
|
||||
|
||||
],
|
||||
[
|
||||
'mozRequestFullScreen',
|
||||
'mozCancelFullScreen',
|
||||
'mozFullScreenElement',
|
||||
'mozFullScreenEnabled',
|
||||
'mozfullscreenchange',
|
||||
'mozfullscreenerror'
|
||||
],
|
||||
[
|
||||
'msRequestFullscreen',
|
||||
'msExitFullscreen',
|
||||
'msFullscreenElement',
|
||||
'msFullscreenEnabled',
|
||||
'MSFullscreenChange',
|
||||
'MSFullscreenError'
|
||||
]
|
||||
];
|
||||
|
||||
var i = 0;
|
||||
var l = fnMap.length;
|
||||
var ret = {};
|
||||
|
||||
for (; i < l; i++) {
|
||||
val = fnMap[i];
|
||||
if (val && val[1] in document) {
|
||||
for (i = 0, valLength = val.length; i < valLength; i++) {
|
||||
ret[fnMap[0][i]] = val[i];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})();
|
||||
|
||||
var screenfull = {
|
||||
request: function (elem) {
|
||||
var request = fn.requestFullscreen;
|
||||
|
||||
elem = elem || document.documentElement;
|
||||
|
||||
// Work around Safari 5.1 bug: reports support for
|
||||
// keyboard in fullscreen even though it doesn't.
|
||||
// Browser sniffing, since the alternative with
|
||||
// setTimeout is even worse.
|
||||
if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) {
|
||||
elem[request]();
|
||||
} else {
|
||||
elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
|
||||
}
|
||||
},
|
||||
exit: function () {
|
||||
document[fn.exitFullscreen]();
|
||||
},
|
||||
toggle: function (elem) {
|
||||
if (this.isFullscreen) {
|
||||
this.exit();
|
||||
} else {
|
||||
this.request(elem);
|
||||
}
|
||||
},
|
||||
raw: fn
|
||||
};
|
||||
|
||||
if (!fn) {
|
||||
if (isCommonjs) {
|
||||
module.exports = false;
|
||||
} else {
|
||||
window.screenfull = false;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Object.defineProperties(screenfull, {
|
||||
isFullscreen: {
|
||||
get: function () {
|
||||
return Boolean(document[fn.fullscreenElement]);
|
||||
}
|
||||
},
|
||||
element: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return document[fn.fullscreenElement];
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
// Coerce to boolean in case of old WebKit
|
||||
return Boolean(document[fn.fullscreenEnabled]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (isCommonjs) {
|
||||
module.exports = screenfull;
|
||||
} else {
|
||||
window.screenfull = screenfull;
|
||||
}
|
||||
})();
|