From e31e31fdafa321e331409bde9b4ac186aa7ccbcd Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Mon, 15 Nov 2021 16:58:53 +0800 Subject: [PATCH] rebuilding site Mon Nov 15 04:58:53 PM CST 2021 --- _posts/index.xml | 2 +- html5/index.html | 2 +- index.xml | 2 +- searchurl/txt/filecap.cfg | 5 +++-- searchurl/txt/markdeep.html | 25 ++++++++++++++----------- searchurl/txt/txtview.html | 23 +++++++++++++---------- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/_posts/index.xml b/_posts/index.xml index fb2eda0..004b392 100644 --- a/_posts/index.xml +++ b/_posts/index.xml @@ -361,7 +361,7 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e https://jamesfengcao.gitee.io/uwebzh/html5/ 点击安装超大文件阅读器(支持txt, html, markdown) -点击安装超大文件阅读器(markdeep版, tex, diagram等) +点击安装超大文件阅读器(markdeep版, latex, diagram,graphviz等) 点击安装plyr视频播放器 点击安装dplayer视频播放器 点击安装pdf阅读器 diff --git a/html5/index.html b/html5/index.html index 15af3be..bfab45a 100644 --- a/html5/index.html +++ b/html5/index.html @@ -24,7 +24,7 @@

点击安装超大文件阅读器(支持txt, html, markdown)
-点击安装超大文件阅读器(markdeep版, tex, diagram等)
+点击安装超大文件阅读器(markdeep版, latex, diagram,graphviz等)
点击安装plyr视频播放器
点击安装dplayer视频播放器
点击安装pdf阅读器
diff --git a/index.xml b/index.xml index 20e6a70..e6b3ac4 100644 --- a/index.xml +++ b/index.xml @@ -361,7 +361,7 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e https://jamesfengcao.gitee.io/uwebzh/html5/ 点击安装超大文件阅读器(支持txt, html, markdown) -点击安装超大文件阅读器(markdeep版, tex, diagram等) +点击安装超大文件阅读器(markdeep版, latex, diagram,graphviz等) 点击安装plyr视频播放器 点击安装dplayer视频播放器 点击安装pdf阅读器 diff --git a/searchurl/txt/filecap.cfg b/searchurl/txt/filecap.cfg index 82c102c..be1f7f5 100644 --- a/searchurl/txt/filecap.cfg +++ b/searchurl/txt/filecap.cfg @@ -1,5 +1,6 @@ -pdf:uweb:echo file:///sdcard/uweb/app/pdfviewer.html?file=%u -djvu:uweb:echo file:///sdcard/uweb/app/djvu.html?url=%u +pdf:uweb:echo file:///sdcard/uweb/app/pdfviewer.html?file=%u#page=1 +djvu:uweb:echo file:///sdcard/uweb/app/djvu.html?url=%u#page=1 epub:uweb:echo file:///sdcard/uweb/app/epub.html?u=%u txt:uweb:echo file:///sdcard/uweb/app/txtview.html?url=%u#page=1 +md.html:uweb:echo file:///sdcard/uweb/app/markdeep.html?url=%u#page=1 py:termux/*:python %f;exit -1 diff --git a/searchurl/txt/markdeep.html b/searchurl/txt/markdeep.html index b43a017..d87b052 100644 --- a/searchurl/txt/markdeep.html +++ b/searchurl/txt/markdeep.html @@ -20,15 +20,20 @@ //return await resp.text(); } } - - function render(u8array){ - document.body.innerHTML = window.markdeep.format(new TextDecoder().decode(u8array),true); - MathJax.typesetPromise(); - } var file; var blocksize = 1024; function loadSlice(){ + function render(u8array){ + document.body.innerHTML = window.markdeep.format(new TextDecoder().decode(u8array),true); + MathJax.typesetPromise(); + } + function setPageUrl(pageurl){ + let a = document.createElement('a'); + a.href = "i:5c"+pageurl; + a.click(); + } + var url; var page = 1; var extrasize = blocksize; //extrasize should <= blocksize @@ -41,11 +46,8 @@ {//update urlInc() url let href = location.href; let iHash = href.indexOf('#'); - href="i:5c"+href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize); - let d=document; - let a = d.createElement('a'); - a.href = href; - a.click(); + href=href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize); + setPageUrl(href); } file.slice(offset,len).then((buffer)=>{ let u8 = new Uint8Array(buffer); @@ -55,7 +57,8 @@ } //#page= page = parseInt(lhash.substring(6)); - } + }else + setPageUrl(location.href+"#page=1"); file.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{ let u8 = new Uint8Array(buffer); let u8len = u8.length; diff --git a/searchurl/txt/txtview.html b/searchurl/txt/txtview.html index 3bb1217..ebca5bf 100644 --- a/searchurl/txt/txtview.html +++ b/searchurl/txt/txtview.html @@ -18,14 +18,19 @@ //return await resp.text(); } } - - function render(u8array){ - document.body.innerHTML = marked(new TextDecoder().decode(u8array)); - } var file; var blocksize = 1024; function loadSlice(){ + function render(u8array){ + document.body.innerHTML = marked(new TextDecoder().decode(u8array)); + } + function setPageUrl(pageurl){ + let a = document.createElement('a'); + a.href = "i:5c"+pageurl; + a.click(); + } + var url; var page = 1; var extrasize = blocksize; //extrasize should <= blocksize @@ -38,11 +43,8 @@ {//update urlInc() url let href = location.href; let iHash = href.indexOf('#'); - href="i:5c"+href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize); - let d=document; - let a = d.createElement('a'); - a.href = href; - a.click(); + href=href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize); + setPageUrl(href); } file.slice(offset,len).then((buffer)=>{ let u8 = new Uint8Array(buffer); @@ -52,7 +54,8 @@ } //#page= page = parseInt(lhash.substring(6)); - } + }else + setPageUrl(location.href+"#page=1"); file.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{ let u8 = new Uint8Array(buffer); let u8len = u8.length;