-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmobile.html
87 lines (78 loc) · 2.74 KB
/
mobile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<html>
<head>
<title>欢迎使用EPUB阅读器</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="renderer" content="webkit">
<!-- <meta property="weixin:image" content="https://img3.doubanio.com/f/ark/be39d339b9b95b615e95c7dc542832c3e22ace84/pics/weixin_cover_new.png"> -->
<!-- <meta property="weixin:ga:dcs" content="read-reader"> -->
<style>
body {
margin: 0;
font-family: sans-serif;
background: #f6f4ec;
position: absolute;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="assets/mobile/mobile.css">
<script>var annotator = 'noConflictBeforeValue';</script>
<script src="assets/zepto/zepto.min.js"></script>
<script src="assets/json2.js"></script>
</head>
<body>
<div class="container" id="main">
</div>
</body>
<script>
window.Helper = {
getKeyDownNumber: function(e) {
var keynum
var keychar
var numcheck
if(window.event) {// IE
keynum = e.keyCode
} else if (e.which) {// Netscape/Firefox/Opera
keynum = e.which
}
keychar = String.fromCharCode(keynum)
numcheck = /\d/
return !numcheck.test(keychar)
},
getRequest: function() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
textFromPoint: function() {
var html = window.frames[0].document.elementFromPoint(2,2);
var text = html.innerHTML.replace(/<[^<>]+>/g,'');
return text;
}
}
var params = Helper.getRequest();
params.r = params.r;
params.uid = params.uid;
params.bid = params.bid;
params.token = params.token || 'asdfsa';
params.percentage = params.percentage || 1;
params.url = params.url || 'test/books/直道而行:孟子和荀子.epub';
params.probation = params.probation || -1
</script>
<script src="assets/epub.js/libs/zip.min.js"></script>
<script src="assets/epub.js/libs/localforage.min.js"></script>
<script src="assets/epub.js/libs/rsvp.min.js"></script>
<script src="assets/epub.js/epub.js"></script>
<script src="assets/mobile/mobile.js"></script>
<script src="common.js"></script>
<script src="mobile.js"></script>
</html>