index.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="../style.css#" type="text/css" />
  7. <title>Html5 applications</title>
  8. <script type="text/javascript">
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <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>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
  32. <nav>
  33. </nav>
  34. </header>
  35. <br />
  36. <div class="container">
  37. <h1 class="title">Html5 applications
  38. <br>
  39. <span class="subtitle"></span>
  40. </h1>
  41. <ul class="tags">
  42. </ul>
  43. <p>This page is for <a href="../index.html#">uweb browser</a>.<br>
  44. Click to install the following html5 apps:<br>
  45. <a target="_self" href="i:0happ/txtview.html:../../zh/searchurl/txt/txtview.html">Huge markdown file viewer</a><br>
  46. <a target="_self" href="i:0happ/mdkatex.html:../../zh/searchurl/txt/mdkatex.html">Huge markdown+katex file viewer (Tex formulas)</a><br>
  47. <a target="_self" href="i:0happ/markdeep.html:../../zh/searchurl/txt/markdeep.html">Huge markdeep file viewer (markdown, latex, diagram,graphviz etc.)</a><br>
  48. <a target="_self" href="i:0happ/plyr.html:../../zh/searchurl/txt/plyr.cfg">plyr video player</a><br>
  49. <a target="_self" href="i:0happ/dplayer.html:../../zh/searchurl/txt/dplayer.html">dplayer video player</a><br>
  50. <a target="_self" href="i:0happ/pdfviewer.html:../../zh/searchurl/txt/pdfviewer.html">pdf viewer</a><br>
  51. <a target="_self" href="i:0happ/epub.html:../../zh/searchurl/txt/epub.html">epub reader (author:llili)</a><br>
  52. <a target="_self" href="i:0happ/djvu.html:../../zh/searchurl/txt/djvu.html">djvu viewer</a></p>
  53. <p>The corresponding menus can be installed with <a href="../urls/index.html#">url services</a>.</p>
  54. <h4 id="features">Features</h4>
  55. <p>The following mentioned subfolders locate in the configuration folder.</p>
  56. <ul>
  57. <li>
  58. <p>The following html5 applications are allowed to read local files referred by &quot;https://local/sdcard/...&quot; where the &quot;/sdcard/..&quot; 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>
  59. <ul>
  60. <li>Locating in a subfolder whose name begins with &quot;app&quot; (such as &quot;appPDF&quot;)</li>
  61. <li>&quot;https://local/...&quot; applications (only possible with the option &quot;<a href="../offlinecache/index.html#">use offline resources</a>&quot; and installed under the folder &quot;sitecache/local/&quot;)</li>
  62. </ul>
  63. </li>
  64. <li>
  65. <p><span style="color:red">All files under the subfolder &quot;app&quot; can be automatically choosed as file objects by any web page</span>.</p>
  66. </li>
  67. <li>
  68. <p><span style="color:red">Local files (including binary files) can be processed by appending &quot;?app=[html5 app url]&quot; to the file urls.</span> Ex. &quot;file:///..../xx.md?app=https://...../app.html&quot; loads &quot;app.html&quot; first, then &quot;app.html&quot; processes the local file.</p>
  69. </li>
  70. </ul>
  71. <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 &quot;app&quot; can be accessed; The third approach allows easy access of other external resources (ex. local media).</p>
  72. <h4 id="open-local-files-with-html5-apps">Open local files with html5 apps</h4>
  73. <p>Click to configure <a href="../filecap/index.html#">default.filecap</a> to open local files, and to open remote files with the option &quot;custom file handling&quot;:<br>
  74. <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>
  75. <p>url examples are as follows:</p>
  76. <ul>
  77. <li>file:///data/user/0/info.torapp.uweb/files/app/pdfviewer.html?file=[path].pdf#page=[xxx]</li>
  78. <li>file:///data/user/0/info.torapp.uweb/files/app/djvu.html?url=...xx.pdf#page=[xxx]</li>
  79. <li>file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#page=[xxx]</li>
  80. <li>file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#offset=[xxxx]&amp;[length]</li>
  81. <li>file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=[url]#page=[xxx]</li>
  82. <li>file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=[url]#offset=[xxxx]&amp;[length]</li>
  83. </ul>
  84. <p>Ex. &quot;#offset=10000&amp;500&quot; will retrieve 500 bytes from offset 10000. Click the right arrow button to next page in all above file viewers.</p>
  85. <h4 id="configure-html5-app-subfolder-app-optional">Configure html5 app subfolder &quot;app&quot; (optional)</h4>
  86. <p>By default, the subfolder &quot;app&quot; is created by clicking to install any of above html5 applications.</p>
  87. <p>To make file management easier, users can symbolic link the subfolder &quot;app&quot; to any other locations as long as it is readable.</p>
  88. <p>One way to configure &quot;app&quot; subfolder is as follows:</p>
  89. <ul>
  90. <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>
  91. <li>Press the home screen button of uweb browser bottom toolbar, so the home screen appears.</li>
  92. <li>If you want &quot;app&quot; to be locations other than &quot;/sdcard/Download/app&quot;, modify as you like.</li>
  93. <li>Press &quot;enter&quot; on the address bar to execute the command.</li>
  94. </ul>
  95. <h4 id="mdict-dictionary-lookup-search-engines">mdict dictionary lookup search engines:</h4>
  96. <p>Note: the following two mdict.html files are different.<br>
  97. i:5ifile:///....../xxx.mdx,xxx.mdd?app=https://cdn.jsdelivr.net/gh/torappinfo/uweb/en/searchurl/mdict/mdict.html#word=%s</p>
  98. <p>in which &quot;/.../xxx.mdx,xxx.mdd&quot; is the full path for the mdict dictionary files.</p>
  99. <p>i:5ihttps://uwebzh.netlify.app/zh/searchurl/txt/mdict.html?file=mdict/xxx.mdx,mdict/xxx.mdd#word=%s</p>
  100. <p>In the above mdict search engine string, the dictionary files (mdx, mdd) must locate in the &quot;app&quot; subfolder under the configuration folder. In above example, the files &quot;xxx.mdx&quot; and &quot;xxx.mdd&quot; locate in the folder &quot;.../app/mdict&quot;.</p>
  101. <p>To make life easier, users can <a href="../acmd/index.html#">link the &quot;app&quot; subfolder</a> to any public accessible folder.</p>
  102. <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>
  103. </div>
  104. <p>Last Modified: 2 April 2024<br>
  105. add js function in README<br>
  106. <pre></pre>
  107. </p>
  108. <script id='jsgiscus'
  109. src='https://giscus.app/client.js'
  110. data-repo="torappinfo/uweb"
  111. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  112. data-category="Announcements"
  113. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  114. data-mapping="title"
  115. data-strict="0"
  116. data-reactions-enabled="1"
  117. data-emit-metadata="0"
  118. data-input-position="top"
  119. data-theme="light"
  120. data-lang="en"
  121. data-loading="lazy"
  122. crossorigin="anonymous" async>
  123. </script>
  124. <footer class="site-footer">
  125. <div class="container">
  126. &copy; 2018-2024 Richard H. Cao
  127. </div>
  128. </footer>
  129. <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->
  130. </body>
  131. </html>