mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Mon Nov 8 03:41:41 PM CST 2021
This commit is contained in:
parent
6bac3bc9bb
commit
d01266bbc1
6 changed files with 39 additions and 28 deletions
|
@ -360,7 +360,8 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e
|
||||||
<pubDate>Thu, 20 Aug 2020 00:00:00 +0000</pubDate>
|
<pubDate>Thu, 20 Aug 2020 00:00:00 +0000</pubDate>
|
||||||
|
|
||||||
<guid>https://jamesfengcao.gitee.io/uwebzh/html5/</guid>
|
<guid>https://jamesfengcao.gitee.io/uwebzh/html5/</guid>
|
||||||
<description>点击安装超大文件阅读器(支持markdown)
|
<description>点击安装超大文件阅读器(支持txt, html, markdown)
|
||||||
|
点击安装超大文件阅读器(markdeep版, tex, diagram等)
|
||||||
点击安装plyr视频播放器
|
点击安装plyr视频播放器
|
||||||
点击安装dplayer视频播放器
|
点击安装dplayer视频播放器
|
||||||
点击安装pdf阅读器
|
点击安装pdf阅读器
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
<ul class="tags">
|
<ul class="tags">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<p><a target="_self" href="i:0h/sdcard/uweb/app/txtview.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/txtview.html">点击安装超大文件阅读器(支持markdown)</a><br>
|
<p><a target="_self" href="i:0h/sdcard/uweb/app/txtview.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/txtview.html">点击安装超大文件阅读器(支持txt, html, markdown)</a><br>
|
||||||
|
<a target="_self" href="i:0h/sdcard/uweb/app/markdeep.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/markdeep.html">点击安装超大文件阅读器(markdeep版, tex, diagram等)</a><br>
|
||||||
<a target="_self" href="i:0h/sdcard/uweb/app/plyr.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/plyr.cfg">点击安装plyr视频播放器</a><br>
|
<a target="_self" href="i:0h/sdcard/uweb/app/plyr.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/plyr.cfg">点击安装plyr视频播放器</a><br>
|
||||||
<a target="_self" href="i:0h/sdcard/uweb/app/dplayer.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/dplayer.html">点击安装dplayer视频播放器</a><br>
|
<a target="_self" href="i:0h/sdcard/uweb/app/dplayer.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/dplayer.html">点击安装dplayer视频播放器</a><br>
|
||||||
<a target="_self" href="i:0h/sdcard/uweb/app/pdfviewer.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/pdfviewer.html">点击安装pdf阅读器</a><br>
|
<a target="_self" href="i:0h/sdcard/uweb/app/pdfviewer.html:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/pdfviewer.html">点击安装pdf阅读器</a><br>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="generator" content="Hugo 0.88.1" />
|
<meta name="generator" content="Hugo 0.89.0" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,8 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e
|
||||||
<pubDate>Thu, 20 Aug 2020 00:00:00 +0000</pubDate>
|
<pubDate>Thu, 20 Aug 2020 00:00:00 +0000</pubDate>
|
||||||
|
|
||||||
<guid>https://jamesfengcao.gitee.io/uwebzh/html5/</guid>
|
<guid>https://jamesfengcao.gitee.io/uwebzh/html5/</guid>
|
||||||
<description>点击安装超大文件阅读器(支持markdown)
|
<description>点击安装超大文件阅读器(支持txt, html, markdown)
|
||||||
|
点击安装超大文件阅读器(markdeep版, tex, diagram等)
|
||||||
点击安装plyr视频播放器
|
点击安装plyr视频播放器
|
||||||
点击安装dplayer视频播放器
|
点击安装dplayer视频播放器
|
||||||
点击安装pdf阅读器
|
点击安装pdf阅读器
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="https://morgan3d.github.io/markdeep/latest/latex.css?"><!-- Markdeep: --><style class="fallback">body{visibility:hidden}</style>
|
<script>window.markdeepOptions = {mode: 'script'};</script>
|
||||||
<script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js?" charset="utf-8"></script>
|
<script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js"></script>
|
||||||
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('hashchange',loadSlice);
|
|
||||||
function absFile(url) {
|
function absFile(url) {
|
||||||
this.name=url;
|
this.name=url;
|
||||||
this.slice = async(offset, length) =>{
|
this.slice = async(offset, length) =>{
|
||||||
|
@ -21,32 +21,42 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var uwebfile;
|
var file = new absFile(location.search.substring(5));//?url=#page=
|
||||||
|
window.addEventListener('hashchange',loadSlice);
|
||||||
|
loadSlice();
|
||||||
|
|
||||||
function loadSlice(){
|
function loadSlice(){
|
||||||
|
var url;
|
||||||
var page = 1;
|
var page = 1;
|
||||||
var blocksize = 1024;
|
var blocksize = 1024;
|
||||||
var extrasize = 2048;
|
var extrasize = 1024; //extrasize should <= blocksize
|
||||||
|
|
||||||
let lhash = location.hash;
|
let lhash = location.hash;
|
||||||
if(lhash)
|
if(lhash)
|
||||||
page = parseInt(lhash.substring(6),10);
|
page = parseInt(lhash.substring(6),10);
|
||||||
uwebfile.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{
|
file.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{
|
||||||
let u8 = new Uint8Array(buffer);
|
let u8 = new Uint8Array(buffer);
|
||||||
let iStart = 0;
|
let iStart = 0;
|
||||||
if(1!=page){
|
if(1!=page){
|
||||||
while(10!=u8[iStart]) iStart++;
|
for(let i=1;i<extrasize;i=i+2){
|
||||||
|
if(10==u8[i] && 10==u8[i-1]) {
|
||||||
|
iStart = i+1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
let iEnd = u8.indexOf(10,blocksize);//fine newline(10)
|
}
|
||||||
if(-1==iEnd) iEnd = blocksize;
|
}
|
||||||
iEnd++;
|
let iEnd = blocksize;
|
||||||
document.body.innerHTML = new TextDecoder().decode(u8.slice(iStart,iEnd));
|
for(let i=blocksize+1;i<blocksize+extrasize;i=i+2){
|
||||||
|
if(10==u8[i] && 10==u8[i-1]) {
|
||||||
|
iEnd = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.body.innerHTML = window.markdeep.format(new TextDecoder().decode(u8.slice(iStart,iEnd)),true);
|
||||||
|
MathJax.typesetPromise();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
//?url=#page=
|
|
||||||
uwebfile = new absFile(location.search.substring(5));
|
|
||||||
loadSlice();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<body>
|
</body>
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var file;
|
||||||
|
function loadSlice(){
|
||||||
var url;
|
var url;
|
||||||
var page = 1;
|
var page = 1;
|
||||||
var blocksize = 1024;
|
var blocksize = 1024;
|
||||||
var extrasize = 1024; //extrasize should <= blocksize
|
var extrasize = 1024; //extrasize should <= blocksize
|
||||||
var file;
|
|
||||||
function loadSlice(){
|
|
||||||
let lhash = location.hash;
|
let lhash = location.hash;
|
||||||
if(lhash)
|
if(lhash)
|
||||||
page = parseInt(lhash.substring(6),10);
|
page = parseInt(lhash.substring(6),10);
|
||||||
|
@ -51,13 +51,11 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
window.addEventListener('hashchange',loadSlice);
|
window.addEventListener('hashchange',loadSlice);
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
//?url=#page=
|
//?url=#page=
|
||||||
file = new absFile(location.search.substring(5));
|
file = new absFile(location.search.substring(5));
|
||||||
//let viewElement = document.querySelector("#viewer");
|
//let viewElement = document.querySelector("#viewer");
|
||||||
loadSlice();
|
loadSlice();
|
||||||
</script>
|
</script>
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue