mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Sun Oct 3 05:05:30 PM CST 2021
This commit is contained in:
parent
47b6d5547e
commit
e3620a2109
3 changed files with 126 additions and 48 deletions
|
@ -33,11 +33,6 @@
|
|||
<span>超微浏览器主屏配置</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="post">
|
||||
<a href="searchurl/func.html">
|
||||
<span>超微浏览器界面配置及杂项功能</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="post">
|
||||
<a href="searchurl/search.html">
|
||||
<span>浏览器多搜索引擎一键直达</span>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width" />
|
||||
<script>function g(t){document.location.href=t+document.forms[0].q.value}
|
||||
var flg=%1%;
|
||||
var checkBoxes;
|
||||
function checkbox_set(num){var i;for(i=0;i<num;i++)checkBoxes[i].checked=true;return true;}
|
||||
function checkbox_reset(num){var i;for(i=0;i<num;i++)checkBoxes[i].checked=false;return true;}
|
||||
|
@ -24,37 +23,39 @@ body>ul{padding-left:0;}
|
|||
|
||||
<p><a href="i:252097151" onclick="return checkbox_toggle(checkBoxes.length);">切换</a>/<a href="i:260" onclick="return checkbox_reset(checkBoxes.length);">重置</a>/<a href="i:262097151" onclick="return checkbox_set(checkBoxes.length);">反置所有</a>/<a href="i:2631" onclick="return checkbox_set(5);">反置前五个</a>/<a href="i:26511" onclick="return checkbox_set(9);">反置前九个</a>以下功能 (点击链接可切换):</p>
|
||||
<ul>
|
||||
<li><a href="i:251"><label><input type="checkbox"/>新窗口打开服务 (长按图像/历史按钮等)</label></a></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:252'"/>新窗口打开服务 (长按图像/历史按钮等)</label></li>
|
||||
<li>工具按钮短按长按功能互换
|
||||
<ul>
|
||||
<li><a href="i:252"><label><input type="checkbox"/>[☰]</label></a></li>
|
||||
<li><a href="i:254"><label><input type="checkbox"/>设置</label></a></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:252'"/>[☰]</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:254'"/>设置</label></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="i:258"><label><input type="checkbox"/>被调用20秒内按后退键后台装载页面</label></a></li>
|
||||
<li><a href="i:2516"><label><input type="checkbox"/>无安全证书警告</label></a></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:258'"/>被调用20秒内按后退键后台装载页面</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2516'"/>无安全证书警告</label></li>
|
||||
----------------5---------------
|
||||
<li><a href="i:2532"><label><input type="checkbox"/>新窗口打开下个引擎搜索</label></a></li>
|
||||
<li><a href="i:2564"><label><input type="checkbox"/>自动填充采用从头开始匹配</label></a></li>
|
||||
<li><a href="i:25128"><label><input type="checkbox"/>禁用videoplayer.js</label></a></li>
|
||||
<li><a href="i:25256"><label><input type="checkbox"/>自动调整文本大小</label></a></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2532'"/>新窗口打开下个引擎搜索</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2564'"/>自动填充采用从头开始匹配</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25128'"/>禁用videoplayer.js</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25256'"/>自动调整文本大小</label></li>
|
||||
----------------9---------------
|
||||
<li><a href="i:25512"><label><input type="checkbox"/>长按链接命令菜单切换为常用链接</label></a></li>
|
||||
<li><a href="i:251024"><label><input type="checkbox"/>长按链接命令菜单切换为常用命令</label></a></li>
|
||||
<li><a href="i:252048"><label><input type="checkbox"/>隐藏地址栏</label></a></li>
|
||||
<li><a href="i:254096"><label><input type="checkbox"/>隐藏工具条</label></a></li>
|
||||
<li><a href="i:258192"><label><input type="checkbox"/>不使用双列书签</label></a></li>
|
||||
<li><a href="i:2516384"><label><input type="checkbox"/>主屏使用"query.autoc"常用查询列表(android8+以上webview有bug)</label></a></li>
|
||||
<li><a href="i:2532768"><label><input type="checkbox"/>全屏播放不自动横屏</label></a></li>
|
||||
<li><a href="i:2565536"><label><input type="checkbox"/>禁止弹出JS确认框</label></a></li>
|
||||
<li><a href="i:25131072"><label><input type="checkbox"/>保存查询历史</label></a></li>
|
||||
<li><a href="i:25262144"><label><input type="checkbox"/>切换窗口时保留面板</label></a></li>
|
||||
<li><a href="i:25524288"><label><input type="checkbox"/>弹出视频地址时同时弹出iframe地址</label></a></li>
|
||||
<li><a href="i:251048576"><label><input type="checkbox"/>关闭窗口保持音频播放</label></a></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25512'"/>长按链接命令菜单切换为常用链接</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:251024'"/>长按链接命令菜单切换为常用命令</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:252048'"/>隐藏地址栏</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:254096'"/>隐藏工具条</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:258192'"/>不使用双列书签</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2516384'"/>主屏使用"query.autoc"常用查询列表(android8+以上webview有bug)</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2532768'"/>全屏播放不自动横屏</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:2565536'"/>禁止弹出JS确认框</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25131072'"/>保存查询历史</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25262144'"/>切换窗口时保留面板</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:25524288'"/>弹出视频地址时同时弹出iframe地址</label></li>
|
||||
<li><label><input type="checkbox" onchange="location.href='i:251048576'"/>关闭窗口保持音频播放</label></li>
|
||||
</ul>
|
||||
<script>
|
||||
checkBoxes=document.getElementsByTagName("input");
|
||||
</script><script>
|
||||
let len=checkBoxes.length;
|
||||
let flg=%1%;
|
||||
for(let i=0;i<len;i++){
|
||||
if(flg&(1<<i))checkBoxes[i].checked=true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
|
@ -20,6 +21,7 @@
|
|||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
|
@ -28,19 +30,39 @@
|
|||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.meun {
|
||||
display: flex;
|
||||
height: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
#toc,
|
||||
#page {
|
||||
|
||||
#toc {
|
||||
flex: 1;
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
padding-left: .4rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#page {
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
color: #333;
|
||||
padding-right: 0.4rem;
|
||||
text-align: right;
|
||||
flex: 0 0 .5rem;
|
||||
}
|
||||
|
||||
#load {
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
color: #333;
|
||||
padding-right: 0.4rem;
|
||||
text-align: right;
|
||||
flex: 0 0 .5rem;
|
||||
}
|
||||
|
||||
#toc-content {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
|
@ -53,6 +75,7 @@
|
|||
background: white;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
#toc-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -62,6 +85,7 @@
|
|||
height: 100%;
|
||||
background: rgba(51, 51, 51, .8);
|
||||
}
|
||||
|
||||
.intro {
|
||||
width: 100%;
|
||||
height: 2.4rem;
|
||||
|
@ -71,6 +95,7 @@
|
|||
display: flex;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.txt {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
@ -78,15 +103,18 @@
|
|||
padding: 0 .2rem;
|
||||
font-size: .3rem;
|
||||
}
|
||||
|
||||
#content {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: .2rem .4rem;
|
||||
border-bottom: .07rem solid #f4f4f4;
|
||||
font-size: .4rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#open {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
@ -97,26 +125,32 @@
|
|||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
#open span {
|
||||
padding: .3rem .3rem;
|
||||
border: .05rem solid #333;
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
.read {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
#prev {
|
||||
flex: 0 0 2rem;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#viewer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#next {
|
||||
flex: 0 0 2rem;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.save {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -126,8 +160,27 @@
|
|||
justify-content: center;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.jump {
|
||||
display: flex;
|
||||
height: 1rem;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.jump input {
|
||||
flex: 1;
|
||||
padding: .1rem .1rem;
|
||||
margin: .2rem .2rem .2rem .4rem;
|
||||
outline: none;
|
||||
font-size: .3rem;
|
||||
}
|
||||
|
||||
.jump span {
|
||||
flex: 0 0 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="ebook">
|
||||
<div class="mask">
|
||||
|
@ -143,7 +196,8 @@
|
|||
</div>
|
||||
<div class="meun">
|
||||
<div id="toc" onclick="showhide()"></div>
|
||||
<div id="page" style="padding-left: 0;padding-right: 0.4rem;text-align: right;flex: 0 0 .5rem;"></div>
|
||||
<div id="page"></div>
|
||||
<div id="load"></div>
|
||||
</div>
|
||||
<div id="toc-mask" style="display: none;" onclick="showhide()"></div>
|
||||
<div id="toc-content" style="display: none;">
|
||||
|
@ -161,12 +215,16 @@
|
|||
<div class="txt box" onclick="get()">读档</div>
|
||||
<div class="txt box" onclick="del()">删档</div>
|
||||
</div>
|
||||
<div class="jump">
|
||||
<input id="jump" type="number" placeholder="0-1之间的数字,如0.25"
|
||||
oninput="if(value>1)value=1;if(value<0)value=0">
|
||||
<span class="txt" onclick="jump()">跳转</span>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var local = [];
|
||||
let url = location.search.substring(3);
|
||||
if (url !== "") {
|
||||
var book = ePub(url);
|
||||
|
@ -193,26 +251,40 @@
|
|||
height: window.innerHeight - 20
|
||||
});
|
||||
rendition.display();
|
||||
|
||||
book.ready
|
||||
.then(() => {
|
||||
var local = localStorage.getItem(book.key() + '-locations');
|
||||
if (local) {
|
||||
return book.locations.load(local);
|
||||
} else {
|
||||
return book.locations.generate();
|
||||
}
|
||||
})
|
||||
.then(locations => {
|
||||
localStorage.setItem(book.key() + '-locations', book.locations.save());
|
||||
})
|
||||
|
||||
// 目录
|
||||
book.loaded.navigation.then(function (toc) {
|
||||
var stored = localStorage.getItem(book.key() + '-locations');
|
||||
if (stored) {
|
||||
rendition.display(stored);
|
||||
book.loaded.navigation.then(toc => {
|
||||
var read = localStorage.getItem(book.key() + '-read');
|
||||
if (read) {
|
||||
rendition.display(read);
|
||||
}
|
||||
var $content = document.getElementById("content");
|
||||
toc.forEach(function (chapter) {
|
||||
toc.forEach(item => {
|
||||
var div = document.createElement("div");
|
||||
div.className = "item";
|
||||
div.textContent = chapter.label;
|
||||
div.addEventListener("click", function () {
|
||||
rendition.display(chapter.href);
|
||||
div.textContent = item.label;
|
||||
div.addEventListener("click", () => {
|
||||
rendition.display(item.href);
|
||||
showhide()
|
||||
});
|
||||
$content.appendChild(div)
|
||||
})
|
||||
})
|
||||
//简介
|
||||
book.loaded.metadata.then(function (meta) {
|
||||
book.loaded.metadata.then(meta => {
|
||||
var $title = document.getElementById("title");
|
||||
var $author = document.getElementById("author");
|
||||
var $cover = document.getElementById("cover");
|
||||
|
@ -224,20 +296,23 @@
|
|||
$pubdate.textContent = `时间:${meta.pubdate}`;
|
||||
if (book.archive) {
|
||||
book.archive.createUrl(book.cover)
|
||||
.then(function (url) {
|
||||
.then(url => {
|
||||
$cover.src = url;
|
||||
})
|
||||
} else {
|
||||
$cover.src = book.cover;
|
||||
}
|
||||
});
|
||||
//页数
|
||||
rendition.on('relocated', function (location) {
|
||||
//进度显示
|
||||
rendition.on('relocated', location => {
|
||||
var percent = book.locations.percentageFromCfi(location.start.cfi);
|
||||
var $page = document.getElementById("page");
|
||||
var $load = document.getElementById("load");
|
||||
$page.textContent = location.end.displayed.page + '/' + location.end.displayed.total;
|
||||
$load.textContent = Math.fround(percent * 100).toFixed(1) + '%';
|
||||
})
|
||||
//章节
|
||||
rendition.on("rendered", function (section) {
|
||||
//章节名显示
|
||||
rendition.on("rendered", section => {
|
||||
var $toc = document.getElementById("toc");
|
||||
$toc.textContent = "目录";
|
||||
$toc.textContent = book.navigation.get(section.href).label;
|
||||
|
@ -253,18 +328,25 @@
|
|||
$mask.style.display = "none"
|
||||
}
|
||||
}
|
||||
function jump() {
|
||||
$jump = document.getElementById("jump").value;
|
||||
rendition.display(book.locations.cfiFromPercentage($jump));
|
||||
showhide();
|
||||
document.getElementById("jump").value = "";
|
||||
}
|
||||
function save() {
|
||||
localStorage.setItem(book.key() + '-locations', rendition.currentLocation().start.cfi)
|
||||
localStorage.setItem(book.key() + '-read', rendition.currentLocation().start.cfi)
|
||||
showhide()
|
||||
}
|
||||
function get() {
|
||||
rendition.display(localStorage.getItem(book.key() + '-locations'));
|
||||
rendition.display(localStorage.getItem(book.key() + '-read'));
|
||||
showhide()
|
||||
}
|
||||
function del() {
|
||||
localStorage.removeItem(book.key() + '-locations');
|
||||
localStorage.removeItem(book.key() + '-read');
|
||||
showhide()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue