mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
135 lines
7.7 KiB
HTML
135 lines
7.7 KiB
HTML
<!doctype html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<link rel="stylesheet" href="../style.css#" type="text/css" />
|
||
<title>Html5 applications</title>
|
||
<script type="text/javascript">
|
||
function findLang(){
|
||
let href = location.href;
|
||
for(let i=href.length-1;i>0;i--){
|
||
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
|
||
return i;
|
||
}
|
||
return 0;
|
||
}
|
||
function nav2(page){
|
||
let i = findLang();
|
||
location.href = location.href.substring(0,i+1)+page;
|
||
}
|
||
function nav2Lang(lang){
|
||
let i = findLang();
|
||
let href = location.href;
|
||
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<header class='header'>
|
||
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">Tags</a>
|
||
|
||
|
||
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
|
||
|
||
|
||
<nav>
|
||
</nav>
|
||
</header>
|
||
<br />
|
||
|
||
<div class="container">
|
||
<h1 class="title">Html5 applications
|
||
<br>
|
||
<span class="subtitle"></span>
|
||
</h1>
|
||
<ul class="tags">
|
||
|
||
</ul>
|
||
<p>This page is for <a href="../index.html#">uweb browser</a>.<br>
|
||
Click to install the following html5 apps:<br>
|
||
<a target="_self" href="i:0happ/txtview.html:../../zh/searchurl/txt/txtview.html">Huge markdown file viewer</a><br>
|
||
<a target="_self" href="i:0happ/mdkatex.html:../../zh/searchurl/txt/mdkatex.html">Huge markdown+katex file viewer (Tex formulas)</a><br>
|
||
<a target="_self" href="i:0happ/markdeep.html:../../zh/searchurl/txt/markdeep.html">Huge markdeep file viewer (markdown, latex, diagram,graphviz etc.)</a><br>
|
||
<a target="_self" href="i:0happ/plyr.html:../../zh/searchurl/txt/plyr.cfg">plyr video player</a><br>
|
||
<a target="_self" href="i:0happ/dplayer.html:../../zh/searchurl/txt/dplayer.html">dplayer video player</a><br>
|
||
<a target="_self" href="i:0happ/pdfviewer.html:../../zh/searchurl/txt/pdfviewer.html">pdf viewer</a><br>
|
||
<a target="_self" href="i:0happ/epub.html:../../zh/searchurl/txt/epub.html">epub reader (author:llili)</a><br>
|
||
<a target="_self" href="i:0happ/djvu.html:../../zh/searchurl/txt/djvu.html">djvu viewer</a></p>
|
||
<p>The corresponding menus can be installed with <a href="../urls/index.html#">url services</a>.</p>
|
||
<h4 id="features">Features</h4>
|
||
<p>The following mentioned subfolders locate in the configuration folder.</p>
|
||
<ul>
|
||
<li>
|
||
<p>The following html5 applications are allowed to read local files referred by "https://local/sdcard/..." where the "/sdcard/.." part is the full path of the file. The below applications <span style="color:red">can auto choose any files as file objects</span>.</p>
|
||
<ul>
|
||
<li>Locating in a subfolder whose name begins with "app" (such as "appPDF")</li>
|
||
<li>"https://local/..." applications (only possible with the option "<a href="../offlinecache/index.html#">use offline resources</a>" and installed under the folder "sitecache/local/")</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><span style="color:red">All files under the subfolder "app" can be automatically choosed as file objects by any web page</span>.</p>
|
||
</li>
|
||
<li>
|
||
<p><span style="color:red">Local files (including binary files) can be processed by appending "?app=[html5 app url]" to the file urls.</span> Ex. "file:///..../xx.md?app=https://...../app.html" loads "app.html" first, then "app.html" processes the local file.</p>
|
||
</li>
|
||
</ul>
|
||
<p>With the first approach, the html5 application is installed locally and can read any file allowed by the OS; while in the second approach, the html5 application can be either local or remote, and only files under the subfolder "app" can be accessed; The third approach allows easy access of other external resources (ex. local media).</p>
|
||
<h4 id="open-local-files-with-html5-apps">Open local files with html5 apps</h4>
|
||
<p>Click to configure <a href="../filecap/index.html#">default.filecap</a> to open local files, and to open remote files with the option "custom file handling":<br>
|
||
<a target="_self" href="i:0gdefault.filecap:../../zh/searchurl/txt/filecap.cfg">use pdf.js,djvu.js,epub.js, huge markdown viewer for local files</a></p>
|
||
<p>url examples are as follows:</p>
|
||
<ul>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/pdfviewer.html?file=[path].pdf#page=[xxx]</li>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/djvu.html?url=...xx.pdf#page=[xxx]</li>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#page=[xxx]</li>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#offset=[xxxx]&[length]</li>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=[url]#page=[xxx]</li>
|
||
<li>file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=[url]#offset=[xxxx]&[length]</li>
|
||
</ul>
|
||
<p>Ex. "#offset=10000&500" will retrieve 500 bytes from offset 10000. Click the right arrow button to next page in all above file viewers.</p>
|
||
<h4 id="configure-html5-app-subfolder-app-optional">Configure html5 app subfolder "app" (optional)</h4>
|
||
<p>By default, the subfolder "app" is created by clicking to install any of above html5 applications.</p>
|
||
<p>To make file management easier, users can symbolic link the subfolder "app" to any other locations as long as it is readable.</p>
|
||
<p>One way to configure "app" subfolder is as follows:</p>
|
||
<ul>
|
||
<li><a href="i:15d:text/plain:toybox mkdir -p /sdcard/Download/app;toybox ln -s /sdcard/Download/app 2>&1:">Click to copy the command to the address bar</a></li>
|
||
<li>Press the home screen button of uweb browser bottom toolbar, so the home screen appears.</li>
|
||
<li>If you want "app" to be locations other than "/sdcard/Download/app", modify as you like.</li>
|
||
<li>Press "enter" on the address bar to execute the command.</li>
|
||
</ul>
|
||
<h4 id="mdict-dictionary-lookup-search-engines">mdict dictionary lookup search engines:</h4>
|
||
<p>Note: the following two mdict.html files are different.<br>
|
||
i:5ifile:///....../xxx.mdx,xxx.mdd?app=https://cdn.jsdelivr.net/gh/torappinfo/uweb/en/searchurl/mdict/mdict.html#word=%s</p>
|
||
<p>in which "/.../xxx.mdx,xxx.mdd" is the full path for the mdict dictionary files.</p>
|
||
<p>i:5ihttps://uwebzh.netlify.app/zh/searchurl/txt/mdict.html?file=mdict/xxx.mdx,mdict/xxx.mdd#word=%s</p>
|
||
<p>In the above mdict search engine string, the dictionary files (mdx, mdd) must locate in the "app" subfolder under the configuration folder. In above example, the files "xxx.mdx" and "xxx.mdd" locate in the folder ".../app/mdict".</p>
|
||
<p>To make life easier, users can <a href="../acmd/index.html#">link the "app" subfolder</a> to any public accessible folder.</p>
|
||
<p>Use the mdx scanning <a href="../bookmark/index.html#">bookmark</a> to add mdict engines automatically, then cold start uweb browser to take effect.</p>
|
||
|
||
</div>
|
||
<p>Last Modified: 2 April 2024<br>
|
||
add js function in README<br>
|
||
<pre></pre>
|
||
</p>
|
||
|
||
<script id='jsgiscus'
|
||
src='https://giscus.app/client.js'
|
||
data-repo="torappinfo/uweb"
|
||
data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
|
||
data-category="Announcements"
|
||
data-category-id="DIC_kwDOEgNLGc4CQjsh"
|
||
data-mapping="title"
|
||
data-strict="0"
|
||
data-reactions-enabled="1"
|
||
data-emit-metadata="0"
|
||
data-input-position="top"
|
||
data-theme="light"
|
||
data-lang="en"
|
||
data-loading="lazy"
|
||
crossorigin="anonymous" async>
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|