index.html 4.2 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="stylesheet" href="../style.css#" type="text/css" />
  7. <title>分类多引擎搜索</title>
  8. <script>
  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('en')">English</a>
  32. <nav>
  33. </nav>
  34. </header>
  35. <br />
  36. <div class="container">
  37. <h1 class="title">分类多引擎搜索
  38. <br>
  39. <span class="subtitle"></span>
  40. </h1>
  41. <ul class="tags">
  42. <li><a href="../tags/%e6%90%9c%e7%b4%a2/index.html#">搜索</a> </li>
  43. </ul>
  44. <p><a target="_self" href="i:0bhttps://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/searchcat.tar.gz">点击本链接自动安装分类多引擎文件至&quot;bookmark&quot;目录下</a>。</p>
  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#">bingUS engine w/ chatgpt</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: 2 April 2024<br>
  65. add js function in README<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>