index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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="canonical" href="https://jamesfengcao.gitlab.io/uweb/zh/searchcat/" />
  7. <link rel="stylesheet" href="../style.css#" type="text/css" />
  8. <title>分类多引擎搜索</title>
  9. <script>
  10. function findLang(){
  11. let href = location.href;
  12. for(let i=href.length-1;i>0;i--){
  13. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  14. return i;
  15. }
  16. return 0;
  17. }
  18. function nav2(page){
  19. let i = findLang();
  20. location.href = location.href.substring(0,i+1)+page;
  21. }
  22. function nav2Lang(lang){
  23. let i = findLang();
  24. let href = location.href;
  25. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  26. }
  27. </script>
  28. </head>
  29. <body>
  30. <header class='header'>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">首页</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">标签</a>
  32. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
  33. <nav>
  34. </nav>
  35. </header>
  36. <br />
  37. <div class="container">
  38. <h1 class="title">分类多引擎搜索
  39. <br>
  40. <span class="subtitle"></span>
  41. </h1>
  42. <ul class="tags">
  43. <li><a href="../tags/%e6%90%9c%e7%b4%a2/index.html#">搜索</a> </li>
  44. </ul>
  45. <p><a href="..">超微浏览器</a>中通过“设置”-&gt;“总目录”-&gt;“↑”-&gt;“Download”,点击后缀为.search的下载文件,超微浏览器将自动显示分类多引擎搜索。此时可按菜单键(或长按底部工具条后退按钮)选择“添加到桌面”方便以后访问。</p>
  46. <p>.search文件每行格式为如下几种:<br>
  47. [搜索引擎名]:[不含%s的url]<br>
  48. [搜索引擎名]:[含%s的url]<br>
  49. [搜索引擎名]:POST:[含%s的post参数]:[url]<br>
  50. [Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]</p>
  51. <ul>
  52. <li>[Extra request headers] Ex. &quot;X-Forwarded-For;8.8.8.8&quot;</li>
  53. <li>when [post params] is empty, the url should have '%s' as keyword. Ex. <a href="../search/index.html#">search engines</a></li>
  54. </ul>
  55. <p>.search文件首行必须为第一种类型的搜索引擎。由于其它类型的引擎数量稀少,为性能考虑,超微限制了首个引擎的种类。<br>
  56. 用&quot;i:&quot;等超微内部scheme作开头的搜索引擎,关键词部分仅支持使用&quot;%s&quot;,这纯粹是为了降低代码复杂性。</p>
  57. <h4 id="本地引擎">本地引擎</h4>
  58. <p>搜索引擎已经支持命令行url,现在可添加离线字典查询至主页。命令行url格式为<br>
  59. c:[含%s的命令行]<br>
  60. d:mimetype:[含%s的命令行]:[外部资源url]<br>
  61. 查询时关键词会自动替换命令行中的%s。</p>
  62. <p>笔者用来查询各式词典,发现效果非常好。百兆以内的文本文件压缩以后可以直接快速检索,定位至特定位置以后可上下滚动阅读全部文本。</p>
  63. </div>
  64. <p>Last Modified: 12 December 2024<br>
  65. cleanup<br>
  66. <pre></pre>
  67. </p>
  68. <script id='jsgiscus'
  69. src='https://giscus.app/client.js'
  70. data-repo="torappinfo/uweb"
  71. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  72. data-category="Announcements"
  73. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  74. data-mapping="title"
  75. data-strict="0"
  76. data-reactions-enabled="1"
  77. data-emit-metadata="0"
  78. data-input-position="top"
  79. data-theme="light"
  80. data-lang="en"
  81. data-loading="lazy"
  82. crossorigin="anonymous" async>
  83. </script>
  84. <footer class="site-footer">
  85. <div class="container">
  86. &copy; 2018-2024 Richard H. Cao
  87. </div>
  88. </footer>
  89. <!-- 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/>. -->
  90. </body>
  91. </html>