diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f1c588bd..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.apk filter=lfs diff=lfs merge=lfs -text diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 3978773b..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,10 +0,0 @@ -pages: - stage: deploy - script: - - rm -rf public - - mkdir tpublic - - ls | grep -v tpublic | xargs cp -r -t tpublic - - mv tpublic public - artifacts: - paths: - - public diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e69de29b..00000000 diff --git a/README.md b/README.md index 3f4c7278..8124ead8 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,6 @@ -### Uweb browser: minimal suckless web browser with unlimited power -中文 +#### Uweb browser +[Uweb browser: updates, plugins and tips](https://torappinfo.github.io/uwebzh/en) -[Amazon appstore](https://www.amazon.com/TorApp-Info-uweb-browser-for-geeks/dp/B098QPR6N5) -[Galaxy.Store](https://galaxystore.samsung.com/detail/info.torapp.uweb) -Downloads - -[Uweb browser: downloads, plugins and tips](https://torappinfo.github.io/uweb/en/) -(Mirrors: [gitlab](https://jamesfengcao.gitlab.io/uweb/en/) [frama](https://torappinfo.frama.io/uweb/en/) [codeberg](https://jamesfengcao.codeberg.page/en/) [repo](https://repo.or.cz/uweb.git/blob_plain/HEAD:/en/index.html) [fleek](https://uweb.on-fleek.app/en/) [netlify](https://uwebzh.netlify.app/en/) [surge](https://uweb.surge.sh/en/) [kinsta](https://uwebbrowser-t27o4.kinsta.page) [zeabur](https://uweb.zeabur.app/en/) [bitbucket](https://torappinfo.bitbucket.io/en/) [pages](https://muweb.pages.dev/en/) [vercel](https://uweb.vercel.app/en/) [render](https://uweb.onrender.com/en/) More...) - - - AI chat as search engine; optimized UI for both AI and traditional search; [input helpers](https://uwebzh.netlify.app/en/input/index.html#) for complex query. -- Global redirection to bypass censorship. -- Convenient: Any AI chatbot/book/dictionary/txt/command line/app/webapp (web extensions) as search engine. -- Tiny: less than 250k. -- Fast: run fast, even with thousands of user provided css/scripts/htmls. -- Efficient: less touches, one click to reach any number of search engines without repeated input; automate online services. -- Powerful: any native functionality with html5 enhancement and still secure; any urls to host website; javascript and shell scripting for general processing. -- Customizable: user-defined menus, (new) buttons and gestures for user agents, bookmarklets, url services, shell commands, internal functionality links and text processing etc. -- URL bar command line support ("!" and .js file as command). -- Site-specific JS/CSS/HTML/preprocessing. -- Online play/preview/preprocess for downloadable resources. -- Multiple type profiles: switch any data including website logins, user configurations orthogonally. -- Supports enhanced user "hosts" file. Empty IP address to lift all server-imposed limitations. -- Website test automation scripting. crontab support (alarm clock and more). - -#### Main features -Custom paper size PDF export and long vector screenshot, TTS, text reflow, resource sniffer, translation, reader's mode, user-defined url redirection, webdav/http backup & restore, auto next page, sending/receiving msg/file(s), site config (UA, no JS, no image, no 3rd party script/resource,active script, global scripts), http(s)/socks proxy, Wake-on-LAN, enabling html5 apps for local files (pdf/djvu/epub viewer, mdict dictionary lookup etc.). - -- Bookmarklets (works for CSP sites and with option to auto apply to similar sites) -- AD blocking (block whole root domain trees etc.) -- Serverless local sites: PWA-kind web extension (chrome .crx & firefox .xpi) support. -- Resizable floating video support. - -#### Screenshots -![](https://i.postimg.cc/rsL9G5N1/home1.png) -![](https://i.postimg.cc/9QxJ3Rc2/globalcss.png) -![](https://i.postimg.cc/VksDHBQ4/globaljs.png) -![](https://i.postimg.cc/HLV3TYLy/longclick.png) -![](https://i.postimg.cc/XJ58ysdN/option1.png) -![](https://i.postimg.cc/0NFnQT6H/option2.png) - -#### Ebrowser for Windows, MacOS and Linux -Ebrowser is a simple version of uweb browser on the desktop. -- Fully open source. -- Capture long screenshot as vector graphics. -- Enabling web tech for vector designing to replace Adobe Illustrator/Inkscape. - -#### Help with localization -We encourage everyone to help with localization. The following is how to do. - -- Fork this repository -- Copy res/values/strings.xml to path like res/values-%(lang)/, replace %(lang) with [the ISO 639-1 language code](http://www.loc.gov/standards/iso639-2/php/code_list.php). -- Translate res/values-%(lang)/strings.xml -- Translate assets/help_%(lang).html from assets/help_en.html -- Make a Pull Request +(Mirrors: [vercel](https://uweb-zh.vercel.app/en) +[netlify](https://uwebzh.netlify.app/en) +[pages](https://uwebzh.pages.dev/en)) \ No newline at end of file diff --git a/README.zh-Hans.md b/README.zh-Hans.md deleted file mode 100644 index bd197ef1..00000000 --- a/README.zh-Hans.md +++ /dev/null @@ -1,63 +0,0 @@ -### 超微浏览器 (uweb browser): 释放无尽威能,微、威、快、高效、极致优化 -English -捐赠 - - -[Amazon appstore](https://www.amazon.com/TorApp-Info-uweb-browser-for-geeks/dp/B098QPR6N5) -[Galaxy.Store](https://galaxystore.samsung.com/detail/info.torapp.uweb) -下载 - -[超微浏览器下载及使用技巧](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) -(镜像: [grebe](https://uweb.grebedoc.dev/zh/) [gitlab](https://jamesfengcao.gitlab.io/uweb/zh/) [frama](https://torappinfo.frama.io/uweb/zh/) [repo](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) [codeberg](https://uweb.codeberg.page/zh/) [github](https://torappinfo.github.io/uweb/zh/) [render](https://uweb.onrender.com/zh/) [surge](https://uweb.surge.sh/zh/) [netlify](https://uwebzh.netlify.app/zh/) [pgs](https://uweb-m.pgs.sh/zh/) [kinsta](https://uwebbrowser-t27o4.kinsta.page/zh/) [fleek](https://uweb.on-fleek.app/zh/) [pages](https://muweb.pages.dev/zh/) [bitbucket](https://torappinfo.bitbucket.io/zh/) [torapp](https://torapp.eu.org/zh/) [torappv](https://uweb.torapp.eu.org/zh/) [zeabur](https://uweb.zeabur.app/zh/) [static](https://uweb.staticrun.app) [statichost](https://torappinfo-uweb.statichost.eu) [maozi](https://uweb.maozi.io/zh/) [vercel](https://uweb.vercel.app/zh/) 专用镜像...) - -- 提供20多deepseek满血版接入点。 -- 免魔法国内直接访问英文技术网站如google、百科等 -- 无需帐号,无限制支持claude4.5,chatgpt5.1, gemini 2.5 pro/flash, grok4等超过500个最新AI模型免费使用。(少部分地区需配合上一条技术) -- AI聊天可作为搜索引擎,对复杂问询提供多种[输入辅助](https://uwebzh.netlify.app/zh/input/index.html#);不受剪贴板长度限制,[超长文本自由传](https://uwebzh.netlify.app/zh/textprocess/index.html#) (AI输入或共享)。 -- 微:不到250K。 -- 威:无穷无尽的功能,使用增强后的html5可以实现任何本地应用功能。支持使用js脚本、url服务、shell命令、内部功能链接定制菜单/(新)按钮/手势; 远程数据皆可成网站。 -- 便捷:AI聊天/图书/txt/词典/命令行/APP/webapp可作为搜索引擎使用。 -- 快:手机越慢,脚本插件越多越明显。 -- 高效:最少的操作,在线服务全自动(参看常用链接网页)。 -- 极致优化:最少存储写操作,比如浏览器转到后台前配置变化如恢复成原样则无写操作。 -- 地址栏支持命令行 ("!", 物理键盘支持更佳) -- 指定域名: 用户定义JS/CSS/HTML/显示前源码预处理 -- 支持用户定义域名属性。 -- 下载资源在线播放/预览/预处理。 -- 独立切换网站登录、配置文件。 -- 支持网站测试自动化脚本 (可用于app服务端测试)。支持crontab(闹钟、定时任务等)。 - -#### 截屏 -![](https://i.postimg.cc/rsL9G5N1/home1.png) -![](https://i.postimg.cc/9QxJ3Rc2/globalcss.png) -![](https://i.postimg.cc/VksDHBQ4/globaljs.png) -![](https://i.postimg.cc/HLV3TYLy/longclick.png) -![](https://i.postimg.cc/XJ58ysdN/option1.png) -![](https://i.postimg.cc/0NFnQT6H/option2.png) - -#### 软件功能 -输出自定义页面大小PDF、矢量图长截屏、朗读、文本重排、嗅探、比价、翻译、视频解析、离线保存、阅读模式(推荐与脚本激活模式配合)、网址重定向至国内、多帐号切换、网盘离线下载、文件管理、webdav/http空间备份/恢复任何指定文件集、智能翻页、目录文件传送、网站独立设置(ua,禁用脚本,无图,激活脚本)、行编辑器、网络唤醒(Wake-on-LAN)。通过安装html5应用可预览/阅读本地或在线任意格式文件(pdf,djvu,epub,mdx/mdd,docx等)。 - -修仙小说里面有一种异能,叫做“成功可以复制”,只要成功一次,就能无限复制。超微浏览器中这种异能叫"超级书签"。成功使用时保存,需要时就可以无限恢复。 - -小书签(bookmarklet)再也不用手工输入,直接将小书签网站加入书签即可。运行时长按出菜单后选择“在新窗口中打开”,小书签将作用于最后一个窗口。 - -独创不良信息绝杀:阻止指定根域名的一切子域名、孙域名...,不良信息一网打尽。 支持根域名前缀、网址路径正则表达式。 - -独创脚本激活模式,脚本执行后被激活,此后自动作用于同类网址。 - -支持全局用户脚本/样式,可任意叠加,轻松切换。 - -支持网址特定脚本/样式,可轻松支持百万以上不同脚本。 - -支持自定义任意多个搜索引擎; 支持执行用户提供任何js文件; 支持用户定义任意多个useragent; 长按链接支持运行第三方程序; 长按链接支持运行用户js文件。 - -安装定制版Termux然后再安装超微浏览器(顺序不能错),可用地址栏作图(类似matlab功能)、超级计算器(无限精度/π的前万位或更多、无限函数、无限常量)、符号演算(解方程、分解因式、求积分导数)、离线字典查找等。譬如地址栏输入sin(x)**5就直接得到函数图形。利用好第三方代码,才能真正发挥出uWeb的潜能。 - -#### Ebrowser for Windows, MacOS and Linux -可看作超微浏览器台式机简易版,用于弥补普通浏览器访问痛点。 -- 支持网站自动镜像,可以使用国内镜像自动访问github等网站,可与国际搜索引擎无缝衔接。 -- 同样允许直接访问英文技术网站。 -- 网页矢量长截屏,允许通过mermaid等设计矢量图案。 -- 可用网页设计代替Adobe Illustrator平面设计。 -- 完全开源,共同探索浏览新技术。 diff --git a/README.zh.md b/README.zh.md deleted file mode 100644 index bd197ef1..00000000 --- a/README.zh.md +++ /dev/null @@ -1,63 +0,0 @@ -### 超微浏览器 (uweb browser): 释放无尽威能,微、威、快、高效、极致优化 -English -捐赠 - - -[Amazon appstore](https://www.amazon.com/TorApp-Info-uweb-browser-for-geeks/dp/B098QPR6N5) -[Galaxy.Store](https://galaxystore.samsung.com/detail/info.torapp.uweb) -下载 - -[超微浏览器下载及使用技巧](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) -(镜像: [grebe](https://uweb.grebedoc.dev/zh/) [gitlab](https://jamesfengcao.gitlab.io/uweb/zh/) [frama](https://torappinfo.frama.io/uweb/zh/) [repo](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) [codeberg](https://uweb.codeberg.page/zh/) [github](https://torappinfo.github.io/uweb/zh/) [render](https://uweb.onrender.com/zh/) [surge](https://uweb.surge.sh/zh/) [netlify](https://uwebzh.netlify.app/zh/) [pgs](https://uweb-m.pgs.sh/zh/) [kinsta](https://uwebbrowser-t27o4.kinsta.page/zh/) [fleek](https://uweb.on-fleek.app/zh/) [pages](https://muweb.pages.dev/zh/) [bitbucket](https://torappinfo.bitbucket.io/zh/) [torapp](https://torapp.eu.org/zh/) [torappv](https://uweb.torapp.eu.org/zh/) [zeabur](https://uweb.zeabur.app/zh/) [static](https://uweb.staticrun.app) [statichost](https://torappinfo-uweb.statichost.eu) [maozi](https://uweb.maozi.io/zh/) [vercel](https://uweb.vercel.app/zh/) 专用镜像...) - -- 提供20多deepseek满血版接入点。 -- 免魔法国内直接访问英文技术网站如google、百科等 -- 无需帐号,无限制支持claude4.5,chatgpt5.1, gemini 2.5 pro/flash, grok4等超过500个最新AI模型免费使用。(少部分地区需配合上一条技术) -- AI聊天可作为搜索引擎,对复杂问询提供多种[输入辅助](https://uwebzh.netlify.app/zh/input/index.html#);不受剪贴板长度限制,[超长文本自由传](https://uwebzh.netlify.app/zh/textprocess/index.html#) (AI输入或共享)。 -- 微:不到250K。 -- 威:无穷无尽的功能,使用增强后的html5可以实现任何本地应用功能。支持使用js脚本、url服务、shell命令、内部功能链接定制菜单/(新)按钮/手势; 远程数据皆可成网站。 -- 便捷:AI聊天/图书/txt/词典/命令行/APP/webapp可作为搜索引擎使用。 -- 快:手机越慢,脚本插件越多越明显。 -- 高效:最少的操作,在线服务全自动(参看常用链接网页)。 -- 极致优化:最少存储写操作,比如浏览器转到后台前配置变化如恢复成原样则无写操作。 -- 地址栏支持命令行 ("!", 物理键盘支持更佳) -- 指定域名: 用户定义JS/CSS/HTML/显示前源码预处理 -- 支持用户定义域名属性。 -- 下载资源在线播放/预览/预处理。 -- 独立切换网站登录、配置文件。 -- 支持网站测试自动化脚本 (可用于app服务端测试)。支持crontab(闹钟、定时任务等)。 - -#### 截屏 -![](https://i.postimg.cc/rsL9G5N1/home1.png) -![](https://i.postimg.cc/9QxJ3Rc2/globalcss.png) -![](https://i.postimg.cc/VksDHBQ4/globaljs.png) -![](https://i.postimg.cc/HLV3TYLy/longclick.png) -![](https://i.postimg.cc/XJ58ysdN/option1.png) -![](https://i.postimg.cc/0NFnQT6H/option2.png) - -#### 软件功能 -输出自定义页面大小PDF、矢量图长截屏、朗读、文本重排、嗅探、比价、翻译、视频解析、离线保存、阅读模式(推荐与脚本激活模式配合)、网址重定向至国内、多帐号切换、网盘离线下载、文件管理、webdav/http空间备份/恢复任何指定文件集、智能翻页、目录文件传送、网站独立设置(ua,禁用脚本,无图,激活脚本)、行编辑器、网络唤醒(Wake-on-LAN)。通过安装html5应用可预览/阅读本地或在线任意格式文件(pdf,djvu,epub,mdx/mdd,docx等)。 - -修仙小说里面有一种异能,叫做“成功可以复制”,只要成功一次,就能无限复制。超微浏览器中这种异能叫"超级书签"。成功使用时保存,需要时就可以无限恢复。 - -小书签(bookmarklet)再也不用手工输入,直接将小书签网站加入书签即可。运行时长按出菜单后选择“在新窗口中打开”,小书签将作用于最后一个窗口。 - -独创不良信息绝杀:阻止指定根域名的一切子域名、孙域名...,不良信息一网打尽。 支持根域名前缀、网址路径正则表达式。 - -独创脚本激活模式,脚本执行后被激活,此后自动作用于同类网址。 - -支持全局用户脚本/样式,可任意叠加,轻松切换。 - -支持网址特定脚本/样式,可轻松支持百万以上不同脚本。 - -支持自定义任意多个搜索引擎; 支持执行用户提供任何js文件; 支持用户定义任意多个useragent; 长按链接支持运行第三方程序; 长按链接支持运行用户js文件。 - -安装定制版Termux然后再安装超微浏览器(顺序不能错),可用地址栏作图(类似matlab功能)、超级计算器(无限精度/π的前万位或更多、无限函数、无限常量)、符号演算(解方程、分解因式、求积分导数)、离线字典查找等。譬如地址栏输入sin(x)**5就直接得到函数图形。利用好第三方代码,才能真正发挥出uWeb的潜能。 - -#### Ebrowser for Windows, MacOS and Linux -可看作超微浏览器台式机简易版,用于弥补普通浏览器访问痛点。 -- 支持网站自动镜像,可以使用国内镜像自动访问github等网站,可与国际搜索引擎无缝衔接。 -- 同样允许直接访问英文技术网站。 -- 网页矢量长截屏,允许通过mermaid等设计矢量图案。 -- 可用网页设计代替Adobe Illustrator平面设计。 -- 完全开源,共同探索浏览新技术。 diff --git a/assets/help_en.html b/assets/help_en.html deleted file mode 100644 index 66dff71b..00000000 --- a/assets/help_en.html +++ /dev/null @@ -1,113 +0,0 @@ -Manual -
Manual 中文
- -Frequently visited links::
-Settings & tips ( -github -gitlab -frama -fleek -repo -bitbucket -vercel -netlify -pages -codeberg -surge -render -zeabur -More... -)
- -

-Check for updates
-UI configuration(gitee)
-Advanced customization
-

- -App folder
-More bookmarks -Offline -Super bookmarks
-Download -sdcard Download
-Error log
-
- -Use multiple engines::
-Type in main screen input or address bar, then click on any search engine on the top part of home screen.
-
- -Toolbar::
-Swipe down at top or swipe at any bottom corner to show.
- - -More tools::
- - -Options::
-Long press "settings" button to configure options. - - -Spinner options:: - - -More mirrors::
-Test1 -Test2 -Test3 -Test4 -Test5 -Test6 -Test7 -Test9 -Test10 -Test11 -Test12 - -Test14 -Test15 -Test17 -dagshub -gitgud - - -

-Project home
diff --git a/assets/help_zh.html b/assets/help_zh.html deleted file mode 100644 index b872a4c3..00000000 --- a/assets/help_zh.html +++ /dev/null @@ -1,166 +0,0 @@ -使用攻略 -
使用攻略 English
-设置及技巧 ( -atomgit -frama -gitlab -repo -codeberg -surge -github -netlify -kinsta -fleek -render -torapp -pages -glitch -zeabur -sf -... -)
- -常用链接::
-检测并下载最新版
-界面配置及杂项(gitee镜像)
-高级个性化定制
-内部目录 -分类书签 -离线网页 -超级书签
-下载 -sd卡下载目录
-空白便签
-出错报告
-
- -主屏查询举例::
-在主屏中间输入框或顶部地址栏内输入“牛奶”,再点击上面搜索引擎“值得买”。
-
- -提示:: - - -顶部工具条::
-从浏览器顶部往下拉或短按底部工具条页面搜索可显示。
-
- -底部工具条::
-左/右下角滑动或顶部/地址栏下方下拉可显示。
- - -更多工具: - -注:可通过关闭[JS]/[IMG]来屏蔽广告,这种屏蔽方式没有性能损失。
-
- -系统设置::
- - -功能选择:: - - -书签文件::
-用户可随意编辑文件bookmark.html,插入CSS样式。但最好仍然让每个书签占一行,可简化管理。
-
- -长按链接:: - - -高级配置::
-点击本页面文件名链接弹出文本编辑器,部分链接为文件目录,长按可显示目录路径; 如果目录存在,点击可进入。使用底部下载按钮复制文件或目录至应用内部目录,可以扩展浏览器功能。 - - -更多镜像::
-试验1 -2 - -4 -5 - -6 -7 -8 - -9 -10 - -12 -13 -14 -15 -16 -17 -18 -19 -20 -gitlink -gitly -gitnet -palemoon -tilde -cryto -antopie - -bitbucket -vercel - -

-项目主页
diff --git a/assets/help_zh.html~ b/assets/help_zh.html~ deleted file mode 100644 index 9ff6d930..00000000 --- a/assets/help_zh.html~ +++ /dev/null @@ -1,167 +0,0 @@ -使用攻略 -
使用攻略 English
-设置及技巧 ( -atomgit -frama -gitlab -repo -codeberg -surge -github -deno -netlify -kinsta -fleek -render -torapp -pages -glitch -zeabur -sf -... -)
- -常用链接::
-检测并下载最新版
-界面配置及杂项(gitee镜像)
-高级个性化定制
-内部目录 -分类书签 -离线网页 -超级书签
-下载 -sd卡下载目录
-空白便签
-出错报告
-
- -主屏查询举例::
-在主屏中间输入框或顶部地址栏内输入“牛奶”,再点击上面搜索引擎“值得买”。
-
- -提示:: - - -顶部工具条::
-从浏览器顶部往下拉或短按底部工具条页面搜索可显示。
-
- -底部工具条::
-左/右下角滑动或顶部/地址栏下方下拉可显示。
- - -更多工具: - -注:可通过关闭[JS]/[IMG]来屏蔽广告,这种屏蔽方式没有性能损失。
-
- -系统设置::
- - -功能选择:: - - -书签文件::
-用户可随意编辑文件bookmark.html,插入CSS样式。但最好仍然让每个书签占一行,可简化管理。
-
- -长按链接:: - - -高级配置::
-点击本页面文件名链接弹出文本编辑器,部分链接为文件目录,长按可显示目录路径; 如果目录存在,点击可进入。使用底部下载按钮复制文件或目录至应用内部目录,可以扩展浏览器功能。 - - -更多镜像::
-试验1 -2 - -4 -5 - -6 -7 -8 - -9 -10 - -12 -13 -14 -15 -16 -17 -18 -19 -20 -gitlink -gitly -gitnet -palemoon -tilde -cryto -antopie - -bitbucket -vercel - -

-项目主页
diff --git a/en/_posts/index.xml b/en/_posts/index.xml index 1143b1a4..4fce3154 100644 --- a/en/_posts/index.xml +++ b/en/_posts/index.xml @@ -1,194 +1,188 @@ - _Posts on uweb browser: unlimited power - https://jamesfengcao.gitlab.io/uweb/en/_posts/ - Recent content in _Posts on uweb browser: unlimited power - Hugo - en - Tue, 06 Jan 2026 19:39:18 +0800 - + _posts on + /en/_posts/ + Recent content in _posts on + Hugo -- gohugo.io + Sat, 02 Jul 2022 00:00:00 +0000 - Html5 applications - https://jamesfengcao.gitlab.io/uweb/en/html5/ - Tue, 06 Jan 2026 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/html5/ - <h3 id="remotelocal-big-txthtmlmd-files-zstgzbr-compressed-optionally-as-search-engines-or-paged-reader">remote/local big txt/html/md files (.zst,.gz,.br compressed optionally) as search engines or paged reader</h3> <p><code>i:0/js/reader.html:[remote url]#s=%s</code><br> is the search engine url for remote/local file.</p> <p><code>i:0/js/reader.html:[remote url]</code><br> is the paged reader for big txt/html files.</p> <p>Users can add a menu item by visiting <a href="../urls/index.html#">url services</a> and clicking the <code>Reader</code> link. After the menu item is installed and uweb restarts, long pressing any big txt/html/md link --&gt; command --&gt; Reader would load the big file in paged reader, long pressing button &quot;-&gt;&quot; on bottom toolbar --&gt; add as search engine --&gt; change the last part of url from &quot;#p=1&quot; to &quot;#s=%s&quot; and save the engine.</p> - - - File manager - https://jamesfengcao.gitlab.io/uweb/en/filemanager/ - Fri, 05 Dec 2025 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/filemanager/ - <p>Visiting file urls ending with &quot;/&quot; enters internal file manager.</p> <p>When the current tab is internal file manager, visiting file url for a file shows the content of the file, long pressing button &quot;🕔&quot; -&gt; Editor loads line-based editor for the file. If the file does not exist, saving creates a new file.</p> <p>Running any command with address bar with the format &quot;d::command line:&quot; to execute &quot;command line&quot; in the current folder of the internal file manager. Ex:<br> &quot;d::touch a.txt:&quot; to create a new file a.txt.<br> &quot;d::mkdir subdir:&quot; to create a new folder names &quot;subdir&quot;.<br> &quot;d::mv old new:&quot; to rename the file &quot;old&quot; to be &quot;new&quot;.</p> - - - Tips - https://jamesfengcao.gitlab.io/uweb/en/tips/ - Fri, 05 Dec 2025 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/tips/ - <p><strong>Address bar autocompletion as input method when starting with space</strong><br> When address bar text starts with space, the autocompletion selection is inserted to the focused element on the web page. It could be used to choose AI prompts.</p> <p><strong>Text processing for clipboard data</strong><br> On home screen, pressing the sharing button of the bottom toolbar popups the <a href="../textprocess/index.html#">text processing menu</a> for clipboard data.</p> <p><strong>To show web pages in desktop mode</strong><br> PC button + option &quot;wide viewport&quot; + global js &quot;force page resizable&quot;.<br> If some dialog is wider than the screen, press &quot;📄&quot; on the bottom toolbar.</p> - - - Phrases and input method - https://jamesfengcao.gitlab.io/uweb/en/input/ - Tue, 28 Oct 2025 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/input/ - <h4 id="defaultinput">&quot;default.input&quot;</h4> <p>Click the following links to install menus popped by long pressing the share button (with arrow-out-of-square as icon) on the bottom toolbar:<br> <a href="i:0gdefault.input::@AddrBar%0A">Address Bar</a><br> <a href="i:0gdefault.input::%20\n%0A">New line</a><br> <a href="i:0gdefault.input::@^Z@%1A%0A">CTRL-Z: undo</a><br> <a href="i:0gdefault.input::@^Y@%19%0A">CTRL-Y: redo</a></p> <p>Long pressing the share button in <a href="../index.html#">uweb browser</a> will popup menus defined in file &quot;default.input&quot;, each line of which defines common phrase for user inputs. If the phrase begins with &quot;@xxxx@&quot;, then &quot;xxxx&quot; part is the alias for the rest part of the string. Alias could be used for non-printable phrases.</p> - - - Context menu - https://jamesfengcao.gitlab.io/uweb/en/longclick/ - Sat, 01 Mar 2025 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/longclick/ - <h4 id="the-command-submenus">The &quot;command&quot; submenus</h4> <ul> <li>File &quot;<a href="../links/index.html#">image.link</a>&quot;: defines &quot;command&quot; submenus of the context menu for images.</li> <li>File &quot;<a href="../links/index.html#">download.link</a>&quot;: &quot;command&quot; submenus for download options menu.</li> <li>File &quot;context.link&quot;: &quot;command&quot; submenus in all other cases.</li> </ul> <p>The &quot;command&quot; submenus can be toggled with <a href="i:61:../searchurl/func.html">UI options</a>. The &quot;command&quot; submenus are default ( service urls or image.link or download.link), links, commands or service urls (default.urls when both link and command options are ticked).</p> <h4 id="to-run-commands">To run commands</h4> <p>Each line of file &quot;<a href="file:///data/data/info.torapp.uweb/files/default.longclick">default.longclick</a>&quot; has the following format: (same as <a href="../cmds/index.html#">default.cmds</a>)<br> [Name]:[mimetype]:[command line]<br> in which [command line] can have <a href="../cmds/index.html#">&quot;%c&quot; (cookie), &quot;%u&quot; (current url), &quot;%t&quot; (title)</a> etc.</p> - - - CSS styles - https://jamesfengcao.gitlab.io/uweb/en/globalcss/ - Sun, 13 Oct 2024 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/globalcss/ - <p><a href="../index.html#">Uweb browser</a> loads all &quot;.css&quot; files under the folder &quot;css&quot; as global css. Click the following links to install global css files:</p> <p><a href="i:0hcss/clearfont.css:../../zh/searchurl/txt/clearfont.css">Clearing font settings</a></p> <p>The file &quot;night.css&quot; is used as night mode, click the following links to install one:<br> <a href="i:0hnight.css:../../zh/searchurl/txt/night.css">webview 81+ night mode</a><br> <a href="i:0hnight.css:../../zh/searchurl/txt/night_old.css">webview 80- night mode</a></p> <h4 id="earliest-loaded-global-js">Earliest loaded global js</h4> <p>The &quot;.js&quot; files under the folder &quot;css&quot; are loaded as earlier as possible on the page.</p> <p>Click the following links to install early loaded global js:<br> <a href="i:0hcss/nojscopy.js::document.addEventListener(%22copy%22,(e)=>{e.preventDefault()})">No webpage clipboard copy</a></p> - - - Text selection/processing - https://jamesfengcao.gitlab.io/uweb/en/textprocess/ - Fri, 01 Dec 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/textprocess/ - <p>Click the following links to install menus for long pressing the button <code>link</code>:<br> <a href="i:0gdefault.select::Share:/uwebS:%0A">Share</a></p> <p><a href="i:0gdefault.select::Edit:/text/html:echo -n %22%3cmeta charset=utf-8%3e%3cbody contenteditable%3e%22;cat%0A">Edit</a></p> <p><a href="i:0gdefault.select::AddrBar:/uwebAddr:%0A">Copy text to address bar</a></p> <p><a href="i:0gdefault.select::notems:/uwebA:printf i:0/js/hash2textarea.js:https://note.ms/ric#;cat%0A">note.ms: cloud text sharing, please replace &quot;ric&quot; with your favorite ID</a></p> <p><a href="i:0gdefault.select::copyHtml:html/clip:%0A">Copy selected text with html format to clipboard</a></p> <p><a href="i:0gdefault.select::Home:/uweb:printf file://data/data/info.torapp.uweb/files/home5.search%5C location.href=%5C%22i:15;cat;printf %5C%22%0A">Search with home screen</a></p> <p><a href="i:0gdefault.select::google Translate:/uweb:printf 'https://translate.google.com/?sl=auto&tl=en&op=translate&text=';cat|tr ' ' '%2B'%0A">google Translate</a></p> <p><a href="i:0gdefault.select::bing Translate:/uweb:printf 'https://cn.bing.com/translator/?from=&to=en&text=';cat|tr ' ' '%2B'%0A">bing translate</a></p> <p><a href="i:0gdefault.select::deepL:/uweb:printf https://www.deepl.com/translator-mobile#auto/en/;cat|sed 's/ /%2520/g'%0A">deepL</a></p> <p>The file <code>default.select</code> defines text processing menus for selected text. If no text is selected, the menu item operates on the whole page. Each line of the file has the following format:<br> [Name]:[mimetype]:[command line]</p> - - - Links - https://jamesfengcao.gitlab.io/uweb/en/links/ - Sat, 28 Oct 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/links/ - <h4 id="context-menu">Context menu</h4> <p>The configuration file <code>image.link</code>, <code>download.link</code> and <code>context.link</code> define the default <code>command</code> submenu of the context menus when a url link is long pressed.</p> <h5 id="context-menu-for-images">Context menu for images</h5> <p>Click the following links to install <code>command</code> submenu for image's context menu:<br> <a href="i:0gimage.link::google:https://www.google.com/searchbyimage?image_url=%25u0A">google image</a></p> <p><a href="i:0gimage.link::tineye:https://tineye.com/search?url=%25u0A">tineye</a></p> <p><a href="i:0gimage.link::yandex:https://yandex.com/images/search?family=yes&rpt=imageview&url=%25u0A">yandex image</a></p> <h5 id="download-options-menu---command">Download options menu -&gt; <code>command</code></h5> <p>Click the following links to install <code>command</code> submenu for <b>download options menu</b>:<br> <a href="i:0gdownload.link::pager:i:0m/js/view.html:%25u#p=1%0A">huge txt pager</a></p> <p><a href="i:0gdownload.link::pager_2lnk:i:0m/js/view.html#/js/2lnk.js:%25u#p=1%0A">pager with urls converted to links</a></p> - - - Cron - https://jamesfengcao.gitlab.io/uweb/en/tcron/ - Wed, 25 Oct 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/tcron/ - <h4 id="crontab-with-enhanced-semantics">crontab (with enhanced semantics)</h4> <p>Some battery restrictions on android 13+ may disallow new instance of uweb browser by alarm events. Users can either keep uweb instance (no battery consumption) or remove the restriction for uweb.</p> <p>For performance, the file &quot;crontab&quot; uses single space as field separator. Letters are not suppored currently. So use &quot;1&quot; for &quot;January&quot; and 2 for &quot;Tuesday&quot; etc.</p> <p>The sixth field in crontab file could be in the format of <a href="../links/index.html#">internal links</a>. Specifically, &quot;c:&quot; to execute the following commands in termux and &quot;!&quot; to execute commands directly. If the sixth field is not in any of above formats, then the field will appear as the message of alarm clock.</p> - - - Offline resources - https://jamesfengcao.gitlab.io/uweb/en/offlinecache/ - Tue, 11 Apr 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/offlinecache/ - <p>Offline resources locate in the folder &quot;sitecache&quot;. With the option &quot;use offline resources&quot; enabled, the corresponding files in &quot;sitecache/[domain name]/[full path including filename, the url path part]&quot; are loaded first before reaching the network.</p> <h4 id="serverless-local-sites">Serverless local sites</h4> <p><a href="i:01Extract webapp:i:0bsitecache/local/:">Click to install url service that extracts web apps to the folder &quot;sitecache/local/&quot;</a>: support web extensions (.crx for chrome &amp; .xpi for firefox).</p> <p>Any folder under &quot;sitecache&quot; can be visited as a local site. Urls with search queries can be dynamically processed by the js/wasm code in the local file.</p> - - - Resource redirection - https://jamesfengcao.gitlab.io/uweb/en/redirect/ - Tue, 11 Apr 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/redirect/ - <p>⚠️<span style="color:red">Redirection forwards cookies</span> with the setting option &quot;Redirect cookies&quot; enabled, so use the option with care.</p> <h4 id="setting-options-url-redirection-vs-resource-redirection">Setting options: &quot;Url redirection&quot; vs. &quot;Resource redirection&quot;</h4> <p>&quot;Url redirection&quot; redirects the main/page url only while &quot;Resource redirection&quot; is for all urls in the page.</p> <h4 id="global-redirection">Global redirection</h4> <p><a href="i:60/data/data/info.torapp.uweb/files/config.html:https://jamesfengcao.codeberg.page/en/searchurl/config.html">Global redirection</a> is enabled with the setting option &quot;Resource redirection&quot; or both &quot;Url redirection&quot; and &quot;Redirect cookies&quot;.</p> <p>When a valid global redirection url is set, the &quot;default.redirect&quot; has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.</p> - - - Hosts files - https://jamesfengcao.gitlab.io/uweb/en/adblock_domain/ - Mon, 20 Mar 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/adblock_domain/ - <p>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect with the setting option &quot;use hosts&quot;.</p> <h4 id="hosts">hosts</h4> <p>The <span style="color:red">enhanced</span> file <a href="file:///data/data/info.torapp.uweb/files/hosts">&quot;hosts&quot;</a> defines IP addresses/attributes for domains. Each line has the following format:<br> [[IP address][attributes]][single space][domain name]</p> <p>where &quot;[[IP address][attributes]]&quot; could be:</p> <ul> <li> <p>ipv4 address such as:<br> 172.67.157.211 torapp.eu.org</p> </li> <li> <p>ipv6 address, Ex.:<br> [2606:4700:3037::6815:8c3] torapp.eu.org</p> </li> <li> <p>empty, that would lift all server-imposed limitations. Ex.:<br> [single space]gitee.com</p> <p>which will make all git repositories on the domain visitable as websites with raw file access url.</p> - - - JS/CSS/HTML/preprocessing for domains - https://jamesfengcao.gitlab.io/uweb/en/sitejs/ - Sat, 28 Jan 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/sitejs/ - <h3 id="javascript-load-when-page-completes-earliest-loaded-js-should-use-sitecss">Javascript (load when page completes, earliest loaded JS should use sitecss).</h3> <ul> <li>Need to be named as &quot;[domain root].js&quot;, such as &quot;yahoo.com.js&quot; or &quot;finance.yahoo.com.js&quot;. The script will be loaded on the whole domain tree sites. If several files matches the domain, then the script with longest file name is loaded.</li> <li>Script must be put under the folder &quot;sitejs&quot; or &quot;/data/data/info.torapp.uweb/files/sitejs&quot;. The later folder has the priority.</li> <li>Long press the button &quot;settings&quot;, check the option &quot;Run user scripts&quot;.</li> <li>Support 2/3-segment domains. If the length of the last 2-segments of domain is less than 7 (ex. &quot;com.pl&quot;), then it is treated as one segment.</li> </ul> <h3 id="css-style-and-earliest-loaded-js">CSS style and earliest loaded JS</h3> <ul> <li>Need to be named as &quot;[domain root].css&quot;, such as yahoo.com.css or finance.yahoo.com.css。</li> <li>Under folder &quot;sitecss&quot;.</li> <li>&quot;[domain root].js&quot; is loaded at the earliest time.</li> <li>Long press the button &quot;settings&quot;, check the option &quot;Apply user styles&quot;.</li> </ul> <p>If file &quot;default.css&quot; exists, the style will be applied to all sites not matching [domain root].css.</p> - - - Bookmarks - https://jamesfengcao.gitlab.io/uweb/en/bookmark/ - Mon, 16 Jan 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/bookmark/ - <p>AI, chatgpt etc.</p> <ul> <li><a href="https://aistudio.google.com/app/prompts/new_chat">google</a></li> <li><a href="https://gemini.google.com/app">google gemini</a></li> <li><a href="https://jeeves.ai/chat">jeeves</a></li> <li><a href="https://poe.com">poe</a></li> <li><a href="https://www.teach-anything.com/">teach-anything</a></li> <li><a href="https://magickpen.com/">magickpen</a></li> </ul> <p>Scholar:</p> <ul> <li><a href="https://lumina.sh">Lumina</a></li> </ul> <p><a href="https://note.ms">note.ms</a><br> <a href="https://rentry.org">rentry</a><br> <a href="i:1w">Wait for url from other devices</a><br> <a href="https://berify.com">berify: reverse image search for video</a></p> <h3 id="associated-bookmarks">Associated bookmarks</h3> <p><a href="../searchcat/index.html#">Search engine files</a> associate with bookmarks with extension &quot;.html&quot;, which means the bookmark file if existing is appended to the page when the search engine file is on screen.</p> <p>&quot;help_en.html&quot; bookmark associates with the user manual in English. Similarly, &quot;help_zh.html&quot; is for Chinese manual. Whenever user manual is open, the associated bookmark appears before the manual.</p> - - - Address bar command line - https://jamesfengcao.gitlab.io/uweb/en/acmd/ - Sun, 08 Jan 2023 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/acmd/ - <h3 id="--or--command-line">&quot;:!&quot; ( or &quot;!&quot;) command line</h3> <p>Pressing &quot;:&quot; or &quot;!&quot; with hardware keyboard sets focus on the address bar.<br> The command line could be a &quot;.js&quot;, &quot;.sh&quot; or other executable with arguments. Ex. &quot;:!s g keyword&quot; could invoke &quot;s.js&quot; executable with the whole string as arguments (&quot;s.sh&quot; or &quot;s&quot; if file exists, here &quot;g&quot; as google search engine); &quot;:! g keyword&quot; would invoke the file &quot;.js&quot; or &quot;.sh&quot; as executable.</p> - - - Any url as website - https://jamesfengcao.gitlab.io/uweb/en/url2site/ - Sun, 30 Oct 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/url2site/ - <p>The <a href="../index.html#">uweb</a> internal link &quot;<a href="../links/index.html">i:0m</a>&quot; make any url such as download or indirect links visitable as a website. The second part of <a href="../mirrors/index.html#">mirrors</a> has examples using the following tricks:</p> <ul> <li>&quot;i:0m04:[url]&quot;: to treat the [url] content as html with bookmarklet.</li> <li>&quot;i:0m?:[url]&quot;: to treat the [url] content as html, handling css/js properly.</li> <li>&quot;i:0m?[postfix]:[url]&quot;: auto append query postfix to url to retrieve content.</li> <li>&quot;i:0mi:5h:[url]&quot;: similar to &quot;i:0m?:[url]&quot;, to treat the [url] content as html (for download or no-script links etc.)</li> <li>&quot;i:0mi:5h?[postfix]::[url]&quot;: similar to &quot;i:0m?[postfix]:[url]&quot;. auto append query postfix to url to retrieve content.</li> <li>&quot;i:0mi:5h/[regex]/[replacement]::[url]&quot;: use the result of regular expression replacement to retrieve the content.</li> </ul> <p>For more complicated links such as cloud storage shared links, which need user gestures to reach temporary generated content link, use<br> &quot;i:0m/.../[local.html]:[url]&quot;, where the local file &quot;/.../[local.html]&quot; processes &quot;[url]&quot; as needed.</p> + Site map + /en/sitemap/ + Sat, 02 Jul 2022 00:00:00 +0000 + + /en/sitemap/ + UI Search engines Home screen Quick start UI (gitee) Backup and restore Customization Bottom toolbar button long pressing menus User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Font settings Advanced Content AD blocking CSS styles redirection Javascript and CSS for domains Offline cache Tools Bookmarklets Custom file handling Html5 application File manager Tools Termux GNU bc Gnuplot tcron Offline download Miscellaneous Configuration files Plugins Tips Tips Video Debug + Configuration folders/files - https://jamesfengcao.gitlab.io/uweb/en/filenames/ + /en/filenames/ Thu, 30 Jun 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/filenames/ - <p>All folders end with character &quot;/&quot; and others are files. All folders/files locate in &quot;/data/data/info.torapp.uweb/files&quot;:<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/css/">css/</a>&quot;: <a href="../globalcss/index.html#">global css folder</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/js/">js/</a>&quot;: <a href="../rjs/index.html#">global script folder</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/sitejs/">sitejs/</a>&quot;: <a href="../sitejs/index.html#">script folder for domains</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/sitecss/">sitecss/</a>&quot;:<a href="../sitejs/index.html#">CSS folder for domains</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/bookmarklet/">bookmarklet/</a>&quot;:<a href="../rjs/index.html#">bookmarklets</a>, long pressing the &quot;JS&quot; button to execute.<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/offline/">offline/</a>&quot;: to save offline pages<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/sbookmark/">sbookmark/</a>&quot;: to save super bookmarks<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/sitecache/">sitecache/</a>&quot;:<a href="../offlinecache/index.html#">offline cache</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/longclick/">longclick/</a>&quot;: menus to appear when long-pressing hypertext (js files)<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/icon/">icon/</a>&quot;:<a href="../icons/index.html#">customized icons</a><br> &quot;app[XXX]/&quot;:<a href="../html5/index.html#">html5 applications</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.longclick">default.longclick</a>&quot;: to configure menus when long-pressing hypertext.<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.uas">default.uas</a>&quot;:user agents<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.bml">default.bml</a>&quot;:<a href="../rjs/index.html#">bookmarklets</a>, long pressing the &quot;JS&quot; button to execute.<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.urls">default.urls</a>&quot;:<a href="../urls/index.html#">service urls</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.acmd">default.acmd</a>&quot;:configure address bar functionalities<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/hosts">hosts</a>&quot;: for local <a href="../adblock_domain/index.html#">domain name attributes</a>, only single space is allowed to separate ip address and domain name.<br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.hosts">default.hosts</a>&quot;:<a href="../adblock/index.html#">hosts not allowed to visit</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.redirect">default.redirect</a>&quot;:<a href="../redirect/index.html#">redirect websites</a><br> &quot;<a href="file:///data/data/info.torapp.uweb/files/default.cmds">default.cmds</a>&quot;:<a href="../cmds/index.html#">commands</a></p> + + /en/filenames/ + All folders end with character &quot;/&quot; and others are files. All folders/files locate in &quot;/data/data/info.torapp.uweb/files&quot;: +&quot;css/&quot;: global css folder +&quot;js/&quot;: global script folder +&quot;sitejs/&quot;: script folder for domains +&quot;sitecss/&quot;:CSS folder for domains +&quot;bookmarklet/&quot;:bookmarklets, long pressing the &quot;JS&quot; button to execute. +&quot;offline/&quot;: to save offline pages +&quot;sbookmark/&quot;: to save super bookmarks +&quot;sitecache/&quot;:offline cache +&quot;longclick/&quot;: menus to appear when long-pressing hypertext (js files) +&quot;icon/&quot;:customized icons +&quot;app[XXX]/&quot;:html5 applications +&quot;default.longclick&quot;: to configure menus when long-pressing hypertext. + + + Links + /en/links/ + Thu, 30 Jun 2022 00:00:00 +0000 + + /en/links/ + Clicking the following hypertext will install menus for long pressing the bookmark button (with star as icon): +Certificate info +Web fullscreen +Long pressing the bookmark button in uweb browser will popup menus defined in file &quot;default.link&quot;. The file format is as follows: +[Menu name]:[url][space][javascript code] +in which space and later parts are optional. url and later parts support &quot;%u&quot;,&quot;%s&quot; etc.. The javascript code will be executed after url is fully loaded. + + AD blocking - https://jamesfengcao.gitlab.io/uweb/en/adblock/ + /en/adblock/ Sat, 25 Jun 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/adblock/ - <ul> <li> <p><a href="../adblock_domain/index.html#">Host blocking</a>。</p> <ul> <li>Use <a href="../bookmarklet/index.html#">bookmarklet &quot;list all script urls&quot;</a> to generate url links, long pressing dubious script (usually 3rd-party library) link, click &quot;Block domain root&quot;.</li> </ul> </li> <li> <p><a href="../sitejs/index.html#">Javascript and CSS for domains</a>。</p> <ul> <li>Long press the button &quot;js&quot;, click the menu &quot;MarkAD mode&quot;. In &quot;markAD mode&quot;, click page element to show all attributes and generate CSS AD blocking styles. By default, &quot;display:none&quot; is used. If &quot;display&quot; appears in the attribute information, recommend to use &quot;transform:scale(0)!important&quot; instead.</li> </ul> </li> <li> <p>Long press the tab manager button, check &quot;Videos only&quot; for video sites and &quot;Images only&quot; for image sites. Other AD blocking options are &quot;Hide pseudo elements&quot; and &quot;Hide iframes&quot;.</p> + + /en/adblock/ + Host blocking。 +Use bookmarklet &quot;list all script urls&quot; to generate url links, long pressing dubious script (usually 3rd-party library) link, click &quot;Block domain root&quot;. Javascript and CSS for domains。 +Long press the button &quot;js&quot;, click the menu &quot;MarkAD mode&quot;. In &quot;markAD mode&quot;, click page element to show all attributes and generate CSS AD blocking styles. By default, &quot;display:none&quot; is used. If &quot;display&quot; appears in the attribute information, recommend to use &quot;transform:scale(0)! + Bookmarklets - https://jamesfengcao.gitlab.io/uweb/en/bookmarklet/ + /en/bookmarklet/ Fri, 24 Jun 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/bookmarklet/ - <p>With <a href="../index.html#">uweb browser</a>, long pressing any bookmarklet link, click &quot;Open in new tab&quot;, the bookmarklet will be run on the last other tab.</p> <p><a href="javascript:{let es=document.getElementsByTagName('script');let urls='';for(let i=0;i<es.length;i++){if(es[i].src)urls+=es[i].src+'<br>';}let w=window.open(''),s=w.document;s.write(urls);s.close();w.location.href='i:631:';}">List all script urls</a></p> <p><a target="_self" href="javascript:alert(navigator.userAgent)">User agent</a><br> <a href="javascript:(function(){var w=window.open(''),s=w.document;s.write('<html><body></body></html>');s.close();var pre=s.body.appendChild(s.createElement('pre'));pre.style.overflow='auto';pre.style.whiteSpace='pre-wrap';pre.appendChild(s.createTextNode(document.cookie))})()">Cookie</a><br> <a href="javascript:(function(){var w=window.open(''),s=w.document;s.write('<html><body></body></html>');s.close();var pre=s.body.appendChild(s.createElement('pre'));pre.style.overflow='auto';pre.style.whiteSpace='pre-wrap';pre.appendChild(s.createTextNode(document.documentElement.innerHTML))})()">Source code</a><br> <a href="javascript:function%20gett(w){try{var%20lm=new%20Date(w.document.lastModified);if(lm>maxd)maxd=lm;for(var%20i=0;F=w.frames[i];i++){gett(F);}}catch(e){}}var%20now=new%20Date();var%20maxd=new%20Date(document.lastModified);gett(window);if(maxd.getTime()==0||now.toUTCString()==maxd.toUTCString()){alert('Page%20is%20dynamically%20generated,%20cannot%20determine%20date.');}else{alert('Page%20was%20last%20modified%20'+maxd.toLocaleString());}" class="bookmarklet" rel="nofollow">Last modified date</a></p> <p><a href="javascript:(function(){var script=document.createElement('script');script.src='//fastly.jsdelivr.net/npm/eruda';document.body.appendChild(script);script.onload=function(){eruda.init()}})()">Eruda: mobile console</a><br> <a href="javascript:window.open('https://api.qrserver.com/v1/create-qr-code/?size=150x150&data='%20+%20decodeURIComponent(location.href));void(0);">QR code generation</a></p> <p><a href="javascript:(function(){var x,i; x = document.forms; for (i = 0; i &lt; x.length; ++i) x[i].method=&quot;get&quot;; alert(&quot;Changed &quot; + x.length + &quot; forms to use the GET method. After submitting a form from this page, you should be able to bookmark the result.&quot;); })();">Use &quot;GET&quot; method for &quot;POST&quot;</a><br> <a href="javascript:(function(){var i,f,j,e,div,label,ne; for(i=0;f=document.forms[i];++i)for(j=0;e=f[j];++j)if(e.type==&quot;hidden&quot;){ D=document; function C(t){return D.createElement(t);} function A(a,b){a.appendChild(b);} div=C(&quot;div&quot;); label=C(&quot;label&quot;); A(div, label); A(label, D.createTextNode(e.name + &quot;: &quot;)); e.parentNode.insertBefore(div, e); e.parentNode.removeChild(e); ne=C(&quot;input&quot;);/*for ie*/ ne.type=&quot;text&quot;; ne.value=e.value; A(label, ne); --j;}})()">Shows all form elements</a><br> <a href="javascript:(function(){var x,k,f,j;x=document.forms;for (k=0;k&lt;x.length;++k){f=x[k];for(j=0;j&lt;f.length;++j){f[j].disabled=false; f[j].readOnly=false;}}})()">Enables all form elements</a></p> + + /en/bookmarklet/ + With a href=&quot;../index.html&quot;&gt;uweb browser, long pressing any bookmarklet link, click &quot;Open in new tab&quot;, the bookmarklet will be run on the last other tab. +List all script urls +User agent +Cookie +Source code +Last modified date +Eruda: mobile console +QR code generation +Use &quot;GET&quot; method for &quot;POST&quot; +Shows all form elements +Enables all form elements +Toggle checkboxes +Check all checkboxes +Uncheck all checkboxes +Toggle all checkboxes in forms +Enable selection + + + Text selection + /en/pccopy/ + Sat, 23 Apr 2022 00:00:00 +0000 + + /en/pccopy/ + Click the following links to install menus for long pressing the button &quot;link&quot;: +google Translate +bing translate +deepL +The file &quot;default.select&quot; defines menus for selected text. If no text is selected, the menu item operates on the whole page. Each line of the file has the following format: +[Name]:[mimetype]:[command line] +[mimetype] specifies input/output for [command line]. +It formats as &quot;[input mimetype]/[output mimetype]&quot;. +[input mimetype] can be the following: +&quot;html&quot;: rich text &quot;&quot; (empty): text &quot;. + + + + CSS样式 + /en/globalcss/ + Sun, 03 Apr 2022 00:00:00 +0000 + + /en/globalcss/ + Uweb browser loads all &quot;.css&quot; files under the folder &quot;css&quot; as global css. Click the following links to install global css files: +Clearing font settings +The file &quot;night.css&quot; is used as night mode, click the following links to install one: +webview 81+ night mode +webview 80- night mode + + Toolbar customization - https://jamesfengcao.gitlab.io/uweb/en/icons/ + /en/icons/ Sun, 06 Feb 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/icons/ - <p>If subfolder &quot;icon&quot; exists, then files named as &quot;0&quot;,&quot;1&quot;,&quot;2&quot;...<br> are used for icons in the bottom toolbar. file &quot;0&quot; to replace the left arrow button, &quot;1&quot; for right arrow button, &quot;2&quot; for the setting button,&quot;3&quot; for the home screen button,...</p> <p>If a new button is defined (file name &quot;20&quot; exists), uweb also supports VectorDrawable with &quot;android compiled XML&quot; format. All icon files must be either all compiled VectorDrawables or common image formats.</p> + + /en/icons/ + If subfolder &quot;icon&quot; exists, then files named as &quot;0&quot;,&quot;1&quot;,&quot;2&quot;... +are used for icons in the bottom toolbar. file &quot;0&quot; to replace the left arrow button, &quot;1&quot; for right arrow button, &quot;2&quot; for the setting button,&quot;3&quot; for the home screen button,... +If a new button is defined (file name &quot;20&quot; exists), uweb also supports VectorDrawable with &quot;android compiled XML&quot; format. All icon files must be all VectorDrawables or 此时所有图标文件必须都是compiled XML格式,或都是普通的图像格式(png,jpg,gif等)。用户可将VectorDrawable XML文件放到安卓项目目录assets下面,重新生成apk文件以后将apk文件解压即可得compiled XML格式图标文件。 + - Search engine files - https://jamesfengcao.gitlab.io/uweb/en/searchcat/ - Mon, 10 Jan 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/searchcat/ - <p>Search engine file names have &quot;.search&quot; as postfix. When they are clicked, the associated bookmark files with postfix &quot;.search.html&quot; would be appended. Ex: the associated bookmark for &quot;foo.search&quot; is &quot;foo.search.html&quot;.</p> <p>Any &quot;.search&quot; file can be opened as search engine file, each line of which has one of the following formats:<br> [Engine name]:[url without '%s' inside]<br> [Engine name]:[url with '%s' as keyword]<br> [Engine name]:POST:[post params with '%s' as keyword]:[url]<br> [Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]</p> - - - Termux - https://jamesfengcao.gitlab.io/uweb/en/termux/ - Sat, 01 Jan 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/termux/ - <p>Only the termux versions provided along with uweb browser can work seamlessly. For android 10+, please install termux before installing uweb browser. If uweb is already installed, users can uninstall it first, then install termux and reinstall uweb browser.</p> <h4 id="termux-bookmarks">Termux bookmarks</h4> <p>Long pressing the following links then either &quot;commands&quot;-&gt;&quot;<a href="../urls/index.html#">bookmark</a>&quot; to add bookmarks or &quot;open in new tab&quot; to execute.<br> <a href="c:bc -l">GNU bc (basic calculator)</a><br> <a href="c:bc -l *.bc">bc with all extensions</a></p> <h4 id="click-the-following-links-to-install-termux-configurations">Click the following links to install termux configurations:</h4> <p><a href="i:0h/data/data/com.termux/files/home/.bashrc:../../termux/bashrc">.bashrc</a></p> - - - User agents - https://jamesfengcao.gitlab.io/uweb/en/useragents/ - Sat, 01 Jan 2022 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/useragents/ - <p>Clicking the following links to add user agents with <a href="../index.html#">uweb browser</a> or <a href="../ebrowserreadme/index.html#">ebrowser</a>.<br> <a href="i:02EdgA:Mozilla/5.0 (Linux; Android 13; KB2000) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36 EdgA/127.0.2610.80">Edge for android</a><br> <a href="i:02Edge:Mozilla/5.0 (Windows NT 11.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36 Edg/127.0.2610.80">Edge for windows</a></p> - - - Tools - https://jamesfengcao.gitlab.io/uweb/en/tools/ - Sun, 06 Sep 2020 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/tools/ - <p>This page is for <a href="../index.html#">uweb browser</a>.</p> <h4 id="install-tdict_local-search-with-local-indexes-and-remote-content"><a href="i:0bhttps://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/tdict_loc.tar.gz">install tdict_local (search with local indexes and remote content)</a></h4> <p>Click to install the following local indexes with corresponding search engines (for test only).<br> <a href="i:0hahd.tidx:https://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/ahd.tidx">install the indexes for &quot;American heritage dictionary (en-en&amp;zh with AHD/D.J./K.K. pronunciation)&quot;</a><br> <a href="i:00AHD:d:text/html:tdict_loc ahd \'%s\'|loc2html text/plain \'https://s1.asytech.cn/s/HxY9QT5cdp63ZPK/download?path=%2F&files=ahd.dict\':">Install AHD to home screen</a></p> <p><a href="i:0henja.tidx:https://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/enja.tidx">Indexes for &quot;研究社新編英和活用大辞典(English usage: en-en&amp;ja)&quot;</a><br> <a href="i:00enja:d:text/html:tdict_loc enja \'%s\'|loc2html text/plain \'https://s1.asytech.cn/s/oaoGniEBKLnWzoj/download?path=%2F&files=enja.dict\':">Install &quot;English usage (en-en&amp;ja)&quot;</a></p> <p><a href="i:0hsoed.tidx:https://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/soed.tidx">Indexes for SOED6</a><br> <a href="i:00soed:d:text/html:tdict_loc soed \'%s\'|loc2html text/plain \'https://s1.asytech.cn/s/oaoGniEBKLnWzoj/download?path=%2F&files=soed.dict\':">install SOED</a></p> <p>The following dictionaries work better with markdown processor.<br> <a href="i:0hmd.html:https://fastly.jsdelivr.net/gh/torappinfo/uwebjs/txt/mdme.html">Install markdown processor</a><br> <a href="i:0hmwi.tidx:https://fastly.jsdelivr.net/gh/torappinfo/uwebjs/bin/mwi.tidx">Indexes for &quot;Merriam Webster International Unabridged&quot;</a><br> <a href="i:00mwi:d:text/html:tdict_loc mwi \'%s\'|loc2html text/html.md.html \'https://s1.asytech.cn/s/oaoGniEBKLnWzoj/download?path=%2F&files=mwi.dict\':">Install MWI</a></p> + Long pressed link menu + /en/longclick/ + Fri, 06 Nov 2020 00:00:00 +0000 + + /en/longclick/ + To run commands Each line of file &quot;default.longclick&quot; has the following format: (same as default.cmds) +[Name]:[mimetype]:[command line] +in which [command line] can have &quot;%c&quot; (cookie), &quot;%u&quot; (current url), &quot;%t&quot; (title) etc. +To visit url and load javascript file All &quot;.js&quot; files under the folder &quot;longclick&quot; are part of the popup menu. +These javascript files are in the following format: +The very first line can begin with &quot;//&quot; followed by website url that can have &quot;%u&quot; (current url), &quot;%t&quot; (title) etc. + Custom file handling - https://jamesfengcao.gitlab.io/uweb/en/filecap/ + /en/filecap/ Mon, 24 Aug 2020 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/filecap/ - <p>Long press the settings button, check the option &quot;custom file handling&quot; to enable the functionality.</p> <p>The custom file handling configuration file is &quot;default.filecap&quot;, each line of it has the format as follows:<br> [file extension]:[mimetype]:[command line]</p> <p>The &quot;[file extension]&quot; part can have at most two-segment of extensions such as &quot;txt.xz&quot;,&quot;html.gz&quot;.<br> &quot;[mimetype]&quot; indicates the type of &quot;[command line]&quot; output.<br> &quot;[command line]&quot; is same as the one in <a href="../cmds/index.html#">default.cmds</a>. The most often used replacements are:<br> %u (url), %U (urlencoded url), %c (cookie), %p (site password, curl format).</p> + + /en/filecap/ + Long press the settings button, check the option &quot;custom file handling&quot; to enable the functionality. +The custom file handling configuration file is &quot;default.filecap&quot;, each line of it has the format as follows: +[file extension]:[mimetype]:[command line] +The &quot;[file extension]&quot; part can have at most two-segment of extensions such as &quot;txt.xz&quot;,&quot;html.gz&quot;. +&quot;[mimetype]&quot; indicates the type of &quot;[command line]&quot; output. +&quot;[command line]&quot; is same as the one in default.cmds. The most often used replacements are: + - Gestures - https://jamesfengcao.gitlab.io/uweb/en/gesture/ - Thu, 18 Jun 2020 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/gesture/ - <p>Swipe down from the top to show the address bar; swipe up to the top to hide the address bar. Swipe down to the bottom to hide the toolbar with option &quot;swipe to hide tools&quot;; swipe on the bottom corners to show the toolbar.</p> <p>Swipe left/right near the toolbar to switch window; fling left/right to switch to the last/first window.</p> <p>Swiping on the top part of content window (near the top address bar by default) triggers corresponding link in the file &quot;default.gesture&quot;, which has the same format as <a href="../links/index.html#">default.link</a>.</p> + Blocking domain trees + /en/adblock_domain/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /en/adblock_domain/ + hosts blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &quot;yahoo.com&quot; and &quot;finance.yahoo.com&quot;. If the length of the last 2 segments is less than 7, such as &quot;com.pl&quot;, then it is treated as one segment, so domains like &quot;xxx.xxx.com.pl&quot; are also valid in the hosts file. +Each line of the hosts file has the following format: + + + Change log + /en/changelog/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /en/changelog/ + 901: Use in-app files folder for configuration + + + + Javascript and CSS for domains + /en/sitejs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /en/sitejs/ + Javascript (load when page completes, earliest loaded JS should use sitecss). +Need to be named as &quot;[domain root].js&quot;, such as &quot;yahoo.com.js&quot; or &quot;finance.yahoo.com.js&quot;. The script will be loaded on the whole domain tree sites. If several files matches the domain, then the script with longest file name is loaded. Script must be put under the folder &quot;sitejs&quot; or &quot;/data/data/info.torapp.uweb/files/sitejs&quot;. The later folder has the priority. Long press the button &quot;settings&quot;, check the option &quot;Run user scripts&quot;. + + diff --git a/en/acmd/index.html b/en/acmd/index.html deleted file mode 100644 index bd0514f4..00000000 --- a/en/acmd/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - Address bar command line - - - -
- - - -
-
- -
-

Address bar command line -
- -

- -

":!" ( or "!") command line

-

Pressing ":" or "!" with hardware keyboard sets focus on the address bar.
-The command line could be a ".js", ".sh" or other executable with arguments. Ex. ":!s g keyword" could invoke "s.js" executable with the whole string as arguments ("s.sh" or "s" if file exists, here "g" as google search engine); ":! g keyword" would invoke the file ".js" or ".sh" as executable.

-

For regular (non-js) executables, the standard output of the command line could be treated as lines of urls (or html, plain text).

-

Install the example file ".js" (supporting search engine bundle)
-Install the example file "s.sh"

-

Click the following links to make commands appear in address bar, then press "enter" to execute:
-Make uweb configuration folder accessible by file managers with termux installed
-(File manager list at end of the page)

-

Address bar command modes

-

Commands are the best for repeated execution of an instruction. Address bar command modes provide ways to run different commands in the same category easily.

-

The configure file "default.acmd" has the exactly same format as default.cmds. Click the following links to install new modes (cold start the app to take effect, then long click the "refresh" button to switch modes):

-

Shell command mode

-

GNU bc (basic calculator) command mode (need termux for Android 10- )

-

GNUPlot plot (2D function), needs uweb adapted termux & gnuplot

-

GNUPlot plot (3D function), needs uweb adapted termux & gnuplot

- -
-

Last Modified: 2 April 2024
-add js function in README
-


-

- - - - - - - - - diff --git a/en/adblock/index.html b/en/adblock/index.html index 3f5b40d5..c6b2bae6 100644 --- a/en/adblock/index.html +++ b/en/adblock/index.html @@ -3,11 +3,10 @@ - - + AD blocking - - - - - diff --git a/en/adblock_domain/index.html b/en/adblock_domain/index.html index 2534357a..39990bbc 100644 --- a/en/adblock_domain/index.html +++ b/en/adblock_domain/index.html @@ -3,11 +3,10 @@ - - - Hosts files - - - - - diff --git a/en/bookmark/index.html b/en/bookmark/index.html deleted file mode 100644 index a1786d71..00000000 --- a/en/bookmark/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - Bookmarks - - - -
- - - - - - - -
-
- -
-

Bookmarks -
- -

- -

AI, chatgpt etc.

- -

Scholar:

- -

note.ms
-rentry
-Wait for url from other devices
-berify: reverse image search for video

-

Associated bookmarks

-

Search engine files associate with bookmarks with extension ".html", which means the bookmark file if existing is appended to the page when the search engine file is on screen.

-

"help_en.html" bookmark associates with the user manual in English. Similarly, "help_zh.html" is for Chinese manual. Whenever user manual is open, the associated bookmark appears before the manual.

-

Tips

-

File handling and styling with home.css

-

"home.css" (in current folder, parent folder or the "bookmark" folder) styles bookmarks, search engines and the folder itself. The file is in html format instead of CSS, so it needs "<style>" tag for CSS.

-

Install markdeep styling for markdown files

-

Bookmarks with secrets (POST instead of GET)

-

The internal link "i:a1[url]?[post data]" sends http "POST" request to server.

-

Commands

-

Clicking to run is only allowed from local pages for bookmarks in this section. Users need to either save the bookmarks to local or long press the link => "open in new tab" to execute.

-

To save the bookmarks to local, users firstly need to install "bookmark" menu by clicking corresponding link in the url services page, then long press the bookmark link => "open in new tab" => "Commands" => "bookmark" to save the bookmark.

-

symbolic link configuration folder to "/sdcard/Download/uweb"

-

Make uweb configuration folder accessible by file managers with termux installed
-(documentsUI or File manager list at end of the page)

-

Scan mdx/mdd files under the folder "/sdcard/Download/mdict" and add search engines.

-

Termux

-

The following bookmarks need termux.
-GNU bc (basic calculator)
-bc with all extensions

-

Templates

-

Click following links to install bookmark templates, bookmarks saved to the template have corresponding features enabled.
-"novel.html": auto reader's mode

- -
-

Last Modified: 26 January 2025
-update AI engines
-


-

- - - - - - - - - diff --git a/en/bookmarklet/index.html b/en/bookmarklet/index.html index 73988f0b..f0212bf7 100644 --- a/en/bookmarklet/index.html +++ b/en/bookmarklet/index.html @@ -3,11 +3,10 @@ - - + Bookmarklets - - - - - diff --git a/en/categories/index.xml b/en/categories/index.xml index e521860d..77d82b49 100644 --- a/en/categories/index.xml +++ b/en/categories/index.xml @@ -1,11 +1,9 @@ - Categories on uweb browser: unlimited power - https://jamesfengcao.gitlab.io/uweb/en/categories/ - Recent content in Categories on uweb browser: unlimited power - Hugo - en - + Categories on + /en/categories/ + Recent content in Categories on + Hugo -- gohugo.io diff --git a/en/changelog/index.html b/en/changelog/index.html index 7596b275..3e3336d4 100644 --- a/en/changelog/index.html +++ b/en/changelog/index.html @@ -3,11 +3,10 @@ - - - Downloads - - - - - diff --git a/en/cmds/index.html b/en/cmds/index.html deleted file mode 100644 index 349d3a5a..00000000 --- a/en/cmds/index.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - Commands - - - -
- - - - - - - -
-
- -
-

Commands -
- -

- -

Click the following links to install commands with uweb browser. Force exit and re-launch the app, then long press the button with clock icon to popup the command menu.

-

Configuration file "default.cmds" examples:

-

Quit & clear data:q:toybox find /data/data/info.torapp.uweb/app_webview ! -name 'Cookies' ! -name '*.cjar' -type f -delete

-

Clipboard2input:clip:cat>>default.input

-

Clear database::rm -rf /data/data/info.torapp.uweb/databases/*

-

Append query to autocomplete:uweb:cd /data/data/info.torapp.uweb/files;cat default.autoc query.log|toybox sort|toybox uniq -i>a.tmp;mv a.tmp default.autoc;>query.log;echo file:///data/data/info.torapp.uweb/files/default.autoc

-

Clear cache::toybox rm -rf /data/data/info.torapp.uweb/cache

-

Clear logcat::logcat -c

-

logcat.log::logcat -d > logcat.log

-

copy cookie:/clip:printf '%c'

-

config in Download::cd /data/data/info.torapp.uweb;toybox rm -rf files;toybox mkdir -p /sdcard/Download/uweb;toybox ln -s /sdcard/Download/uweb files

-

html5 in Download::cd /data/data/info.torapp.uweb/files;toybox rm -rf app;toybox mkdir -p /sdcard/Download/app;toybox ln -s /sdcard/Download/app

-

tgz install::cd /;toybox tar -xzf %f

-

Users should change the IP addresses in the following menus accordingly. In all cases, TV side needs to execute "wait for network msg" first. Send message to network (ex. for android TVs):
-clip2PC:clip:cat|/system/bin/toybox nc 192.168.1.120 1500

-

PC2clip:/clip:/system/bin/toybox nc 192.168.1.120 1500

-

Send clipboard:clip/uweb:printf 'i:5ji:5b';cat

-

Send url::printf '%u'|/system/bin/toybox nc 192.168.2.155 1500

-

Sendurl(bookmark)::printf 'i:51../home5:i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

-

Send url(fullscreen)::printf 'i:5f%u'|/system/bin/toybox nc 192.168.2.155 1500

-

Send url(video)::printf 'i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

-

Send url(clipboard):clip:(printf 'i:5b';cat)|/system/bin/toybox nc 192.168.2.155 1500

-

Modify with your own info:
-Refresh dynv6 ddns for sim card 1

-

Refresh dynv6 ddns for wifi

-

Need root permissions:

-

Need termux:
-VPN::am start -a android.net.vpn.SETTINGS

-

wireless::am start -a android.settings.WIRELESS_SETTINGS

-

cd:termux/*:cd %f;exit 1

-

vim:termux/*:vim %f

-

deduplicate history::awk -F'\t' '!s[$2]++' /data/data/info.torapp.uweb/files/history.rec>/sdcard/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torapp.uweb/files/history.rec

-

deduplicate bookmarks::awk '!s[$0]++' /data/data/info.torapp.uweb/files/bookmark.html>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torapp.uweb/files/bookmark.html

-

deduplicate hosts::toybox tac /data/data/info.torapp.uweb/files/default.hosts|awk -F' ' '!s[$1]++' |toybox tac>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torapp.uweb/files/default.hosts

-

deduplicate siteconf::toybox tac /data/data/info.torapp.uweb/files/default.siteconf|awk -F':' '!s[$1]++' |toybox tac>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torapp.uweb/files/default.siteconf

-

Clipboard2PC:clip:ssh fengcao@192.168.1.120 'DISPLAY=:0 xsel -i'

-

PC2Clipboard:/clip:ssh fengcao@192.168.1.120 'DISPLAY=:0 xsel -o'

-

Clipboard broadcast:clip:socat - UDP-DATAGRAM:255.255.255.255:1500,broadcast

-

Clipboard from broadcast:/clip:socat -u udp-recvfrom:1500 SYSTEM:'cat;exit'

-

Clipboard2QR:clip/uweb:qrencode -o /sdcard/Download/a.png;echo file:///sdcard/Download/a.png

-

Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh).
-Clipboard broadcast needs socat(apt install socat)。
-Clipboard2QR needs libqrencode.

-

More commands (click to install)

-

mdme: Show local markdown file

-

texme: Show local tex+markdown file

-

markdeep: Show local markdown+tex+diagrams file

-

markdeep slide: markdown+tex+diagrams

-

remark slide: slide show for local markdown file

-

Code editor, open url in clipboard etc.

-

".cmds" file format

-

Each line has the following format:
-[Name]:[mimetype]:[command line]

-

[command line] can have "%c" (cookie), "%s" (address bar text), "%u" (url), "%t" (title).
-[mimetype] have the following formats:

- - -
-

Last Modified: 30 March 2025
-tar -C / raised permission denied error
-


-

- - - - - - - - - diff --git a/en/download.md b/en/download.md deleted file mode 100644 index 97935ba3..00000000 --- a/en/download.md +++ /dev/null @@ -1,35 +0,0 @@ -[github](https://github.com/torappinfo/uweb/releases/tag/v1) - -[sourceforge](https://sourceforge.net/projects/uwebbrowser/files/v1/) - -[![](https://stc.utdstc.com/img/mediakit/download-gio-big.png)](https://uweb-browser-for-geeks.en.uptodown.com/android "uweb") - -[powerfolder](https://my.powerfolder.com/getlink/fi61cC6VHjK72tfufmnLAz/) - -[codeberg](https://codeberg.org/jamesfengcao/pages/releases) - -[infinicloud](https://uno.teracloud.jp/share/1162dfa8376e1609) - -[gitee](https://gitee.com/jamesfengcao/uweb/releases) - -[gitea](https://gitea.com/torappinfo/uweb/releases) - -[gitdab](https://gitdab.com/jamesfengcao/uweb/releases) - -[gitnet](https://gitnet.fr/jamesfengcao/uweb/releases) - -[tildegit](https://tildegit.org/jamesfengcao/uweb/releases) - -[NotABug](https://notabug.org/torappinfo/uweb/releases) - -[pagure](https://releases.pagure.org/uwebapk/) - -[baidu](https://pan.baidu.com/s/17coQj6DCHqghMMNJUyjgrA#list/path=%2Fuweb) - -[蓝奏](https://pan.lanzouu.com/b0qpxnob) - - - - - - diff --git a/en/ebrowser/eb_select/index.html b/en/ebrowser/eb_select/index.html deleted file mode 100644 index 1855b8a7..00000000 --- a/en/ebrowser/eb_select/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - Text selection - - - -
- - - -
-
- -
-

Text selection -
- -

- -

Click the following links to install context menus for text selection.

- -
-

Last Modified: 12 July 2024
-reorg ebrowserreadme.md
-


-

- - - - - - - - - diff --git a/en/ebrowser/index.html b/en/ebrowser/index.html deleted file mode 100644 index fc620d7d..00000000 --- a/en/ebrowser/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/en/ebrowser/index.xml b/en/ebrowser/index.xml deleted file mode 100644 index 1da4046e..00000000 --- a/en/ebrowser/index.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - Ebrowsers on uweb browser: unlimited power - https://jamesfengcao.gitlab.io/uweb/en/ebrowser/ - Recent content in Ebrowsers on uweb browser: unlimited power - Hugo - en - Fri, 12 Jul 2024 10:48:12 +0800 - - - Text selection - https://jamesfengcao.gitlab.io/uweb/en/ebrowser/eb_select/ - Fri, 12 Jul 2024 00:00:00 +0000 - https://jamesfengcao.gitlab.io/uweb/en/ebrowser/eb_select/ - <p>Click the following links to install context menus for text selection.</p> - - - diff --git a/en/ebrowserreadme/index.html b/en/ebrowserreadme/index.html deleted file mode 100644 index 953dc4c8..00000000 --- a/en/ebrowserreadme/index.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - -
- - - -
-
- -
-

-
- -

- - - -

Ebrowser: keyboard-friendly minimal suckless web browser

-

Ebrowser is designed with the philosophy of Android uweb browser (gitlab).

- -
-

Note: Usually electron apps are heavyweight as they use browsers for simple things. Ebrowser uses core chromium effectively and very lightweight.

-
-

Installing (for Windows, MacOS and Linux)

-

Install with prebuilt binaries

-

You can find prebuilt binaries here.

- -

Install ebrowser

-

Either download (Click the green Code button above the file list => Select Download ZIP) and unzip from

-
https://github.com/torappinfo/ebrowser
-
-

OR download and unzip ebrowser package directly from any of npm mirror sites like npmmirror or with nodejs by

-
npm install ebrowser
-
-

OR download/git clone files directly from any of mirror repositories and ebrowser is under the folder misc/ebrowser.

-

Install electron

-

Before you can run ebrowser, you need to install electron either with nodejs by

-
npm install electron
-
-

OR download and unzip electron binary directly from github or mirrors like npmmirror.

-

Run ebrowser

-
electron ~/node_modules/ebrowser
-
-

OR

-
electron [the-path-of-folder-with-downloaded-ebrowser-files]
-
-

Update app quickly without updating chromium

-

Pressing Alt to show the menu bar and choose Check for updates under Help. OR

-

Type :update in the address bar and press enter key to update.

-

Key shortcuts

- -

Address bar commands

-

Like any popular browser, the very first word in address bar if defined in search.json identifies a search engine. Moreover, the address bar serves as command line interface:

- -

Commands in no-focus mode (this mode is similar to vi Normal mode)

-

Pressing "ESC" to enter no-focus mode if not sure.

- -

The other commands are defined in "mapkeys.json", which will map keys to address bar commands.

-

Configuration files

- -

Javascript at three levels

- -

examples for ":js"/":bjs" commands

-
:js bJS=true //allow external Javascript files for web pages
-:js bJS=false //disallow external Javascript files for web pages
-:bjs bHistory=true //to record url history
-:bjs bQueryHistory=true //to record query/command history
-
-

New usages

- -

License

-

You can copy or modify the code/program under the terms of the GPL3.0 or later versions.

- -
-

Last Modified: 8 December 2025
-use ` for terms
-


-

- - - - - - - - - diff --git a/en/filecap/index.html b/en/filecap/index.html index 930db255..dee50fa3 100644 --- a/en/filecap/index.html +++ b/en/filecap/index.html @@ -3,11 +3,10 @@ - - + Custom file handling - - - - - diff --git a/en/filemanager/index.html b/en/filemanager/index.html deleted file mode 100644 index ff0e2625..00000000 --- a/en/filemanager/index.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - File manager - - - -
- - - - - - - -
-
- -
-

File manager -
- -

- -

Visiting file urls ending with "/" enters internal file manager.

-

When the current tab is internal file manager, visiting file url for a file shows the content of the file, long pressing button "🕔" -> Editor loads line-based editor for the file. If the file does not exist, saving creates a new file.

-

Running any command with address bar with the format "d::command line:" to execute "command line" in the current folder of the internal file manager. Ex:
-"d::touch a.txt:" to create a new file a.txt.
-"d::mkdir subdir:" to create a new folder names "subdir".
-"d::mv old new:" to rename the file "old" to be "new".

- -
-

Last Modified: 5 December 2025
-add filemanager.md
-


-

- - - - - - - - - diff --git a/en/filenames/index.html b/en/filenames/index.html index 9eb5a8fe..fe0b4b25 100644 --- a/en/filenames/index.html +++ b/en/filenames/index.html @@ -3,11 +3,10 @@ - - + Configuration folders/files - - - - - diff --git a/en/gesture/index.html b/en/gesture/index.html deleted file mode 100644 index c9647e4f..00000000 --- a/en/gesture/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - Gestures - - - -
- - - - - - - -
-
- -
-

Gestures -
- -

- -

Swipe down from the top to show the address bar; swipe up to the top to hide the address bar. Swipe down to the bottom to hide the toolbar with option "swipe to hide tools"; swipe on the bottom corners to show the toolbar.

-

Swipe left/right near the toolbar to switch window; fling left/right to switch to the last/first window.

-

Swiping on the top part of content window (near the top address bar by default) triggers corresponding link in the file "default.gesture", which has the same format as default.link.

-

The algorithm to match swiping gesture to a line in the file "default.gesture" is as follows:

- -

The final line number will match the corresponding line in "default.gesture", 0 to the first line, ...

-

"default.gesture2" is for the right side gesturs and the algorithm is similar to "default.gesture".

-

Example links:
-Toggle fullscreen::0003
-back:javascript:history.back()
-forward:javascript:history.forward()
-back2:javascript:history.go(-2)

- -
-

Last Modified: 2 April 2024
-add js function in README
-


-

- - - - - - - - - diff --git a/en/globalcss/index.html b/en/globalcss/index.html index fffd3109..1c5f64cf 100644 --- a/en/globalcss/index.html +++ b/en/globalcss/index.html @@ -3,11 +3,10 @@ - - - CSS styles - - - - - diff --git a/en/html5/index.html b/en/html5/index.html deleted file mode 100644 index 5a0bb1f4..00000000 --- a/en/html5/index.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - Html5 applications - - - -
- - - - - - - -
-
- -
-

Html5 applications -
- -

- -

remote/local big txt/html/md files (.zst,.gz,.br compressed optionally) as search engines or paged reader

-

i:0/js/reader.html:[remote url]#s=%s
-is the search engine url for remote/local file.

-

i:0/js/reader.html:[remote url]
-is the paged reader for big txt/html files.

-

Users can add a menu item by visiting url services and clicking the Reader link. After the menu item is installed and uweb restarts, long pressing any big txt/html/md link --> command --> Reader would load the big file in paged reader, long pressing button "->" on bottom toolbar --> add as search engine --> change the last part of url from "#p=1" to "#s=%s" and save the engine.

- -

The following link can be used to read [remote url] as huge text file, it shows only the first page. Pressing "->" on the bottom tool bar for next page:
-i:0/js/view.html:[remote url]#p=1

-

Multiple conversions could be appended to the html file. Ex:
-i:0m/js/view.html#/js/2lnk.js:[remote url]#p=1
-where "/js/2lnk.js" converts urls in the remote text file to clickable links.

-

Any html/js file could be referred with its full path, such as "/sdcard/.../xx.js" as long as uweb has read permission.

-

"%1%", "%2%", ... in the above html file will be replaced by the function body of the first, second, ... js file respectively. The js files themselves are regular js code ends with "()", no end of line (\n) appended. A sample js file looks like "((...args)=>{})()", so the code itself can also be run independently as bookmarklet either without or with extra argument.

-

Traditional html5 apps

-

This page is for uweb browser.
-Click to install the following html5 apps:
-Huge markdown file viewer
-Huge markdown+katex file viewer (Tex formulas)
-Huge markdeep file viewer (markdown, latex, diagram,graphviz etc.)
-plyr video player
-dplayer video player
-pdf viewer
-epub reader (author:llili)
-djvu viewer

-

The corresponding menus can be installed with url services.

-

Features

-

The following mentioned subfolders locate in the configuration folder.

- -

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).

-

Open local files with html5 apps

-

Click to configure default.filecap to open local files, and to open remote files with the option "custom file handling":
-use pdf.js,djvu.js,epub.js, huge markdown viewer for local files

-

url examples are as follows:

- -

Ex. "#offset=10000&500" will retrieve 500 bytes from offset 10000. Click the right arrow button to next page in all above file viewers.

-

Configure html5 app subfolder "app" (optional)

-

By default, the subfolder "app" is created by clicking to install any of above html5 applications.

-

To make file management easier, users can symbolic link the subfolder "app" to any other locations as long as it is readable.

-

One way to configure "app" subfolder is as follows:

- -

mdict dictionary lookup search engines:

-

Note: the following two mdict.html files are different.
-i:5ifile:///....../xxx.mdx,xxx.mdd?app=https://cdn.jsdelivr.net/gh/torappinfo/uweb/en/searchurl/mdict/mdict.html#word=%s

-

in which "/.../xxx.mdx,xxx.mdd" is the full path for the mdict dictionary files.

-

i:5ihttps://uwebzh.netlify.app/zh/searchurl/txt/mdict.html?file=mdict/xxx.mdx,mdict/xxx.mdd#word=%s

-

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".

-

To make life easier, users can link the "app" subfolder to any public accessible folder.

-

Use the mdx scanning bookmark to add mdict engines automatically, then cold start uweb browser to take effect.

- -
-

Last Modified: 6 January 2026
-html5: paged reader/engine support
-


-

- - - - - - - - - diff --git a/en/icons/index.html b/en/icons/index.html index ae5a4430..50ec65b1 100644 --- a/en/icons/index.html +++ b/en/icons/index.html @@ -3,11 +3,10 @@ - - + Toolbar customization - - - - - diff --git a/en/index.html b/en/index.html index 3dbbcb81..94532b43 100644 --- a/en/index.html +++ b/en/index.html @@ -1,15 +1,13 @@ - + - - - - uweb browser: unlimited power - - - -
- - - - - - - -
-
- -
-

Phrases and input method -
- -

- -

"default.input"

-

Click the following links to install menus popped by long pressing the share button (with arrow-out-of-square as icon) on the bottom toolbar:
-Address Bar
-New line
-CTRL-Z: undo
-CTRL-Y: redo

-

Long pressing the share button in uweb browser will popup menus defined in file "default.input", each line of which defines common phrase for user inputs. If the phrase begins with "@xxxx@", then "xxxx" part is the alias for the rest part of the string. Alias could be used for non-printable phrases.

-

Long text can be kept as txt file

-

Click the following links to install menus displayed by long pressing the bookmark button (with star as icon):
-Select utf8 text file as keyboard input

-

Address bar

-
Address bar autocompletion as input method when starting with space
-

"default.autoc" or other .autoc files when choosen are loaded for address bar autocompletion. If the address bar text starts with space, the selected text is treated as user input for focused element in the visible tab.

-

Click the following links to append AI prompts:
-Fetch the data from above URLs

-

More AI prompts, you could put them in the file "default.autoc" or other .autoc files:

-
-
Address bar as part of query
-

When the input in main home screen starts with "space+newline", the effective query is addressbar+input.

-
Address bar as IME
-

Action mode menu item "⌨️" for address bar selection makes the text user input for focused element in the visible tab.

-

Text processing commands or links can be installed as menus to process address bar text, thus makes address bar powerful IME.

- -
-

Last Modified: 13 November 2025
-update search engines
-


-

- - - - - - - - - diff --git a/en/links/index.html b/en/links/index.html index 5441b762..2c479cf8 100644 --- a/en/links/index.html +++ b/en/links/index.html @@ -3,11 +3,10 @@ - - + Links - - - - - diff --git a/en/longclick/index.html b/en/longclick/index.html index 911330fc..0e44f3ab 100644 --- a/en/longclick/index.html +++ b/en/longclick/index.html @@ -3,11 +3,10 @@ - - - Context menu - - - - - diff --git a/en/mirrors.md b/en/mirrors.md deleted file mode 100644 index 05b54004..00000000 --- a/en/mirrors.md +++ /dev/null @@ -1,64 +0,0 @@ - -#### Mirrors (for version 1040+) -[gitee](https://gitee.com/jamesfengcao/uweb/raw/master/redirect.html#) -[gitea](https://gitea.com/torappinfo/uweb/raw/branch/master/redirect.html#) -[tngl](https://tangled.org/@uweb.tngl.sh/uweb/raw/master/redirect.html#) -[notabug](https://notabug.org/torappinfo/uweb/raw/master/redirect.html#) -[launchpad](https://git.launchpad.net/uweb/plain/redirect.html#) -[framagit](https://framagit.org/torappinfo/uweb/-/raw/master/redirect.html#) -[disroot](https://git.disroot.org/torappinfo/uweb/raw/branch/master/redirect.html#) -[gitdab](https://gitdab.com/jamesfengcao/uweb/raw/branch/master/redirect.html#) -[pagure](https://pagure.io/uweb/raw/master/f/redirect.html#) -[bitbucket](https://bitbucket.org/torappinfo/torappinfo.bitbucket.io/raw/master/redirect.html#) -[jsdelivr](https://fastly.jsdelivr.net/gh/torappinfo/uweb/redirect.html#) -[dagshub](https://dagshub.com/torappinfo/uweb/raw/master/redirect.html#) -[gitgud](https://gitgud.io/jamesfengcao/uweb/-/raw/master/redirect.html#) -[gitly](https://gitly.org/jamesfengcao/uweb/raw/master/redirect.html#) -[gitnet](https://gitnet.fr/jamesfengcao/uweb/raw/branch/master/redirect.html#) -[tilde](https://tildegit.org/jamesfengcao/uweb/raw/branch/master/redirect.html#) -[antopie](https://code.antopie.org/jamesfengcao/uweb/raw/branch/master/redirect.html#) -[bgithub](https://bgithub.xyz/torappinfo/uweb/raw/master/redirect.html#) - -#### Mirrors (for all versions) - -1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -gitly -gitnet -tilde -antopie - - -#### Repositories -[gitlab](https://gitlab.com/jamesfengcao/uweb) -[sourceforge](https://sourceforge.net/p/uwebbrowser) -[github](https://github.com/torappinfo/uweb) -[bitbucket](https://bitbucket.org/torappinfo/torappinfo.bitbucket.io) -[codeberg](https://codeberg.org/jamesfengcao/pages/src/branch/master/README.md) -[gitee](https://gitee.com/jamesfengcao/uweb) -[gitlink](https://www.gitlink.org.cn/jamesfengcao/uweb) -[gitgud](https://gitgud.io/jamesfengcao/uweb) -[disroot](https://git.disroot.org/torappinfo/uweb/src/branch/master/README.md) -[gitea](https://gitea.com/torappinfo/uweb/src/branch/master/README.md) -[notabug](https://notabug.org/torappinfo/uweb/src/master/README.md) -[framagit](https://framagit.org/torappinfo/uweb) -[gitdab](https://gitdab.com/jamesfengcao/uweb/src/branch/master/README.md) -[pagure](https://pagure.io/uweb/blob/master/f/README.md) -[dagshub](https://dagshub.com/torappinfo/uweb/src/master/README.md) -[gitnet](https://gitnet.fr/jamesfengcao/uweb/src/branch/master/README.md) -[tilde](https://tildegit.org/jamesfengcao/uweb/src/branch/master/README.md) -[antopie](https://code.antopie.org/jamesfengcao/uweb/src/master/README.md) -[tngl](https://tangled.org/@uweb.tngl.sh/uweb/blob/master/README.md) \ No newline at end of file diff --git a/en/mirrors/index.html b/en/mirrors/index.html deleted file mode 100644 index b3c452eb..00000000 --- a/en/mirrors/index.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - -
- - - -
-
- -
-

-
- -

- - -

Mirrors (for version 1040+)

-

gitee
-gitea
-tngl
-notabug
-launchpad
-framagit
-disroot
-gitdab
-pagure
-bitbucket
-jsdelivr
-dagshub
-gitgud
-gitly
-gitnet
-tilde
-antopie
-bgithub

-

Mirrors (for all versions)

- -1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -gitly -gitnet -tilde -antopie - -

Repositories

-

gitlab
-sourceforge
-github
-bitbucket
-codeberg
-gitee
-gitlink
-gitgud
-disroot
-gitea
-notabug
-framagit
-gitdab
-pagure
-dagshub
-gitnet
-tilde
-antopie
-tngl

- -
-

Last Modified: 12 November 2025
-add tangled
-


-

- - - - - - - - - diff --git a/en/offlinecache/index.html b/en/offlinecache/index.html deleted file mode 100644 index 7ce2dc08..00000000 --- a/en/offlinecache/index.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - Offline resources - - - -
- - - - - - - -
-
- -
-

Offline resources -
- -

- -

Offline resources locate in the folder "sitecache". With the option "use offline resources" enabled, the corresponding files in "sitecache/[domain name]/[full path including filename, the url path part]" are loaded first before reaching the network.

-

Serverless local sites

-

Click to install url service that extracts web apps to the folder "sitecache/local/": support web extensions (.crx for chrome & .xpi for firefox).

-

Any folder under "sitecache" can be visited as a local site. Urls with search queries can be dynamically processed by the js/wasm code in the local file.

-

PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome & .xpi for firefox) are just packaged websites. Ex. the "kiwix" extension can be extracted to the folder "sitecache/local/kiwix"1, then the kiwix extension can be accessed via url "https://local/kiwix/www/index.html#" in the browser.

-
-
-
    -
  1. -

    the folder name "local" is used as the domain name in the url. ↩︎

    -
  2. -
-
- -
-

Last Modified: 8 April 2024
-fix typos
-


-

- - - - - - - - - diff --git a/en/pccopy/index.html b/en/pccopy/index.html new file mode 100644 index 00000000..510f81bd --- /dev/null +++ b/en/pccopy/index.html @@ -0,0 +1,93 @@ + + + + + + + + Text selection + + + +
+ + + + + + + +
+
+ +
+

Text selection +
+ +

+ +

Click the following links to install menus for long pressing the button "link":
+google Translate

+

bing translate

+

deepL

+

The file "default.select" defines menus for selected text. If no text is selected, the menu item operates on the whole page. Each line of the file has the following format:
+[Name]:[mimetype]:[command line]

+

[mimetype] specifies input/output for [command line].
+It formats as "[input mimetype]/[output mimetype]".
+[input mimetype] can be the following:

+ +

[output mimetype] is same as the one defined in "Commands".

+ +

checked.js: Evaluate checked.js and return value as standard input for the command line. For any file url ending with "/", optionally append "?[prefix][[postfix]]". For example, "file:///sdcard/?.png" lists all .png files under the folder "/sdcard". Select files and process them with checked.js(such as "copy to PC" as the later example).

+

default.select sample file:
+copy2addressbar:uweb:printf i:15;cat
+copy2PCClipboard::ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -i"
+richtext2PCClipboard:html:ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -i"
+copyFiles:checked.js:while read fname;do scp $fname [user:password]@192.168.2.102:Downloads/.; done

+

Here we assume that the user PC has IP address as "192.168.2.102".
+To use ssh or scp, users need to install uweb compatible Termux provided on the uweb apk download page, and install openssl under termux (apt install openssl).
+PCs need command "xsel" available to operate on copy/paste.

+ +
+ + + diff --git a/en/readme/index.html b/en/readme/index.html deleted file mode 100644 index 3112b9ff..00000000 --- a/en/readme/index.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - -
- - - - - - - -
-
- -
-

-
- -

- - -

Uweb browser: minimal suckless web browser with unlimited power

-

中文

-

Amazon appstore
-Galaxy.Store
-Downloads

-

Uweb browser: downloads, plugins and tips
-(Mirrors: gitlab frama codeberg repo fleek netlify surge kinsta zeabur bitbucket pages vercel render More...)

- -

Main features

-

Custom paper size PDF export and long vector screenshot, TTS, text reflow, resource sniffer, translation, reader's mode, user-defined url redirection, webdav/http backup & restore, auto next page, sending/receiving msg/file(s), site config (UA, no JS, no image, no 3rd party script/resource,active script, global scripts), http(s)/socks proxy, Wake-on-LAN, enabling html5 apps for local files (pdf/djvu/epub viewer, mdict dictionary lookup etc.).

- -

Screenshots

-


-
-
-
-
-

-

Ebrowser for Windows, MacOS and Linux

-

Ebrowser is a simple version of uweb browser on the desktop.

- -

Help with localization

-

We encourage everyone to help with localization. The following is how to do.

- - -
-

Last Modified: 12 November 2025
-use uweb.codeberg
-


-

- - - - - - - - - diff --git a/en/redirect/index.html b/en/redirect/index.html deleted file mode 100644 index 40f14384..00000000 --- a/en/redirect/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - Resource redirection - - - -
- - - - - - - -
-
- -
-

Resource redirection -
- -

- -

⚠️Redirection forwards cookies with the setting option "Redirect cookies" enabled, so use the option with care.

-

Setting options: "Url redirection" vs. "Resource redirection"

-

"Url redirection" redirects the main/page url only while "Resource redirection" is for all urls in the page.

-

Global redirection

-

Global redirection is enabled with the setting option "Resource redirection" or both "Url redirection" and "Redirect cookies".

-

When a valid global redirection url is set, the "default.redirect" has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.

- -

Example: "https://muweb.pages.dev/redirect?"

-

global redirection code for cloudflare worker free deployment: The global redirection url is "https://name.username.workers.dev/", which is just the worker's domain name.

-

"default.redirect" (valid only without global redirection url)

-

Click the following links to append mirrors to the file "default.redirect":
-google recaptcha mirror

-

Each line of the file "default.redirect" has the following format:
-[domain name]:[regular expression]:[replacement expression]

-

in which "[regular expression]" is as defined by java language, and cannot have ":" inside; if empty, it defaults to be same as "[domain name]".

-
Ways to enable domain redirection:
- - -
-

Last Modified: 9 April 2025
-fix broken links
-


-

- - - - - - - - - diff --git a/en/rjs/index.html b/en/rjs/index.html deleted file mode 100644 index 161b4ced..00000000 --- a/en/rjs/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - Execute javascript codes - - - -
- - - - - - - -
-
- -
-

Execute javascript codes -
- -

- -

javascript for domains
-Earliest loaded global javascript files locates in the subfolder "css" of app private folder.

-

Global javascript files locates in the subfolder "js" of app private folder. Long press button [☰] to configure. Click the following links to install:
-Save password
-Instant page

-

large size javascript code can be installed to the folder "bookmarklet" (long pressing button "js" to popup menu):
-google translation

-

Eruda
-Performance

-

default.bml to define bookmarklet with argument. Each line of default.bml has the following format:
-[bookmarklet name]:[bookmarklet id with argument]

-

where [bookmarklet id with argument] could be:

- -

Note: Bookmarklets whose names begin with "!" are allowed to load remote js on CSP (Content Security Policy) sites.

-

Remote javascript is defined in default.rjs. Click the following link to install. (Force exit and re-launch the app, then long press the "search" button to popup the menu.):

-

Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

-

Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

-

Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

-

markdown:['https://cdn.jsdelivr.net/npm/marked@12.0.2/marked.min.js'];var d=document;d.body.innerHTML=marked.parse(d.body.textContent);d.title=d.title||d.body.firstElementChild.innerText.trim();

-

mermaid:;loadModuleJS(import mermaid from 'https://unpkg.com/mermaid/dist/mermaid.esm.min.mjs';mermaid.initialize({startOnLoad:true});)

-

mathjax:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']

-

New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)

-

Site search:;open('i:15site:' + location.hostname)

-

Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v

-

Remote script configuration file "default.rjs" whose lines have the following format:
-[script name]:[javascript code to return url arrays]

-

Activated scripts

-

Activate either local (bookmarklets) or remote js to execute the code on the similar sites with option "Activate user script".

-

Since activated scripts use internal mechanism of "i:0m" urls, the script itself cannot have 'H', '?' or '/' as its very first character.

-

Allow remote js on CSP (Content Security Policy) sites

-

All remote js (default.rjs) are allowed to execute on CSP sites. Local js files without remote resource access work fine when under the folder "bookmarklet"; for those needing remote resource, file name must begin with "!". Others needs to be refered in default.rjs as http urls such as "https://local/..." (html5 or offline cache) .

- -
-

Last Modified: 13 February 2025
-update AI engines
-


-

- - - - - - - - - diff --git a/en/search.md b/en/search.md deleted file mode 100644 index 5fe8e053..00000000 --- a/en/search.md +++ /dev/null @@ -1,501 +0,0 @@ ---- -title: Search engine query URLs -date: 2024-12-03 -log: | - Add AI engines ---- -Clicking the following search engine configuration links (or append the link text to the file "home5.search") installs search engines with [uweb browser](../index.html#). [ebrowser](../ebrowserreadme/index.html#) users can change the engine name to be shorter (ex. 2 alphabets) as shortcut (click the link below and choose 'Cancel' to have a chance to modify the engine name in address bar). - -[AI](#aiSE) [Recommended](#mainSE) [Common](#commonSE) [Language](#langSE) [Science](#textbookSE) [More](#moreSE) [Medical](#medicalSE) [Scholar](#scholarSE) [Dev](#devSE) [Local](#localSE) - - -AI (Appending "%250D" after "%s" as ENTER for uweb or "%0D" for ebrowser): -gemini:https://gemini.google.com/app?q= - -gAI:https://google.com/search?udm=50&q= - -copilot:https://copilot.microsoft.com/?q= - -felo:https://felo.ai/search?q= - -search.sh:https://search.sh/?q= - -z:https://chat.z.ai/?q= - -deepseek:i:0/js/uwebset.js:https://chat.deepseek.com#uweb=%s - -grok:https://grok.com/search?q= - -meta:https://www.meta.ai/search?q= - -aoyo:https://aoyo.ai/search/?q= - -monica.im:https://monica.im/home/chat/deepseek-r1/deepseek_reasoner?q= - -monica:https://monica.so/answers?q= - -giz:https://app.giz.ai/assistant?mode=chat&prompt= - -longcat:i:0/js/uweb2edit.js:https://longcat.chat/#uweb=%3Cp%3E%s%3C/p%3E - -lmarena:i:0/js/uwebset.js:https://lmarena.ai/#uweb=%s - -miromind:i:0/js/uwebset.js:https://dr.miromind.ai/#uweb=%s - -txyz:i:0/js/uwebset.js:https://app.txyz.ai#uweb=%s - -komo:i:0/js/uwebset.js:https://komo.ai#uweb=%s - -solab:i:0/js/uwebset.js:https://www.solab.ai#uweb=%s - -isou:https://isou.chat/search?q= - -bagoodex:https://bagoodex.io/search?q= - -andi:https://andisearch.com/?q= - -scira:https://scira.ai/?q= - -gigabrain:https://thegigabrain.com/search/ - -liner:https://getliner.com?q= - -lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc= - -phind:https://www.phind.com/search?q= - -xanswer:https://www.xanswer.com/search?q= - -mistral:https://chat.mistral.ai/chat?q= - -mindfulq:https://www.mindfulq.com/s?q= - -searchgptool:https://searchgptool.ai/search?q= - -iask:https://iask.ai/?q= - -perplexity:https://www.perplexity.ai/?q= - -youChat:https://you.com/search?tbm=youchat&q= - -youWrite:https://you.com/search?tbm=youwrite&q= - -youImagine:https://you.com/search?tbm=imagine&q= - -you:https://you.com/search?q= - -xdash:https://www.xdash.ai/search?q= - -medisearch:https://medisearch.io/results/ - -consensus:https://consensus.app/results/?synthesize=on&q= - -yoursearch:https://app.yoursearch.ai/?q= - -awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/ - -searchGPT:https://chatgpt.com?hints=search&q= - -claude:https://claude.ai/new?q= - -floatsearch:i:0/js/uweb2ta.js:https://floatsearch.ai#uweb=%s - -morphic:i:0/js/uweb2ta.js:https://www.morphic.sh#uweb=%s - -lambda:i:0/js/uweb2ta.js:https://lambda.chat/chatui/#uweb=%s - -blackbox:https://www.blackbox.ai/?q= - -EBAI:i:0/js/uweb2input.js:https://www.britannica.com/chatbot#uweb=%s - -graphthem:i:0/js/uweb2input.js:https://graphthem.com/search?#uweb=%s - -correkt:i:0/js/uweb2ta.js:https://correkt.ai#uweb=%s - -devv:i:0/js/uweb2edit.js:https://devv.ai#uweb=%3Cp%3E%s%3C/p%3E - -duck.ai:https://duckduckgo.com?ia=chat&q= - -lepton:i:0/js/uweb2input.js:https://search.lepton.run/#uweb=%s - -stepfun:i:0/js/uwebset.js:https://www.stepfun.com/chats/new#uweb=%s - -poe:https://poe.com/DeepSeek-R1?q= - -t3:https://www.t3.chat/new?q= - - -AI (The search tab must not be in background. Appending "%250D" after "%s" as ENTER for uweb or "%0D" for ebrowser.) -hika:i:0/js/uweb2input2.js:https://hika.fyi/search#uweb=%s - - -Recommended engines: -Engines:i:40%s_00 - -bing image:http://bing.com/images/search?q= - -google image:http://www.google.com/images?as_q= - -flickr:http://www.flickr.com/photos/tags/ - -Yandex image:https://yandex.com/images/search?text= - -wiki:https://en.wikipedia.org/wiki/Special:Search?search= - -wikipedia:http://en.wikipedia.org/?search= - -wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&search= - -Youtube:https://www.youtube.com/results?search_query= - -eBay:https://www.ebay.com/sch/i.html?_nkw= - -Quora:https://www.quora.com/search?q= - -Pinterest:https://www.pinterest.com/search/pins/?q= - -LinkedIn:https://www.linkedin.com/search/results/all/?keywords= - -Netflix:https://www.netflix.com/search?q= - -Spotify:https://open.spotify.com/search/ - -Medium:https://medium.com/search?q= - -TripAdvisor:https://www.tripadvisor.com/Search?q= - -incaption:https://incaptions.com/ - -answer:http://mobile.answers.com/ - -twitter:https://twitter.com/search?q= - -Facebook:https://www.facebook.com/search/str/%s/keywords_search - -Instagram:https://www.instagram.com/explore/tags/%s/ - -social-search:https://www.social-searcher.com/social-buzz/?q5= - -reddit:http://reddit.com/search?q= - -boardreader:https://boardreader.com/s/%s.html - -bingvideo:https://www.bing.com/videos/search?q= - -vsearch:https://www.vsearch.me/s?q= - -crowdview:https://crowdview.ai/search?q= - -forumscout:https://forumscout.app/search?q= - -groups:http://groups.google.com/groups/search?q= - -wolfram:https://www.wolframalpha.com/input/?i= - -fxsolver:https://www.fxsolver.com/browse/?q= - -book_google:https://google.com/search?q=%22parent+directory%22+pdf+OR+epub+OR+DjVU+OR+xps+%22%s%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0 - -annas-archive:https://annas-archive.org/search?q= - -libgen:http://gen.lib.rus.ec/search.php?req= - -google_file:https://google.com/search?q=intitle:index.of+%22parent+directory%22+ - -apkcombo:https://apkcombo.com/search/ - - -Note: "Engines" needs file "engine.search",whose format is same as "home.search" except that the keyword part of url must be denoted with "%s". Pressing the right arrow button on the search result page will automatically query with next engine in the file. - -Common engines: -google:https://google.com/search?q= - -udm14:https://google.com/search?udm=14&q= - -bing:http://www.bing.com/search?q= - -exa:https://exa.ai/search?c=all&q= - -togoda:https://togoda.com/search?query= - -marginalia:https://search.marginalia.nu/search?query= - -mojeek:https://www.mojeek.com/search?q= - -rightdao:https://rightdao.com/search?q= - -yep:https://yep.com/web?q= - -seznam:https://search.seznam.cz/?q= - -metager:https://metager.org/meta/meta.ger3?eingabe= - -brave:https://search.brave.com/search?q= - -ellpedia:https://en.ellpedia.com/search?q= - -gemini:https://portal.mozz.us/gemini/geminispace.info/search%3F - -waldo:https://waldo.com/search?q= - -xda:https://www.xda-developers.com/search/ - -pix:https://www.google.com/search?tbm=isch&q= - -youtube:https://youtube.com/results?search_query= - -news:https://news.search.yahoo.com/search/news?p= - -stock:https://finance.yahoo.com/quote/ - -amazon:https://www.amazon.com/s/?field-keywords= - -weather:https://www.wunderground.com/cgi-bin/findweather/getForecast?query= - -IMDB:https://www.imdb.com/find?q= - -film review:https://www.rottentomatoes.com/search/?search= - -goodreads:https://www.goodreads.com/search?query= - -audible:http://www.audible.com/search?sort=review-rank&advsearchKeywords= - -audiobay:http://audiobookbay.se/?s= - -telegramsearcher:https://telegramsearcher.com/search?q= - -lyzem:https://lyzem.com/search?q= - - - -language: -webster1913:https://www.websters1913.com/words/ - -merriam-webster:https://www.merriam-webster.com/dictionary/ - -dictionary:https://www.dictionary.com/browse/ - -freedictionary:https://www.thefreedictionary.com/ - -legal_fd:https://legal-dictionary.thefreedictionary.com/ - -finance_fd:https://financial-dictionary.thefreedictionary.com/ - -wikipedia_fd:https://encyclopedia.thefreedictionary.com/ - -encyclopedia_fd:https://encyclopedia2.thefreedictionary.com/ - -wordreference:https://www.wordreference.com/definition/ - -vocabulary:https://www.vocabulary.com/dictionary/ - -etymology:https://www.etymonline.com/search?q= - -powerthesaurus:https://www.powerthesaurus.org/%s/synonyms - -macmillanthesaurus:https://www.macmillanthesaurus.com/search/?auto=complete&q= - -ludwig:https://ludwig.guru/s/ - -webster:https://www.merriam-webster.com/dictionary/ - -googledict:http://googledictionary.freecollocation.com/meaning?word= - -freetts_ru:https://freetts.com/Home/PlayAudio?Language=ru-RU&Voice=ru-RU-Standard-A&id=undefined&type=0&TextMessage= - -freetts_ar:https://freetts.com/Home/PlayAudio?Language=ar-XA&Voice=ar-XA-Standard-A&id=undefined&type=0&TextMessage= - - - -Science: -britannica:https://www.britannica.com/search?query= - -mathRef:https://reference.wolfram.com/search/?q= - -mathSE:https://math.stackexchange.com/search?q= - -phySE:https://physics.stackexchange.com/search?q= - -physicsForum:https://www.physicsforums.com/search/2195918/?q= - -pubchem SMILES:https://pubchem.ncbi.nlm.nih.gov/#input_type=smiles&query= - -pubchem:https://pubchem.ncbi.nlm.nih.gov/#query= - -chemSE:https://chemistry.stackexchange.com/search?q= - -chem:https://www.ncbi.nlm.nih.gov/pccompound?term= - -proofwiki:https://proofwiki.org/w/index.php?search= - -physics:http://www.physics.org/explore-results-all.asp?q= - -biology:https://www.biologyonline.com/dictionary/ - -nist chem:https://webbook.nist.gov/cgi/cbook.cgi?Formula= - -chemiday:https://chemiday.com/search/?lang=en&q= - -chem.libretexts:https://chem.libretexts.org/Special:Search?q= - -bio.libretexts:https://bio.libretexts.org/Special:Search?q= - -phys.libretexts:https://phys.libretexts.org/Special:Search?q= - -med.libretexts:https://med.libretexts.org/Special:Search?q= - -math.libretexts:https://math.libretexts.org/Special:Search?q= - -stats.libretexts:https://stats.libretexts.org/Special:Search?q= - -geo.libretexts:https://geo.libretexts.org/Special:Search?q= - -eng.libretexts:https://eng.libretexts.org/Special:Search?q= - -biz.libretexts:https://biz.libretexts.org/Special:Search?q= - -human.libretexts:https://human.libretexts.org/Special:Search?q= - -socialsci.libretexts:https://socialsci.libretexts.org/Special:Search?q= - -workforce.libretexts:https://workforce.libretexts.org/Special:Search?q= - - - -More engines: -oscobo:https://www.oscobo.com/search.php?q= - -lycos:https://search.lycos.com/web/?q= - -technorati:http://technorati.com/search/index.php?q= - -qwant:https://lite.qwant.com/?q= - -swisscows:https://swisscows.com/web?query= - -ecosia:https://www.ecosia.org/search?q= - -ghostery:https://ghosterysearch.com/search?q= - -izito:https://www.izito.com/search?q= - -duck:https://duckduckgo.com/?q= - -presearch:https://presearch.com/search?q= - -yandex:https://yandex.com/search/?text= - -searx:https://searx.be/?q= - -startpage:https://startpage.com/do/search?query= - -gibiru:https://gibiru.com/results.html?q= - -zapmeta:https://www.zapmeta.com/search?q= - - - -Medical: -medical_freedict:https://medical-dictionary.thefreedictionary.com/ - -merckmanuals:https://www.merckmanuals.com/professional/SearchResults?query= - -openmd:https://openmd.com/search?q= - -radiopaedia:https://radiopaedia.org/search?q= - -medical-dict:https://medical-dictionary.com/results.php?term= - -ncbiBooks:https://www.ncbi.nlm.nih.gov/books/?term= - -healio:https://journals.healio.com/action/doSearch?AllField= - -pubmed:https://pubmed.ncbi.nlm.nih.gov/?term= - -pmc:https://www.ncbi.nlm.nih.gov/pmc/?term= - -Tabers:https://www.tabers.com/tabersonline/search?st=OSS&q= - -medicinenet:https://www.medicinenet.com/%s/definition.htm - - - -Torrent: -aio:https://www.aiosearch.com/search/4/Torrents/ - -academictorrents:https://academictorrents.com/browse.php?search= - -piratebay:https://thepiratebay.org/search/%s/0/7/0 - -katcr:https://katcr.to/search/ - -1337x:https://1337x.to/search/%s/1/ - - - -Scholar: -classcentral:https://www.classcentral.com/search?q= - -base:https://www.base-search.net/Search/Results?lookfor= - -science.gov:POST:fullRecord=%s:https://www.science.gov/scigov/search.html - -sweetsearch:https://sweetsearch.com/search?q= - -refseek:https://www.refseek.com/search?q= - -google scholar:https://scholar.google.com/scholar?q= - -bing academic:http://bing.com/academic/search?q= - -core:https://core.ac.uk/search?q= - -semanticscholar:https://www.semanticscholar.org/search?sort=relevance&q= - -xueshu:https://xueshu.baidu.com/s?wd= - -oalib:https://www.oalib.com/search?kw= - -connectedpapers:https://www.connectedpapers.com/search?q= - - - -Developer: -devdocs:https://devdocs.io/#q= - -grep.app:https://grep.app/search?q= - -git:https://github.com/search?type=Repositories&q= - -man:http://man.cx/ - -code:http://searchcode.com/?q= - -symbolhound:http://symbolhound.com/?q= - -vector:https://vector.me/search/ - -jsdelivr:http://www.jsdelivr.com/?query= - -greasyfork:https://greasyfork.org/en/scripts?sort=updated&q= - - - -app: -App store:market://search?q= - - -local engines(May need termux customized edition and tools like bc,gnuplot etc.): -bc:d:text/html:echo \'%s\'|bc -l -q: - -2D plot:d:image/svg+xml:gnuplot -e \'set term svg;set output; plot %s\': - -3D plot:d:image/svg+xml:gnuplot -e \'set term svg;set output; splot %s\': - - - -[Search engine files](../searchcat/index.html#) - -More at: -[alternativeto](https://alternativeto.net/software/google-search/?feature=web-search) - diff --git a/en/search/index.html b/en/search/index.html deleted file mode 100644 index f6623a60..00000000 --- a/en/search/index.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - Search engine query URLs - - - -
- - - - - - - -
-
- -
-

Search engine query URLs -
- -

- -

Clicking the following search engine configuration links (or append the link text to the file "home5.search") installs search engines with uweb browser. ebrowser users can change the engine name to be shorter (ex. 2 alphabets) as shortcut (click the link below and choose 'Cancel' to have a chance to modify the engine name in address bar).

-

AI Recommended Common Language Science More Medical Scholar Dev Local

-

AI (Appending "%250D" after "%s" as ENTER for uweb or "%0D" for ebrowser):
-gemini:https://gemini.google.com/app?q=

-

gAI:https://google.com/search?udm=50&q=

-

copilot:https://copilot.microsoft.com/?q=

-

felo:https://felo.ai/search?q=

-

search.sh:https://search.sh/?q=

-

z:https://chat.z.ai/?q=

-

deepseek:i:0/js/uwebset.js:https://chat.deepseek.com#uweb=%s

-

grok:https://grok.com/search?q=

-

meta:https://www.meta.ai/search?q=

-

aoyo:https://aoyo.ai/search/?q=

-

monica.im:https://monica.im/home/chat/deepseek-r1/deepseek_reasoner?q=

-

monica:https://monica.so/answers?q=

-

giz:https://app.giz.ai/assistant?mode=chat&prompt=

-

longcat:i:0/js/uweb2edit.js:https://longcat.chat/#uweb=%3Cp%3E%s%3C/p%3E

-

lmarena:i:0/js/uwebset.js:https://lmarena.ai/#uweb=%s

-

miromind:i:0/js/uwebset.js:https://dr.miromind.ai/#uweb=%s

-

txyz:i:0/js/uwebset.js:https://app.txyz.ai#uweb=%s

-

komo:i:0/js/uwebset.js:https://komo.ai#uweb=%s

-

solab:i:0/js/uwebset.js:https://www.solab.ai#uweb=%s

-

isou:https://isou.chat/search?q=

-

bagoodex:https://bagoodex.io/search?q=

-

andi:https://andisearch.com/?q=

-

scira:https://scira.ai/?q=

-

gigabrain:https://thegigabrain.com/search/

-

liner:https://getliner.com?q=

-

lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc=

-

phind:https://www.phind.com/search?q=

-

xanswer:https://www.xanswer.com/search?q=

-

mistral:https://chat.mistral.ai/chat?q=

-

mindfulq:https://www.mindfulq.com/s?q=

-

searchgptool:https://searchgptool.ai/search?q=

-

iask:https://iask.ai/?q=

-

perplexity:https://www.perplexity.ai/?q=

-

youChat:https://you.com/search?tbm=youchat&q=

-

youWrite:https://you.com/search?tbm=youwrite&q=

-

youImagine:https://you.com/search?tbm=imagine&q=

-

you:https://you.com/search?q=

-

xdash:https://www.xdash.ai/search?q=

-

medisearch:https://medisearch.io/results/

-

consensus:https://consensus.app/results/?synthesize=on&q=

-

yoursearch:https://app.yoursearch.ai/?q=

-

awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/

-

searchGPT:https://chatgpt.com?hints=search&q=

-

claude:https://claude.ai/new?q=

-

floatsearch:i:0/js/uweb2ta.js:https://floatsearch.ai#uweb=%s

-

morphic:i:0/js/uweb2ta.js:https://www.morphic.sh#uweb=%s

-

lambda:i:0/js/uweb2ta.js:https://lambda.chat/chatui/#uweb=%s

-

blackbox:https://www.blackbox.ai/?q=

-

EBAI:i:0/js/uweb2input.js:https://www.britannica.com/chatbot#uweb=%s

-

graphthem:i:0/js/uweb2input.js:https://graphthem.com/search?#uweb=%s

-

correkt:i:0/js/uweb2ta.js:https://correkt.ai#uweb=%s

-

devv:i:0/js/uweb2edit.js:https://devv.ai#uweb=%3Cp%3E%s%3C/p%3E

-

duck.ai:https://duckduckgo.com?ia=chat&q=

-

lepton:i:0/js/uweb2input.js:https://search.lepton.run/#uweb=%s

-

stepfun:i:0/js/uwebset.js:https://www.stepfun.com/chats/new#uweb=%s

-

poe:https://poe.com/DeepSeek-R1?q=

-

t3:https://www.t3.chat/new?q=

-

AI (The search tab must not be in background. Appending "%250D" after "%s" as ENTER for uweb or "%0D" for ebrowser.)
-hika:i:0/js/uweb2input2.js:https://hika.fyi/search#uweb=%s

-

Recommended engines
-Engines:i:40%s_00

-

bing image:http://bing.com/images/search?q=

-

google image:http://www.google.com/images?as_q=

-

flickr:http://www.flickr.com/photos/tags/

-

Yandex image:https://yandex.com/images/search?text=

-

wiki:https://en.wikipedia.org/wiki/Special:Search?search=

-

wikipedia:http://en.wikipedia.org/?search=

-

wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&search=

-

Youtube:https://www.youtube.com/results?search_query=

-

eBay:https://www.ebay.com/sch/i.html?_nkw=

-

Quora:https://www.quora.com/search?q=

-

Pinterest:https://www.pinterest.com/search/pins/?q=

-

LinkedIn:https://www.linkedin.com/search/results/all/?keywords=

-

Netflix:https://www.netflix.com/search?q=

-

Spotify:https://open.spotify.com/search/

-

Medium:https://medium.com/search?q=

-

TripAdvisor:https://www.tripadvisor.com/Search?q=

-

incaption:https://incaptions.com/

-

answer:http://mobile.answers.com/

-

twitter:https://twitter.com/search?q=

-

Facebook:https://www.facebook.com/search/str/%s/keywords_search

-

Instagram:https://www.instagram.com/explore/tags/%s/

-

social-search:https://www.social-searcher.com/social-buzz/?q5=

-

reddit:http://reddit.com/search?q=

-

boardreader:https://boardreader.com/s/%s.html

-

bingvideo:https://www.bing.com/videos/search?q=

-

vsearch:https://www.vsearch.me/s?q=

-

crowdview:https://crowdview.ai/search?q=

-

forumscout:https://forumscout.app/search?q=

-

groups:http://groups.google.com/groups/search?q=

-

wolfram:https://www.wolframalpha.com/input/?i=

-

fxsolver:https://www.fxsolver.com/browse/?q=

-

book_google:https://google.com/search?q=%22parent+directory%22+pdf+OR+epub+OR+DjVU+OR+xps+%22%s%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0

-

annas-archive:https://annas-archive.org/search?q=

-

libgen:http://gen.lib.rus.ec/search.php?req=

-

google_file:https://google.com/search?q=intitle:index.of+%22parent+directory%22+

-

apkcombo:https://apkcombo.com/search/

-

Note: "Engines" needs file "engine.search",whose format is same as "home.search" except that the keyword part of url must be denoted with "%s". Pressing the right arrow button on the search result page will automatically query with next engine in the file.

-

Common engines:
-google:https://google.com/search?q=

-

udm14:https://google.com/search?udm=14&q=

-

bing:http://www.bing.com/search?q=

-

exa:https://exa.ai/search?c=all&q=

-

togoda:https://togoda.com/search?query=

-

marginalia:https://search.marginalia.nu/search?query=

-

mojeek:https://www.mojeek.com/search?q=

-

rightdao:https://rightdao.com/search?q=

-

yep:https://yep.com/web?q=

-

seznam:https://search.seznam.cz/?q=

-

metager:https://metager.org/meta/meta.ger3?eingabe=

-

brave:https://search.brave.com/search?q=

-

ellpedia:https://en.ellpedia.com/search?q=

-

gemini:https://portal.mozz.us/gemini/geminispace.info/search%3F

-

waldo:https://waldo.com/search?q=

-

xda:https://www.xda-developers.com/search/

-

pix:https://www.google.com/search?tbm=isch&q=

-

youtube:https://youtube.com/results?search_query=

-

news:https://news.search.yahoo.com/search/news?p=

-

stock:https://finance.yahoo.com/quote/

-

amazon:https://www.amazon.com/s/?field-keywords=

-

weather:https://www.wunderground.com/cgi-bin/findweather/getForecast?query=

-

IMDB:https://www.imdb.com/find?q=

-

film review:https://www.rottentomatoes.com/search/?search=

-

goodreads:https://www.goodreads.com/search?query=

-

audible:http://www.audible.com/search?sort=review-rank&advsearchKeywords=

-

audiobay:http://audiobookbay.se/?s=

-

telegramsearcher:https://telegramsearcher.com/search?q=

-

lyzem:https://lyzem.com/search?q=

-

language:
-webster1913:https://www.websters1913.com/words/

-

merriam-webster:https://www.merriam-webster.com/dictionary/

-

dictionary:https://www.dictionary.com/browse/

-

freedictionary:https://www.thefreedictionary.com/

-

legal_fd:https://legal-dictionary.thefreedictionary.com/

-

finance_fd:https://financial-dictionary.thefreedictionary.com/

-

wikipedia_fd:https://encyclopedia.thefreedictionary.com/

-

encyclopedia_fd:https://encyclopedia2.thefreedictionary.com/

-

wordreference:https://www.wordreference.com/definition/

-

vocabulary:https://www.vocabulary.com/dictionary/

-

etymology:https://www.etymonline.com/search?q=

-

powerthesaurus:https://www.powerthesaurus.org/%s/synonyms

-

macmillanthesaurus:https://www.macmillanthesaurus.com/search/?auto=complete&q=

-

ludwig:https://ludwig.guru/s/

-

webster:https://www.merriam-webster.com/dictionary/

-

googledict:http://googledictionary.freecollocation.com/meaning?word=

-

freetts_ru:https://freetts.com/Home/PlayAudio?Language=ru-RU&Voice=ru-RU-Standard-A&id=undefined&type=0&TextMessage=

-

freetts_ar:https://freetts.com/Home/PlayAudio?Language=ar-XA&Voice=ar-XA-Standard-A&id=undefined&type=0&TextMessage=

-

Science:
-britannica:https://www.britannica.com/search?query=

-

mathRef:https://reference.wolfram.com/search/?q=

-

mathSE:https://math.stackexchange.com/search?q=

-

phySE:https://physics.stackexchange.com/search?q=

-

physicsForum:https://www.physicsforums.com/search/2195918/?q=

-

pubchem SMILES:https://pubchem.ncbi.nlm.nih.gov/#input_type=smiles&query=

-

pubchem:https://pubchem.ncbi.nlm.nih.gov/#query=

-

chemSE:https://chemistry.stackexchange.com/search?q=

-

chem:https://www.ncbi.nlm.nih.gov/pccompound?term=

-

proofwiki:https://proofwiki.org/w/index.php?search=

-

physics:http://www.physics.org/explore-results-all.asp?q=

-

biology:https://www.biologyonline.com/dictionary/

-

nist chem:https://webbook.nist.gov/cgi/cbook.cgi?Formula=

-

chemiday:https://chemiday.com/search/?lang=en&q=

-

chem.libretexts:https://chem.libretexts.org/Special:Search?q=

-

bio.libretexts:https://bio.libretexts.org/Special:Search?q=

-

phys.libretexts:https://phys.libretexts.org/Special:Search?q=

-

med.libretexts:https://med.libretexts.org/Special:Search?q=

-

math.libretexts:https://math.libretexts.org/Special:Search?q=

-

stats.libretexts:https://stats.libretexts.org/Special:Search?q=

-

geo.libretexts:https://geo.libretexts.org/Special:Search?q=

-

eng.libretexts:https://eng.libretexts.org/Special:Search?q=

-

biz.libretexts:https://biz.libretexts.org/Special:Search?q=

-

human.libretexts:https://human.libretexts.org/Special:Search?q=

-

socialsci.libretexts:https://socialsci.libretexts.org/Special:Search?q=

-

workforce.libretexts:https://workforce.libretexts.org/Special:Search?q=

-

More engines:
-oscobo:https://www.oscobo.com/search.php?q=

-

lycos:https://search.lycos.com/web/?q=

-

technorati:http://technorati.com/search/index.php?q=

-

qwant:https://lite.qwant.com/?q=

-

swisscows:https://swisscows.com/web?query=

-

ecosia:https://www.ecosia.org/search?q=

-

ghostery:https://ghosterysearch.com/search?q=

-

izito:https://www.izito.com/search?q=

-

duck:https://duckduckgo.com/?q=

-

presearch:https://presearch.com/search?q=

-

yandex:https://yandex.com/search/?text=

-

searx:https://searx.be/?q=

-

startpage:https://startpage.com/do/search?query=

-

gibiru:https://gibiru.com/results.html?q=

-

zapmeta:https://www.zapmeta.com/search?q=

-

Medical:
-medical_freedict:https://medical-dictionary.thefreedictionary.com/

-

merckmanuals:https://www.merckmanuals.com/professional/SearchResults?query=

-

openmd:https://openmd.com/search?q=

-

radiopaedia:https://radiopaedia.org/search?q=

-

medical-dict:https://medical-dictionary.com/results.php?term=

-

ncbiBooks:https://www.ncbi.nlm.nih.gov/books/?term=

-

healio:https://journals.healio.com/action/doSearch?AllField=

-

pubmed:https://pubmed.ncbi.nlm.nih.gov/?term=

-

pmc:https://www.ncbi.nlm.nih.gov/pmc/?term=

-

Tabers:https://www.tabers.com/tabersonline/search?st=OSS&q=

-

medicinenet:https://www.medicinenet.com/%s/definition.htm

-

Torrent:
-aio:https://www.aiosearch.com/search/4/Torrents/

-

academictorrents:https://academictorrents.com/browse.php?search=

-

piratebay:https://thepiratebay.org/search/%s/0/7/0

-

katcr:https://katcr.to/search/

-

1337x:https://1337x.to/search/%s/1/

-

Scholar:
-classcentral:https://www.classcentral.com/search?q=

-

base:https://www.base-search.net/Search/Results?lookfor=

-

science.gov:POST:fullRecord=%s:https://www.science.gov/scigov/search.html

-

sweetsearch:https://sweetsearch.com/search?q=

-

refseek:https://www.refseek.com/search?q=

-

google scholar:https://scholar.google.com/scholar?q=

-

bing academic:http://bing.com/academic/search?q=

-

core:https://core.ac.uk/search?q=

-

semanticscholar:https://www.semanticscholar.org/search?sort=relevance&q=

-

xueshu:https://xueshu.baidu.com/s?wd=

-

oalib:https://www.oalib.com/search?kw=

-

connectedpapers:https://www.connectedpapers.com/search?q=

-

Developer:
-devdocs:https://devdocs.io/#q=

-

grep.app:https://grep.app/search?q=

-

git:https://github.com/search?type=Repositories&q=

-

man:http://man.cx/

-

code:http://searchcode.com/?q=

-

symbolhound:http://symbolhound.com/?q=

-

vector:https://vector.me/search/

-

jsdelivr:http://www.jsdelivr.com/?query=

-

greasyfork:https://greasyfork.org/en/scripts?sort=updated&q=

-

app:
-App store:market://search?q=

-

local engines(May need termux customized edition and tools like bc,gnuplot etc.):
-bc:d:text/html:echo '%s'|bc -l -q:

-

2D plot:d:image/svg+xml:gnuplot -e 'set term svg;set output; plot %s':

-

3D plot:d:image/svg+xml:gnuplot -e 'set term svg;set output; splot %s':

-

Search engine files

-

More at:
-alternativeto

- -
-

Last Modified: 5 December 2025
-add notes for '%250D'
-

Add AI engines
-
-

- - - - - - - - - diff --git a/en/searchcat/index.html b/en/searchcat/index.html deleted file mode 100644 index fdce382c..00000000 --- a/en/searchcat/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - Search engine files - - - -
- - - - - - - -
-
- -
-

Search engine files -
- -

- -

Search engine file names have ".search" as postfix. When they are clicked, the associated bookmark files with postfix ".search.html" would be appended. Ex: the associated bookmark for "foo.search" is "foo.search.html".

-

Any ".search" file can be opened as search engine file, each line of which has one of the following formats:
-[Engine name]:[url without '%s' inside]
-[Engine name]:[url with '%s' as keyword]
-[Engine name]:POST:[post params with '%s' as keyword]:[url]
-[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]

- -

Limitations (they are here for performance reasons):

- -

Local engines

-

c:[command line with '%s' as keyword]
-d:mimetype:[command line with '%s' as keyword]:[base url for external resources]

- -
-

Last Modified: 9 April 2025
-fix broken links
-


-

- - - - - - - - - diff --git a/en/searchurl/0m/hash2textarea.js b/en/searchurl/0m/hash2textarea.js deleted file mode 100644 index dad269f7..00000000 --- a/en/searchurl/0m/hash2textarea.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let d=document;let t=d.location.hash.substring(1);if(!t)return;t=decodeURI(t);let ta;function setV(){if(ta.value)return;ta.value=t;ta.dispatchEvent(new InputEvent('input'));setTimeout(()=>{setV()},400)}function waitTextarea(){ta=d.querySelector('textarea');if(ta){setV();return;}setTimeout(()=>{waitTextarea();},400);}waitTextarea();})() diff --git a/en/searchurl/0m/mdview.html b/en/searchurl/0m/mdview.html deleted file mode 100644 index cc96ff5c..00000000 --- a/en/searchurl/0m/mdview.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - diff --git a/en/searchurl/bingAI/bing.html b/en/searchurl/bingAI/bing.html deleted file mode 100644 index 06bedf09..00000000 --- a/en/searchurl/bingAI/bing.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - NewBingGoGo - - - - - - -
-
-
- - -
- - -
- -
-
-
-
- -
- -
-

chat with bing

-
-
-
-

More

-

Creative

-
-
-

More

-

Balanced

-
-
-

More

-

Precise

-
-
-
-
-
-
- I am ready to chat -
-
- 0 / 0 -
-
-
-
-
-
- - - - - - - - - - - - - diff --git a/en/searchurl/bingAI/css/DrawImg.css b/en/searchurl/bingAI/css/DrawImg.css deleted file mode 100644 index e2a01d07..00000000 --- a/en/searchurl/bingAI/css/DrawImg.css +++ /dev/null @@ -1,205 +0,0 @@ -/* 头部分 */ -body { - font-family: "Segoe UI", Arial, "Microsoft Yahei", sans-serif; - font-size: 75%; -} - -#head { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 4rem; - display: flex; - align-items: center; - justify-content: space-between; - backdrop-filter: blur(10px); - background-color: #ffffff78; - z-index: 99; -} - -#head-img-div { - height: 100%; - display: flex; - justify-content: flex-start; - align-items: center; -} - -#head-img-div>img { - height: 100%; -} - -#head-img-div-h2-img>* { - margin: 0; -} - -#head-li-div { - display: flex; - flex-direction: row; - align-items: center; -} - -#head-li-div>li { - list-style: none; - margin-right: 1rem; - font-size: 1rem; -} - -#head-li-div>a { - display: inline-block; - list-style: none; - margin-right: 1rem; - font-size: 1rem; - color: inherit; - text-decoration: inherit; -} - -#head-li-div>a:hover{ - color: #ff8300; -} - -/* 背景*/ - -#background { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - background: repeating-linear-gradient(359deg, rgb(182 196 255) 0%, rgb(207 225 255 / 78%) 100%); -} - -body.a #background, -body.a .ThemeColors { - transition: filter 1s; - filter: hue-rotate(10deg); -} - -body.b #background, -body.b .ThemeColors { - transition: filter 1s; - filter: hue-rotate(-15deg); -} - -body.c #background, -body.c .ThemeColors { - transition: filter 1s; - filter: hue-rotate(-40deg); -} - -#body{ - margin-top: 4rem; - overflow: hidden; -} - -#DrawDiv{ - background-color: #ffffff70; - min-height: 30rem; - max-width: 45rem; - margin: 1rem auto auto; - border-radius: 1.5rem; - overflow: hidden; - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-items: stretch; -} -#inputDraw{ - resize: none; - background-color: #ffffff00; - flex: 1; - margin-left: 1rem; - height: 2rem; - font-size: 1rem; - border: none; - outline:none; - line-height: 2rem; -} -#DrawInputDiv{ - background-color: #ffffff; - margin-left: 1rem; - margin-right: 1rem; - margin-top: 1rem; - border-radius: 0.5rem; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-items: stretch; -} -#startDraw{ - background-color: #0e00ff36; - border-radius: 0 0.5rem 0.5rem 0; - display: flex; - padding: 0.5rem; - align-items: center; - cursor: pointer; - font-size: 1rem; -} -#startDraw:hover{ - background-color: rgba(14, 0, 255, 0.56); -} -#DrawInputDiv{ - border: 1px solid rgba(0, 0, 0, 0.21); -} -#DrawInputDiv:has(#inputDraw:focus-visible){ - border: 1px solid #0e00ff36; -} -#imgs{ - margin-top: 1rem; - background-color: #c2b4ff29; - flex: 1; - border: 0.2rem solid #ffffff70; - border-top: none; - border-radius: 0 0 1.5rem 1.5rem; - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: stretch; - justify-content: space-around; - align-content: space-around; - color: #ff8300; - font-size: 1rem; - font-weight: bolder; -} -#imgs>img{ - width: 49%; - margin: 0.5%; - transition: all 0.5s; - cursor: pointer; -} - -#imgs>img:hover{ - transform:translate(-0.5%, -0.5%); -} - -@media screen and (max-width:500px) { - :root { - font-size: 3.5vmin; - } - #imgs>img{ - width: 99%; - } -} - -@media screen and (orientation:portrait) and (max-device-width:800px) and (max-device-height:1000px) { - :root { - font-size: 3.5vmin; - } - #imgs>img{ - width: 99%; - } -} - - - - - - - - - - - - - diff --git a/en/searchurl/bingAI/css/bing.css b/en/searchurl/bingAI/css/bing.css deleted file mode 100644 index 3aac6088..00000000 --- a/en/searchurl/bingAI/css/bing.css +++ /dev/null @@ -1,582 +0,0 @@ -/* 头部分 */ - -#head { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 4rem; - display: flex; - align-items: center; - justify-content: space-between; - backdrop-filter: blur(10px); - background-color: #ffffff78; - z-index: 99; -} - -#head-img-div { - height: 100%; - display: flex; - justify-content: flex-start; - align-items: center; -} - -#head-img-div>img { - height: 100%; -} - -#head-img-div-h2-img>* { - margin: 0; -} - -#head-li-div { - margin-right: 2rem; -} - - -/* 背景*/ - -#background { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - background: repeating-linear-gradient(359deg, rgb(182 196 255) 0%, rgb(207 225 255 / 78%) 100%); - transition: filter 1s; -} - -#background.a { - filter: hue-rotate(10deg); -} - -#background.b { - filter: hue-rotate(-5deg); -} - -#background.c { - filter: hue-rotate(-20deg); -} - - -/* 尾部分 */ - -#tail { - position: fixed; - left: 0; - bottom: 0; - width: 100%; - height: 7rem; - display: flex; - justify-content: center; - backdrop-filter: blur(10px); - background-color: #ffffff78; - flex-direction: column-reverse; - align-items: center; - z-index: 99; -} - -#SearchSuggestions { - position: fixed; - top: -3rem; - display: flex; - flex-wrap: nowrap; - flex-direction: row; - justify-content: center; - align-items: center; - width: 100%; - transition: opacity 0.2s -} - -#SearchSuggestions>a { - backdrop-filter: blur(10px); - background-color: #ffffff82; - border-radius: 2rem; - padding: 0.5rem; - font-size: 0.9rem; - margin: 0.2rem; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - transition: flex 0.5s; -} - -#SearchSuggestions>a:hover { - cursor: pointer; - background-color: #ffffff; - flex: none; -} - -#tail-in { - display: flex; - width: 80%; - align-items: center; - justify-content: center; - height: 80%; -} - - -#restart:hover , -#restartNewChat:hover -{ - background-color: #ffffff; - cursor: pointer; -} - -#restart , -#restartNewChat -{ - border: 0; - border-radius: 1.5rem; - background-color: #ffffff9e; - height: 100%; - font-size: 0.8rem; - transition: all 0.5s; - overflow: hidden; - white-space: normal; -} - -#restart { - width: 0; - margin: 0; - padding: 0; - opacity: 0; -} - -body:has(.my) #restart { - width: 5rem; - margin-right: 0.5rem; - padding: 0; - opacity: 1; -} - -#restartNewChat{ - width: 5rem; - margin-right: 0.5rem; -} - -#restartNewChat.onShow{ - width: 0; - margin: 0; - padding: 0; - opacity: 0; -} - -#send { - border: 0; - margin: 0 1rem 1rem 0; - border-radius: 2rem; - background-color: #005fff38; - height: 1.8rem; - font-size: 0.8rem; - cursor: pointer; - min-width: 3rem; - transition: all 0.5s; -} - -#send:hover { - background-color: #005fff80; -} - -#input { - border: none; - resize: none; - outline: none; - width: 100%; - background-color: #ffffff00; - margin: 1rem 0 1rem 1rem; - height: -webkit-fill-available; -} - -#input:focus-visible { - border: 0; -} - -#input-div { - border-radius: 1.5rem; - flex: 1; - height: 100%; - background-color: #ffffff; - margin: 0 0; - display: flex; - flex-direction: row; - align-items: flex-end; - transition: all 0.5s; -} - - -/* 页面部分 */ -body { - overflow-x: hidden; -} - -#body-bottom { - height: 15rem; - width: 100%; -} - - -/* 聊天选项部分 */ - -#chatTypeDiv { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - flex-wrap: nowrap; - margin-bottom: 7rem; - transition: all 0.5s; -} - -#chatTypeDiv>.chatTypeChose { - background-color: #ffffffcc; - border-radius: 2rem; - width: 9rem; - height: 4rem; - margin: 1rem 0.3rem; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - border: 0.5rem solid #ffffffcc; - cursor: pointer; -} - -#chatTypeDiv>.chatTypeChose>p { - margin: 0; - text-align: center; -} - -#chatTypeDiv>.chatTypeChose>h3 { - margin: 0; - text-align: center; -} - -#chatTypeChoseCreate.Chose { - background-color: #904887; - color: white; - cursor: default; -} - -#chatTypeChoseBalance.Chose { - background-color: #2870EA; - color: white; - cursor: default; -} - -#chatTypeChoseAccurate.Chose { - background-color: #006880; - color: white; - cursor: default; -} - - -/* 聊天部分,在页面内 */ -@keyframes acceptMeaaage { - from { - margin-top: 1em; - margin-left: -4em; - opacity: 0; - } - - to {} -} - -@keyframes sendMeaaage { - from { - margin-top: 1em; - margin-right: -4em; - opacity: 0; - } - - to {} -} - -.bing, -.my { - margin-bottom: 2rem; -} - -.bing { - display: grid; - justify-items: start; -} - -.bing>* { - animation: acceptMeaaage 0.5s; -} - -.my>* { - animation: sendMeaaage 0.5s; -} - -.my { - text-align: right; - font-size: 1.3rem; -} - -.InternalSearchQuery, -.InternalLoaderMessage { - margin-left: 1rem; - font-size: 1rem; -} - -.InternalSearchQuery>p, -.InternalLoaderMessage>p { - margin: 0; - margin-bottom: 1rem; -} - -.adaptiveCardsFatherDIV, -.my>.bobo { - display: inline-block; - background-color: #ffffff; - border-radius: 1rem; - padding: 1rem 1rem; - max-width: 85vw; - margin-bottom: 1rem; - text-align: left; -} - -.adaptiveCardsFatherDIV .throttling { - text-align: end; - font-size: 0.4rem; - margin-top: 0.5rem; - margin-bottom: -0.8rem; - border-top: 1px solid #0000005c; -} - -.bing>.sourceAttributions { - font-size: 0.9rem; - max-width: 85vw; - margin: 0; - margin-bottom: 1rem; - display: inline-flex; - flex-direction: row; - flex-wrap: nowrap; - align-items: center; - background-color: #ffffff57; - border-radius: 2rem; - padding: 0.5rem; -} - -.bing:has(.sourceAttributions) .adaptiveCardsFatherDIV { - margin-bottom: 1em; -} - - -.bing>.sourceAttributions>a { - display: inline-block; - background-color: #ffffff73; - border-radius: 1rem; - padding: 0.5rem; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - margin: 0.1rem; - color: #000000; - text-decoration: none; - transition: flex 0.5s; -} - -.bing>.sourceAttributions>a:hover { - background-color: #ffffffb3; - flex: none; -} - - -/* 上标 */ - -#chat .superscript { - display: inline-block; - vertical-align: super; - border: 0.1rem solid #0969da; - border-radius: 1em; - min-width: 1em; - text-align: center; - line-height: 1em; - font-size: small; - color: #0969da; -} - -#chat .superscript:hover { - background-color: #00000024; -} - -/*暂时不知道如何解析的渲染卡片请求*/ -.RenderCardRequest { - border-radius: 1em; - background-color: white; - overflow: auto; - padding: 1em; - width: 85vw; - max-width: 1100px; -} - -.RenderCardRequest>iframe { - min-width: 768px; - width: 100%; - height: 602px; - border: 0; -} - - - -/* 画图部分 */ - -.GenerateContentQuery { - background-color: #ffffff; - border-radius: 1rem; - max-width: 85%; - margin-bottom: 1rem; - text-align: center; - font-size: 1rem; - padding: 1rem; - overflow: hidden; - display: inline-table; -} - -.GenerateContentQuery>img { - max-width: 24%; - margin: 0.5%; - transition: all 0.8s; - cursor: pointer; -} - -.GenerateContentQuery>img:hover { - margin: 0.2% 0.8% 0.8% 0.2%; - box-shadow: #0000007a 2px 3px 5px 0px; - transition: all 0.3s; -} - - -/* 错误部分 */ - -#chat .error { - text-align: center; - color: red; -} - -.NoPower { - text-align: center; - color: #ff6d00; - cursor: pointer; - margin: 1rem; - text-decoration: underline; -} - - -/* 用于适配不同设备 */ - - -/* pc */ - -:root { - font-size: 1rem; -} - -div.markdown-body { - font-size: 1rem; - overflow: auto; -} - - -/* 窄窗口 */ -@media screen and (max-width:550px) { - - #tail-in:has(#input:focus-visible) #restart, - #tail-in:has(#input:hover) #restart, - #tail-in:has(#input:focus-visible) #restartNewChat, - #tail-in:has(#input:hover) #restartNewChat { - width: 0; - margin: 0; - padding: 0; - opacity: 0; - } - - .GenerateContentQuery>img { - max-width: 49%; - width: 49%; - } - - #tail-in { - width: 90%; - } - - .bing>.sourceAttributions { - flex-wrap: wrap; - } -} - -/*手机 css*/ - -@media screen and (orientation:portrait) and (max-device-width:800px) and (max-device-height:1000px) { - .InternalSearchQuery, - .InternalLoaderMessage { - width: 90%; - } - - .InternalSearchQuery>p, - .InternalLoaderMessage>p { - font-size: 1rem; - } - - .bing>.sourceAttributions { - max-width: 88vw; - flex-wrap: wrap; - } - - .adaptiveCardsFatherDIV, - .my>.bobo { - max-width: 88vw; - } - - #tail-in { - width: 90%; - } - - #restart { - font-size: 1em; - } - - #input { - font-size: 1em; - } - - .GenerateContentQuery>img { - max-width: 49%; - width: 49%; - } - - #tail-in:has(#input:focus-visible) #restart, - #tail-in:has(#input:hover) #restart, - #tail-in:has(#input:focus-visible) #restartNewChat, - #tail-in:has(#input:hover) #restartNewChat { - width: 0; - margin: 0; - padding: 0; - opacity: 0; - } - - /* 聊天部分,在页面内 */ - @keyframes acceptMeaaage { - from { - margin-top: 1em; - margin-left: 0em; - opacity: 0; - } - - to {} - } - - @keyframes sendMeaaage { - from { - margin-top: 1em; - margin-right: 0em; - opacity: 0; - } - - to {} - } -} diff --git a/en/searchurl/bingAI/draw.html b/en/searchurl/bingAI/draw.html deleted file mode 100644 index 40e0bba3..00000000 --- a/en/searchurl/bingAI/draw.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - Draw - - - - - -
-
- - -
-
- -
-
- - - diff --git a/en/searchurl/bingAI/js/GetSet.js b/en/searchurl/bingAI/js/GetSet.js deleted file mode 100644 index e58f65a5..00000000 --- a/en/searchurl/bingAI/js/GetSet.js +++ /dev/null @@ -1,42 +0,0 @@ -async function setMagicUrl(url) { - localStorage.setItem('GoGoUrl',url); -} - -// ture:开启使用魔法聊天|false:关闭使用魔法聊天|'repeat':开启聊天复用 -async function setChatHubWithMagic(user) { - localStorage.setItem('ChatHubWithMagic',user); -} -// ture|false|'repeat' -async function getChatHubWithMagic() { - let v = localStorage.ChatHubWithMagic; - if (v) { - switch(v){ - case 0: - break; - case 1: - return false; - case 2: - return true; - } - } - return 'repeat'; -} - -//设置上次创建的聊天 -async function setLastChatJson(json) { - localStorage.setItem('LastChatJson',json); -} - -//获取上次创建的聊天 -async function getLastChatJson() { - return localStorage.LastChatJson; -} - -//获取上次聊天聊到的消息id次数 -async function getLastChatInvocationId(){ - return localStorage.LastChatInvocationId; -} -//设置上次聊天聊到的消息id次数 -async function setLastInvocationId(invocationId){ - return localStorage.setItem('LastChatInvocationId',invocationId); -} diff --git a/en/searchurl/bingAI/js/Write.js b/en/searchurl/bingAI/js/Write.js deleted file mode 100644 index 0befaaa3..00000000 --- a/en/searchurl/bingAI/js/Write.js +++ /dev/null @@ -1,59 +0,0 @@ -createChat(thisChatType).then((r) => { - if(r.ok) talk = r.obj; -}); - -/**重写重置聊天到初始状态函数 */ -function reSetStartChatMessage(type) { - chat.innerHTML = ``; - isSpeaking = false; -} - -/**重写函数 */ -function isSpeakingStart(chatWithMagic, sendText) { - isSpeaking = true; -} -//重写 -function isSpeakingFinish() { - isSpeaking = false; -} - - -//重写send函数 -oldSend = send; -send = (text) => { - reSetStartChatMessage(); - oldSend(text); -} - -//重写porserTextBlock函数 -/* -解析TextBlock body.type==TextBlock -*/ -function porserTextBlock(body, father) { - if (!body.size) { - let div = getByClass('textBlock', 'div', father, 'markdown-body'); - div.innerHTML = marked.marked(completeCodeBlock(body.text)); - renderMathInElement(div,renderMathInElementOptions); - let aaas = div.getElementsByTagName('a'); - //将超链接在新页面打开 - for(let i=0;i { - let text = input_text.value; - send(text); -}; diff --git a/en/searchurl/bingAI/js/bing.js b/en/searchurl/bingAI/js/bing.js deleted file mode 100644 index ed369053..00000000 --- a/en/searchurl/bingAI/js/bing.js +++ /dev/null @@ -1,294 +0,0 @@ -var chat = document.getElementById('chat'); -var chatTypeDiv = document.getElementById('chatTypeDiv'); -var docTitle = document.getElementById('docTitle'); -var restart_button = document.getElementById('restart'); -var input_text = document.getElementById('input'); -var send_button = document.getElementById('send'); -let restartNewChat = document.getElementById('restartNewChat'); -var thisChatType = chatTypes.balance; - -//全局变量 -var talk; -var returnMessage; -var isSpeaking = false; - -reSetStartChatMessage(); - -//(string) -function addMyChat(message) { - let bobo = document.createElement('div'); - bobo.style.whiteSpace = 'pre-wrap'; - bobo.innerText = message; - bobo.classList.add('bobo'); - bobo.classList.add('markdown-body'); - let go = document.createElement('div'); - go.classList.add('my'); - go.appendChild(bobo); - chat.appendChild(go); -} - -//(string) -function addError(message) { - let go = document.createElement('div'); - go.classList.add('error'); - go.innerHTML = message; - chat.appendChild(go); -} - -let onMessageIsOKClose = false; -//(json) -function onMessage(json, returnMessage) { - if (json.type == "close") { - isSpeakingFinish(); - if (!onMessageIsOKClose) { - addError("聊天异常中断了!可能是网络问题。"); - } - return; - } - if (json.type == 'error') { - addError("连接发生错误:" + json.mess); - return; - } - onMessageIsOKClose = false - if (json.type == 3) { - onMessageIsOKClose = true; - returnMessage.getCatWebSocket().close(1000, 'ok'); - } else { - localStorage.removeItem('LastChatJson'); - if (json.type == 1) { - porserArguments(json.arguments); - } else if (json.type == 2) { - porserType2Item(json.item); - } else { - console.log(JSON.stringify(json)); - } - } -} - - -//页面逻辑 - - -//回车键发送 ctrl+回车换行 -input_text.addEventListener('keydown', (event) => { - if (event.key === 'Enter' && !event.altKey) { - event.preventDefault(); - //调用发送消息的函数 - send_button.onclick(); - } else if (event.key === 'Enter' && event.altKey) { - event.preventDefault(); - // 插入换行符 - input_text.value += "\n"; - } -}); - -/**重置聊天框和聊天建议到初始状态 */ -function reSetStartChatMessage(type) { - createChat(thisChatType).then((r) => { - if(r.ok) talk = r.obj; - }); - getChatHubWithMagic().then(async a => { - let t = 0; - if (a == 'repeat') { - t = await getLastChatInvocationId(); - } - chat.innerHTML = ` -
-
-
-
-
- ${t} / 0 -
-
-
- `; - }); -} - -/**正在创建聊天 */ -function isAskingToMagic() { - isSpeaking = true; - send_button.value = '施法中.'; -} - -/**bing正在回复 */ -function isSpeakingStart(chatWithMagic, sendText) { - isSpeaking = true; - - if (sendText) { - docTitle.innerText = sendText; - } - send_button.value = '响应中.'; -} - -/**bing回复结束 */ -function isSpeakingFinish() { - isSpeaking = false; - send_button.value = 'submit'; -} - -function send(text) { - if (isSpeaking) { - return; - } - chatTypeDiv.style.opacity = 0; - addMyChat(text); - if (!talk) { - isAskingToMagic(); - createChat(thisChatType).then((r) => { - if (!r.ok) { - addError(r.message); - isSpeakingFinish(); - return; - } - talk = r.obj; - isSpeakingStart(); - r = talk.sendMessage(text, onMessage); - if (!r.ok) { - isSpeakingFinish(); - addError(r.message); - return; - } - returnMessage = r.obj; - isSpeakingStart(r.chatWithMagic, text); - }); - return; - } else { - isSpeakingStart(); - let r = talk.sendMessage(text, onMessage) - if (!r.ok) { - isSpeakingFinish(); - addError(r.message); - return; - } - returnMessage = r.obj; - isSpeakingStart(r.chatWithMagic, text); - } -} - -send_button.onclick = () => { - if (isSpeaking) { - return; - } - let text = input_text.value; - input_text.value = ''; - input_update_input_text_sstyle_show_update({ target: input_text }); - if (!text) { - alert('什么都没有输入呀!'); - return; - } - send(text); -}; - -restart_button.onclick = () => { - onMessageIsOKClose = true; - if (returnMessage) { - returnMessage.getCatWebSocket().close(1000, 'ok'); - returnMessage = undefined; - } - talk = undefined; - isSpeakingFinish(); - reSetStartChatMessage(); - chatTypeDiv.style.opacity = 1; -}; - - - -//滚动到底部显示收聊天建议 - -// 定义一个函数处理滚动事件 -function handleScroll() { - // 获取文档的高度和滚动距离 - var docHeight = document.body.scrollHeight; - var scrollPos = window.pageYOffset; - // 如果滚动到底部,显示元素,否则隐藏元素 -} -// 添加滚动事件监听器 -window.addEventListener("scroll", handleScroll); - - - - -//选择聊天类型,创造力,平衡,精准 -let backgroundDIV = document.getElementById('background'); -let chatTypeChoseCreate = document.getElementById('chatTypeChoseCreate'); -let chatTypeChoseBalance = document.getElementById('chatTypeChoseBalance'); -let chatTypeChoseAccurate = document.getElementById('chatTypeChoseAccurate'); -//默认平衡 -thisChatType = chatTypes.balance; -chatTypeChoseCreate.onclick = () => { - if (chatTypeDiv.style.opacity == 0) { - return; - } - chatTypeChoseCreate.classList.add('Chose'); - chatTypeChoseBalance.classList.remove('Chose'); - chatTypeChoseAccurate.classList.remove('Chose'); - thisChatType = chatTypes.create; - backgroundDIV.className = 'a'; - reSetStartChatMessage('create'); -} -chatTypeChoseBalance.onclick = () => { - if (chatTypeDiv.style.opacity == 0) { - return; - } - chatTypeChoseCreate.classList.remove('Chose'); - chatTypeChoseBalance.classList.add('Chose'); - chatTypeChoseAccurate.classList.remove('Chose'); - thisChatType = chatTypes.balance; - backgroundDIV.className = 'b'; - reSetStartChatMessage('balance'); -} -chatTypeChoseAccurate.onclick = () => { - if (chatTypeDiv.style.opacity == 0) { - return; - } - chatTypeChoseCreate.classList.remove('Chose'); - chatTypeChoseBalance.classList.remove('Chose'); - chatTypeChoseAccurate.classList.add('Chose'); - thisChatType = chatTypes.accurate; - backgroundDIV.className = 'c'; - reSetStartChatMessage('accurate'); -} - - -// "resourceTypes": [ -// "main_frame", -// "sub_frame", -// "stylesheet", -// "script", -// "image", -// "font", -// "object", -// "xmlhttprequest", -// "ping", -// "csp_report", -// "media", -// "websocket", -// "webtransport", -// "webbundle", -// "other" -// ] - - -//发送按钮出现逻辑 -function input_update_input_text_sstyle_show_update(v) { - if (v.target.value) { - send_button.style.opacity = 1; - } else { - send_button.style.opacity = 0; - } -} -input_text.addEventListener("input", input_update_input_text_sstyle_show_update); -input_update_input_text_sstyle_show_update({ target: input_text }); - - -//开始新聊天按钮逻辑,仅在聊天复用 -restartNewChat.onclick = async () => { - localStorage.removeItem('LastChatJson'); - await setLastInvocationId(1); - restart_button.onclick(); -} - - - diff --git a/en/searchurl/bingAI/js/bingChatHub.js b/en/searchurl/bingAI/js/bingChatHub.js deleted file mode 100644 index 94ca39a0..00000000 --- a/en/searchurl/bingAI/js/bingChatHub.js +++ /dev/null @@ -1,266 +0,0 @@ -var expUrl = new RegExp('^(https?://)([-a-zA-z0-9]+\\.)+([-a-zA-z0-9]+)+\\S*$'); -function getUuidNojian() { - return URL.createObjectURL(new Blob()).split('/')[3].replace(/-/g, ''); -} - -class SendMessageManager { - //(会话id,客户端id,签名id,是否是开始) - //(string,string,string,boolena) - constructor(conversationId, clientId, conversationSignature,invocationId) { - this.invocationId = invocationId==undefined?1:invocationId; - this.conversationId = conversationId; - this.clientId = clientId; - this.conversationSignature = conversationSignature; - this.optionsSets = chatTypes.balance; - } - - //chatTypes中的一种 - setChatType(chatType) { - this.optionsSets = chatType; - } - - //发送json数据 - sendJson(chatWebSocket, json) { - let go = JSON.stringify(json) + '\u001e'; - chatWebSocket.send(go); - console.log('发送', go) - } - //获取用于发送的握手数据 - //(WebSocket) - sendShakeHandsJson(chatWebSocket) { - this.sendJson(chatWebSocket, { - "protocol": "json", - "version": 1 - }); - } - //获取用于发送的聊天数据 - //(WebSocket,sreing) - async sendChatMessage(chatWebSocket, chat) { - let optionsSets = chatTypes[this.optionsSets]; - let json = { - "arguments": [{ - "source": source, - "optionsSets": optionsSets, - "allowedMessageTypes": allowedMessageTypes, - "sliceIds": sliceIds, - "verbosity": "verbose", - "traceId": getUuidNojian(), - "isStartOfSession": (this.invocationId <= 1) ? true : false, - "message": await generateMessages(this,chat), - "conversationSignature": this.conversationSignature, - "participant": { - "id": this.clientId - }, - "conversationId": this.conversationId, - "previousMessages": (this.invocationId <= 1) ? await getPreviousMessages() : undefined - }], - "invocationId": this.invocationId.toString(), - "target": "chat", - "type": 4 - }; - this.sendJson(chatWebSocket, json); - this.invocationId++; - } -} - - - - - -//处理返回消息的类 -class ReturnMessage { - //(WebSocket,function:可以不传) - constructor(catWebSocket, lisin) { - this.catWebSocket = catWebSocket; - this.onMessage = [(v) => { - //console.log(JSON.stringify(v)) - }]; - if ((typeof lisin) == 'function') { - this.regOnMessage(lisin); - } - catWebSocket.onmessage = (mess) => { - //console.log('收到', mess.data); - let sss = mess.data.split('\u001e'); - for (let i = 0; i < sss.length; i++) { - if (sss[i] == '') { - continue; - } - for (let j in this.onMessage) { - if ((typeof this.onMessage[j]) == 'function') { - try { - this.onMessage[j](JSON.parse(sss[i]), this); - } catch (e) { - console.warn(e) - } - } - } - } - } - catWebSocket.onclose = (mess) => { - for (let i in this.onMessage) { - if ((typeof this.onMessage[i]) == 'function') { - try { - this.onMessage[i]({ - type: 'close', - mess: '连接关闭' - }, this); - } catch (e) { - console.warn(e) - } - } - } - } - catWebSocket.onerror = (mess) => { - console.log(mess); - for (let i in this.onMessage) { - if ((typeof this.onMessage[i]) == 'function') { - try { - this.onMessage[i]({ - type: 'error', - mess: mess - }, this); - } catch (e) { - console.warn(e) - } - } - } - } - } - /* - 获取消息WebSocket - */ - getCatWebSocket() { - return this.catWebSocket; - } - /** - * 注册收到消息监听器 - */ - //(function(json,ReturnMessage)) - regOnMessage(theFun) { - this.onMessage[this.onMessage.length] = theFun; - } -} -//处理聊天的类 -class Chat { - //theChatType chatTypes变量中的其中一个 - //invocationId 可以不传 - //(string,ture|false|'repeat',string,string,string,theChatType,int|undefined) - constructor(magicUrl, chatWithMagic, charID, clientId, conversationSignature, theChatType,invocationId) { - this.magicUrl = magicUrl; - this.chatWithMagic = chatWithMagic; - this.sendMessageManager = new SendMessageManager(charID, clientId, conversationSignature,invocationId); - if (theChatType) { - this.sendMessageManager.setChatType(theChatType); - } - } - /** - * 返回 - { - ok:true|false, - message:显示消息, - obj:ReturnMessage对象 - } - 当ok等于false时,不返回ReturnMessage - * 参数 消息string,当收到消息的函数,当关闭时函数 - */ - //(string,function:可以不传) - sendMessage(message, onMessage) { - try { - //let restsrstUrl = 'wss://sydney.bing.com/sydney/ChatHub'; - //if (this.chatWithMagic==true) - let restsrstUrl = this.magicUrl.replace('http', 'ws')+"sydney/ChatHub"; - - let chatWebSocket = new WebSocket(restsrstUrl); - chatWebSocket.onopen = () => { - this.sendMessageManager.sendShakeHandsJson(chatWebSocket); - this.sendMessageManager.sendChatMessage(chatWebSocket, message); - } - return { - ok: true, - message: 'ok', - obj: new ReturnMessage(chatWebSocket, onMessage), - chatWithMagic: this.chatWithMagic==true?true:false - }; - } catch (e) { - console.warn(e) - return { - ok: false, - message: "发生错误,可能是网络连接错误:" + e.message - }; - } - } -} - -function URLTrue(url, thiePath) { - return url + thiePath; -} - -//获取newbing权限 -async function getPower() {} - -async function copyCookies(magicUrl) {} - -//创建一个新对话 -/** - 返回结构,如果ok等于false则无chat对象 - { - ok:true|false, - message:显示消息, - obj:Cat对象 - } - */ -async function createChat(theChatType) { - let chatWithMagic = await getChatHubWithMagic(); - let magicUrl = await getMagicUrl(); - let restartNewChat = document.getElementById('restartNewChat'); - - if(chatWithMagic=='repeat'){//如果是聊天复用 - restartNewChat.classList.remove('onShow'); - let resjson = await getLastChatJson(); - if(resjson){//如果没有上次聊天或上次聊天已经失效就不返回,继续走创建聊天流程 - let invocationId = await getLastChatInvocationId(); - if(!invocationId){ - invocationId = 1; - } - return { - ok: true, - message: 'ok', - obj: new Chat(magicUrl, chatWithMagic, resjson.conversationId, resjson.clientId, resjson.conversationSignature, theChatType,invocationId) - }; - } - } - - let mes; - do { - try { - let url = URLTrue(magicUrl,'turing/conversation/create'); - let res = await fetch(url); - if(!res.ok){ - if(res.headers.has('cf-mitigated')){ - let challengeUrl = `${magicUrl}/challenge?`+location.href; - location.href=challengeUrl; - return; - } - mes = `Error code: ${res.status} ${res.statusText}`; - break; - } - let resjson = await res.json(); - if (!resjson.result || resjson.result.value != 'Success') { - mes = resjson; - break; - } - //保存成功的聊天 - setLastChatJson(resjson); - return { - ok: true, - message: 'ok', - obj: new Chat(magicUrl, chatWithMagic, resjson.conversationId, resjson.clientId, resjson.conversationSignature, theChatType) - }; - } catch (e) {mes = e.message;} - }while(false); - - return { - ok: false, - message: mes - }; -} diff --git a/en/searchurl/bingAI/js/generateImages.js b/en/searchurl/bingAI/js/generateImages.js deleted file mode 100644 index fbed9c41..00000000 --- a/en/searchurl/bingAI/js/generateImages.js +++ /dev/null @@ -1,75 +0,0 @@ - -const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) -/** - * @param text 生成图像的描述 - * @param requestId 请求id,如果不是对话生成图片可以为undefined - * @param countF 回调函数,获取当前是第几次请求。 - * @return [...{img:url,mImg:url}...] img:图片url mIng:缩略图url - * */ -async function generateImages(text,requestId,countF){ - let theUrls = new URLSearchParams(); - theUrls.append('re', '1'); - theUrls.append('showselective', '1'); - theUrls.append('sude', '1'); - theUrls.append('kseed', '7500'); - theUrls.append('SFX', '2'); - theUrls.append('q', text); - theUrls.append('iframeid', requestId); - let theUrl = magicUrl+`images/create?${theUrls.toString()}`; - let response = await fetch(theUrl, - {"sec-fetch-site": "same-origin", - "referer": "https://www.bing.com/search?q=bingAI"}); - let html = (await response.text()); - //let cookieID = response.headers.get('cookieID'); - - //如果返回的是有错误的页面 - let urr = new RegExp('class="gil_err_mt">([^<>]*)').exec(html); - if(urr && urr[1]){ - let error = `

${urr[1]}

`; - urr = new RegExp('class="gil_err_sbt">(([^<>]*<(a|div)[^<>]*>[^<>]*[^<>]*)*)').exec(html); - if(urr && urr[1]){ - error = error+`

${urr[1]}

`; - } - throw new Error(error); - } - - //如果没错误就匹配链接获取图片 - urr = new RegExp('"/(images/create/async/results/(\\S*))"').exec(html); - if(!urr || !urr[1]){ - console.log(html); - throw new Error("请求图片返回不正确的页面,无法加载图片。"); - } - let ur = urr[1]; - ur = ur.replaceAll('&','&'); - let imgPageHtmlUrl = magicUrl + `${ur}`; - let options = {"sec-fetch-site":"same-origin", "referer":"https://www.bing.com/images/create?partner=sydney&showselective=1&sude=1&kseed=7000"}; - for(let count = 1;count<=20;count++){ - if((!!countF)&&(typeof countF =='function')){ - countF(count); - } - await sleep(3000); - let imgPageHtml; - try{ - imgPageHtml = (await (await fetch(imgPageHtmlUrl,options)).text()); - }catch(e){ - console.error(e); - } - if(!imgPageHtml){ - continue; - } - //用正则找全部图片 - let allSrc = imgPageHtml.matchAll(/]*src="([^"]*)"[^<>]*>/g); - let imgs = []; - for(let src;!(src=allSrc.next()).done;){ - imgs[imgs.length] = { - img:src.value[1].split('?')[0], - mImg:src.value[1].replaceAll('&','&') - } - } - if(imgs.length>0){ - return imgs; - }else{ - throw new Error("服务器未正常返回图片!"); - } - } -} diff --git a/en/searchurl/bingAI/js/optionsSets.js b/en/searchurl/bingAI/js/optionsSets.js deleted file mode 100644 index a767e7f7..00000000 --- a/en/searchurl/bingAI/js/optionsSets.js +++ /dev/null @@ -1,183 +0,0 @@ -//聊天选项 -let chatTypes = { - //更有创造力选项 - create: [ - "nlu_direct_response_filter", - "deepleo", - "disable_emoji_spoken_text", - "responsible_ai_policy_235", - "enablemm", - "h3imaginative", - "objopinion", - "eredirecturl", - "dv3sugg", - "autosave", - "clgalileo", - "gencontentv3", - "prompttrcp" - ], - //balance 平衡模式选项 - balance: [ - "nlu_direct_response_filter", - "deepleo", - "disable_emoji_spoken_text", - "responsible_ai_policy_235", - "enablemm", - "galileo", - "objopinion", - "eredirecturl", - "dv3sugg", - "autosave", - "saharagenconv5" - ], - //精准选项 - accurate: [ - "nlu_direct_response_filter", - "deepleo", - "disable_emoji_spoken_text", - "responsible_ai_policy_235", - "enablemm", - "h3precise", - "objopinion", - "eredirecturl", - "dv3sugg", - "autosave", - "clgalileo", - "gencontentv3", - "prompttrcp" - ] -} - -//消息来源 -let source = "cib"; - -//接收消息类型 -let allowedMessageTypes = [ - "ActionRequest", - "Chat", - "Context", - "InternalSearchQuery", - "InternalSearchResult", - "Disengaged", - "InternalLoaderMessage", - "Progress", - "RenderCardRequest", - "AdsQuery", - "SemanticSerp", - "GenerateContentQuery", - "SearchQuery" -] - -//切片id,也不知道是啥意思,反正官网的更新了 -let sliceIds = [ - "winmuid1tf", - "osbsdusgreccf", - "contansperf", - "mlchatpc2", - "winstmsg2tf", - "creatgoglt2", - "creatorv2t", - "norespwcf", - "0521dur5", - "dur5", - "517opinion", - "418dhlths0", - "525ptrcp", - "kcimgv2cf", - "kcimgatt", - "427startpms0" -] - - - - -//生成消息对象 -async function generateMessages(sendMessageManager/*消息管理器*/,chatMessageText/*要发送的消息文本*/){ - function timeString() { - var d = new Date(); - var year = d.getFullYear(); - var month = (d.getMonth() + 1).toString().padStart(2, "0"); - var date = d.getDate().toString().padStart(2, "0"); - var hour = d.getHours().toString().padStart(2, "0"); - var minute = d.getMinutes().toString().padStart(2, "0"); - var second = d.getSeconds().toString().padStart(2, "0"); - var offset = "+08:00"; // 你可以根据需要修改这个值 - var s = year + "-" + month + "-" + date + "T" + hour + ":" + minute + ":" + second + offset; - return s; - } - - if(!sendMessageManager.startTime){ - sendMessageManager.startTime = timeString(); - } - return { - "locale": "zh-CN", - "market": "zh-CN", - "region": "US", - "location": "lat:47.639557;long:-122.128159;re=1000m;", - "locationHints": [ - { - "Center": { - "Latitude": 30.474109798833613, - "Longitude": 114.39626256171093 - }, - "RegionType": 2, - "SourceType": 11 - }, - { - "country": "United States", - "state": "California", - "city": "Los Angeles", - "zipcode": "90060", - "timezoneoffset": -8, - "dma": 803, - "countryConfidence": 8, - "cityConfidence": 5, - "Center": { - "Latitude": 33.9757, - "Longitude": -118.2564 - }, - "RegionType": 2, - "SourceType": 1 - } - ], - "timestamp": sendMessageManager.startTime, - "author": "user", - "inputMethod": "Keyboard", - "text": chatMessageText, - "messageType": "Chat" - } - -} - -async function getPreviousMessages(){ - function getUuid() { - return URL.createObjectURL(new Blob()).split('/')[3]; - } - let pos = getStartProposes(); - return [{ - "text": getStartMessage(), - "author": "bot", - "adaptiveCards": [], - "suggestedResponses": [{ - "text": pos[0], - "contentOrigin": "DeepLeo", - "messageType": "Suggestion", - "messageId": getUuid(), - "offense": "Unknown" - }, { - "text": pos[1], - "contentOrigin": "DeepLeo", - "messageType": "Suggestion", - "messageId": getUuid(), - "offense": "Unknown" - }, { - "text": pos[2], - "contentOrigin": "DeepLeo", - "messageType": "Suggestion", - "messageId": getUuid(), - "offense": "Unknown" - }], - "messageId": getUuid(), - "messageType": "Chat" - }]; -} diff --git a/en/searchurl/bingAI/js/parserReturn.js b/en/searchurl/bingAI/js/parserReturn.js deleted file mode 100644 index 3dc18db2..00000000 --- a/en/searchurl/bingAI/js/parserReturn.js +++ /dev/null @@ -1,418 +0,0 @@ -/** -(id,元素的tag,父元素,创建时顺便添加的class:可以多个) -获取一个指定id的元素如果没用就在服元素创建这个元素 -*/ -function getByID(id, tag, father) { - let t = document.getElementById(id); - if (!t) { - t = document.createElement(tag); - t.id = id; - for (let i = 3; i < arguments.length; i++) { - if (arguments[i]) { - t.classList.add(arguments[i]); - } - } - father.appendChild(t); - } - return t; -} -function getByClass(className, tag, father) { - let t = father.getElementsByClassName(className)[0]; - if (!t) { - t = document.createElement(tag); - t.classList.add(className); - for (let i = 3; i < arguments.length; i++) { - if (arguments[i]) { - t.classList.add(arguments[i]); - } - } - father.appendChild(t); - } - return t; -} - -function test(test) { - porserArguments(test.arguments); -} - -var throttling = { - "maxNumUserMessagesInConversation": 0, - "numUserMessagesInConversation": 0 -}; - -//解析type2的item -function porserType2Item(item){ - let chatDiv = document.getElementById('chat'); - if(item.result){ - let result = item.result; - if(result.value=='Success'){ - - }else if (result.value == 'Throttled') { - addError(result.message); - addError('24消息请求数达到了限制!'); - }else{ - addError(result.message); - addError('发生未知错误!'); - } - } - if (item.throttling) { - throttling = item.throttling; - } - if (item.messages) { - let nextFather = getByID(item.requestId, 'div', chatDiv, 'bing'); - porserMessages(item.messages, nextFather); - } - -} -/** - * 解析arguments - * 解析聊天消息,将消息添加到页面 - * **/ -function porserArguments(argumentss) { - for (let i = 0; i < argumentss.length; i++) { - porserType2Item(argumentss[i]); - } -} - -/* -解析messages -*/ -function porserMessages(messages, father) { - for (let i = 0; i < messages.length; i++) { - let message = messages[i]; - if(message.author=='user'){ - continue;//不解析用户的消息 - } - - //解析adaptiveCards 也就是聊天消息部分 下面类型的都是带有adaptiveCards的 - if (!message.messageType && message.adaptiveCards) {//如果是正常的聊天 - let adaptiveCardsFatherDIV = getByID(message.messageId, 'div', father, 'adaptiveCardsFatherDIV'); - porserAdaptiveCards(message.adaptiveCards, adaptiveCardsFatherDIV); - - //解析sourceAttributions 也就是引用链接部分 - if (message.sourceAttributions) { - if (message.sourceAttributions.length > 0) { - let sourceAttributionsDIV = getByID(message.messageId + 'sourceAttributions', 'div', father, 'sourceAttributions'); - porserSourceAttributions(message.sourceAttributions, sourceAttributionsDIV); - } - } - //解析suggestedResponses 建议发送的消息,聊天建议 - if (message.suggestedResponses) { - porserSuggestedResponses(message.suggestedResponses); - } - - } else if (message.messageType == 'InternalSearchQuery') { //如果是收索消息 - let div = getByID(message.messageId, 'div', father, 'InternalSearchQuery'); - porserLineTextBlocks(message.text, div); - - } else if (message.messageType == 'InternalLoaderMessage') { //如果是加载消息 - let div = getByID(message.messageId, 'div', father, 'InternalLoaderMessage'); - porserLineTextBlocks(message.text, div); - - } else if (message.messageType == 'GenerateContentQuery') {//如果是生成内容查询 - let div = getByID(message.messageId, 'div', father, 'GenerateContentQuery'); - generateContentQuery(message, div); - - }else if (message.messageType == 'RenderCardRequest'){//渲染卡片请求,目前不知道有什么用 - renderCardRequest(message, father); - - }else if(message.messageType == 'Disengaged'){ - let div = getByID(message.messageId, 'div', chat, 'error'); - div.innerHTML = ` - ${message.hiddenText}
聊天中断!试试开始新主题? - `; - - }else if(message.contentOrigin == 'TurnLimiter'){ - addError(message.text); - addError('聊天被限制了,试试开始新主题?'); - - } else { - console.log('发现一个另类message', JSON.stringify(message)); - } - - } -} - -/* -解析渲染卡片请求,暂时不知道如何解析这个请求,就先判断里面有没有内容吧!没有就不显示。 -*/ -function renderCardRequest(message,father){ - if(father[message.messageId+'renderCardRequest']){//防止解析多次 - return; - } - father[message.messageId+'renderCardRequest'] = true; - - let url = 'https://www.bing.com/search?' - let theUrls = new URLSearchParams(); - theUrls.append("showselans",1); - theUrls.append("q",message.text); - theUrls.append("iframeid",message.messageId); - let src = url+theUrls.toString(); - - fetch(src).then(async (ret)=>{ - let html = await ret.text(); - // b_poleContent pc设备 || b_ans b_imgans 移动设备 - if(html.indexOf('class="b_poleContent"')>=0 || html.indexOf('class="b_ans')>=0){ - let div = getByID(message.messageId, 'div', father, 'RenderCardRequest'); - div.innerHTML = ``; - } - }); -} - - -/* -解析generateContentQuery生成内容查询,目前是只有图片 -*/ -function generateContentQuery(message, father) { - if(message.contentType=="IMAGE"){ - if(father.runed){//防止生成多次 - return; - } - father.runed = true; - generateContentQueryImg(message, father); - }else{ - console.log('发现一个另类generateContentQuery', JSON.stringify(message)); - } -} - -/** - * 解析图片生成目前是只有图片 - */ -function generateContentQueryImg(message, father){ - getMagicUrl().then(async magicUrl => { - if (!magicUrl) { - addError("魔法链接不正确!无法加载图片"); - return; - } - if (!expUrl.test(magicUrl)) { - addError("魔法链接不正确!无法加载图片") - return; - } - let theUrls = new URLSearchParams(); - theUrls.append('re', '1'); - theUrls.append('showselective', '1'); - theUrls.append('sude', '1'); - theUrls.append('kseed', '7500'); - theUrls.append('SFX', '2'); - theUrls.append('q', message.text); - theUrls.append('iframeid', message.requestId); - let theUrl = URLTrue(magicUrl,"images/create?") + theUrls.toString(); - - try{ - father.innerHTML = `正在生成${message.text}的图片.`; - let html = (await (await fetch(theUrl)).text()); - - //如果有错误就输出错误 - let urr = new RegExp('class="gil_err_mt">([^<>]*)').exec(html); - if(urr && urr[1]){ - father.innerHTML = `

${urr[1]}

` - urr = new RegExp('class="gil_err_sbt">(([^<>]*<(a|div)[^<>]*>[^<>]*[^<>]*)*)').exec(html); - if(urr && urr[1]){ - father.innerHTML = father.innerHTML+`

${urr[1]}

`; - } - return; - } - - //如果没错误就匹配链接获取图片 - urr = new RegExp('"/(images/create/async/results/(\\S*))"').exec(html); - if(!urr || !urr[1]){ - console.log(html); - addError("请求图片返回不正确的页面,无法加载图片。"); - return; - } - let ur = urr[1]; - ur = ur.replaceAll('&','&'); - let imgPageHtmlUrl = URLTrue(magicUrl,ur); - let count = 0; - let run = async ()=>{ - father.innerHTML = `正在生成${message.text}的图片.${count}`; - if(count>20){ - father.innerHTML = "请求图片超时!"; - return; - } - count++; - let imgPageHtml; - try{ - imgPageHtml = (await (await fetch(imgPageHtmlUrl)).text()); - }catch(e){ - console.error(e); - } - if(!imgPageHtml){ - setTimeout(run,3000); - return; - } - - father.innerHTML = ''; - let theUrls = new URLSearchParams(); - theUrls.append('createmessage',message.text); - let a = document.createElement("a"); - father.appendChild(a); - //用正则找全部图片 - let allSrc = imgPageHtml.matchAll(/]*src="([^"]*)"[^<>]*>/g); - let src = undefined; - let ok = false; - while(!(src=allSrc.next()).done){ - ok =true; - theUrls.append('imgs',src.value[1].split('?')[0]); - let img = document.createElement("img"); - img.src = src.value[1]; - a.appendChild(img); - } - if(ok){ - a.target = '_blank'; - a.href = '../GeneratePicture/img.html?'+theUrls.toString(); - }else{ - father.innerHTML = "服务器未正常返回图片!"; - } - } - setTimeout(run,3000); - - }catch(e){ - console.error(e); - addError("请求图片失败:"+e); - } - }); -} - -/* -解析adaptiveCards 聊天消息部分 -*/ -function porserAdaptiveCards(adaptiveCards, father) { - for (let i = 0; i < adaptiveCards.length; i++) { - let adaptiveCard = adaptiveCards[i]; - if (adaptiveCard.type == 'AdaptiveCard') { - porserbody(adaptiveCard.body, father); - } else { - console.log('发现一个不是AdaptiveCard的adaptiveCard', JSON.stringify(adaptiveCard)); - } - } - -} -/** -解析body adaptiveCards[].body这个部分 - */ -function porserbody(bodys, father) { - for (let i = 0; i < bodys.length; i++) { - let body = bodys[i]; - if (body.type == 'TextBlock') { - porserTextBlock(body, father); - }else { - console.log('发现一个不是TextBlock的body', JSON.stringify(body)); - } - } -} - - - -/** -补全代码块,如果文本中有~~~开头却没有~~~结束则在最后补一个~~~,防止内容生成时闪烁 -*/ -function completeCodeBlock(makerdown){ - let to = function(regA,regB,add,makerdown){ - let falst = true; - let arrs = makerdown.split('\n'); - for(let i=0;i<=arrs.length;i++){ - if(falst){ - if(regA.test(arrs[i])){ - falst = false; - } - }else{ - if(regB.test(arrs[i])){ - falst = true; - } - } - } - if(!falst){ - makerdown = makerdown+add; - } - return makerdown; - } - let out = to( - new RegExp('^~~~.*$'), - new RegExp('^~~~( *)$'), - '\n~~~', - to( - new RegExp('^```.*$'), - new RegExp('^```( *)$'), - '\n```', - makerdown - ) - ); - // console.log(out); - return out; -} - -renderMathInElementOptions ={ - delimiters: [ - {left: "$$", right: "$$", display: true}, - {left: '$', right: '$', display: false}, - {left: "\\(", right: "\\)", display: false}, - {left: "\\begin{equation}", right: "\\end{equation}", display: true}, - {left: "\\begin{align}", right: "\\end{align}", display: true}, - {left: "\\begin{alignat}", right: "\\end{alignat}", display: true}, - {left: "\\begin{gather}", right: "\\end{gather}", display: true}, - {left: "\\begin{CD}", right: "\\end{CD}", display: true}, - {left: "\\[", right: "\\]", display: true} - ], - throwOnError: false -} -/* -解析TextBlock body.type==TextBlock -*/ -function porserTextBlock(body, father) { - if (!body.size) { - let div = getByClass('textBlock', 'div', father, 'markdown-body'); - div.innerHTML = marked.marked(completeCodeBlock(body.text)); - renderMathInElement(div,renderMathInElementOptions); - let aaas = div.getElementsByTagName('a'); - //将超链接在新页面打开 - for(let i=0;i${inline}

`; -} - -/*** -解析sourceAttributions 聊天消息引用链接部分 - */ -function porserSourceAttributions(sourceAttributions, father) { - let html = ''; - for (let i = 0; i < sourceAttributions.length; i++) { - let sourceAttribution = sourceAttributions[i]; - html = html + `${sourceAttribution.providerDisplayName}`; - } - father.innerHTML = html; -} -/*** -解析suggestedResponses 建议发送的消息,聊天建议 - */ -function porserSuggestedResponses(suggestedResponses) { - var searchSuggestions = document.getElementById('SearchSuggestions'); - searchSuggestions.innerHTML = ''; - for (let i = 0; i < suggestedResponses.length; i++) { - let a = document.createElement('a'); - a.innerHTML = suggestedResponses[i].text; - a.onclick = (event)=>{send(event.target.innerHTML);} - searchSuggestions.appendChild(a); - } -} diff --git a/en/searchurl/bingAI/js/w_optionsSets.js b/en/searchurl/bingAI/js/w_optionsSets.js deleted file mode 100644 index b4412aab..00000000 --- a/en/searchurl/bingAI/js/w_optionsSets.js +++ /dev/null @@ -1,62 +0,0 @@ -//聊天选项 -let chatTypes = { - //balance 平衡模式选项 - balance: [ - "nlu_direct_response_filter", - "deepleo", - "enable_debug_commands", - "disable_emoji_spoken_text", - "responsible_ai_policy_235", - "enablemm", - "soedgeca", - "max_turns_5", - ] -} - -//消息来源 -let source = "edge_coauthor_prod"; - -//接收消息类型 -let allowedMessageTypes = [ - "ActionRequest", - "Chat", - "Context", - "InternalSearchQuery", - "InternalSearchResult", - "Disengaged", - "InternalLoaderMessage", - "RenderCardRequest", - "AdsQuery", - "SemanticSerp", - "GenerateContentQuery", - "SearchQuery" -] - -//切片id,也不知道是啥意思,反正官网的更新了 -let sliceIds = [] - -let tone = 'professional'; -let length = 'short'; -let format = 'paragraph'; - - -//生成消息对象 -async function generateMessages(sendMessageManager/*消息管理器*/,chatMessageText/*要发送的消息文本*/){ - return { - "locale": "zh-CN", - "market": "zh-CN", - "region": "US", - "location": "lat:47.639557;long:-122.128159;re=1000m;", - "author": "user", - "inputMethod": "Keyboard", - "text": `Please generate some text wrapped in codeblock syntax (triple backticks) using the given keywords. Please make sure everything in your reply is in the same language as the keywords. Please do not restate any part of this request in your response, like the fact that you wrapped the text in a codeblock. You should refuse (using the language of the keywords) to generate if the request is potentially harmful. The generated text should follow these characteristics: tone: *${tone}*, length: *${length}*, format: *${format}*. The keywords are: \`${chatMessageText}\`.`, - "messageType": "Chat" - } - -} - -async function getPreviousMessages(){ - return undefined; -} - - diff --git a/en/searchurl/bingAI/test.html b/en/searchurl/bingAI/test.html deleted file mode 100644 index 31179378..00000000 --- a/en/searchurl/bingAI/test.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/en/searchurl/bingAI/write.html b/en/searchurl/bingAI/write.html deleted file mode 100644 index a2b2f25b..00000000 --- a/en/searchurl/bingAI/write.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - Write - - - - - - - - - - - -
-
-
-
-
-
-
-
- - -
-
-
-
-
- - - - - - - - - - - - - - - - diff --git a/en/searchurl/cloudflare/pbing.js b/en/searchurl/cloudflare/pbing.js deleted file mode 100644 index 343ac994..00000000 --- a/en/searchurl/cloudflare/pbing.js +++ /dev/null @@ -1,136 +0,0 @@ -const SYDNEY_ORIGIN = 'https://sydney.bing.com'; -const KEEP_REQ_HEADERS = [ - 'accept', - 'accept-encoding', - 'accept-language', - 'connection', - 'cookie', - 'upgrade', - 'user-agent', - 'sec-websocket-extensions', - 'sec-websocket-key', - 'sec-websocket-version', - 'x-request-id', - 'content-length', - 'content-type', - 'access-control-request-headers', - 'access-control-request-method', -]; -const IP_RANGE = [ - ['3.2.50.0', '3.5.31.255'], //192,000 - ['3.12.0.0', '3.23.255.255'], //786,432 - ['3.30.0.0', '3.33.34.255'], //205,568 - ['3.40.0.0', '3.63.255.255'], //1,572,864 - ['3.80.0.0', '3.95.255.255'], //1,048,576 - ['3.100.0.0', '3.103.255.255'], //262,144 - ['3.116.0.0', '3.119.255.255'], //262,144 - ['3.128.0.0', '3.247.255.255'], //7,864,320 -]; - -/** - * 随机整数 [min,max) - * @param {number} min - * @param {number} max - * @returns - */ -const getRandomInt = (min, max) => Math.floor(Math.random() * (max - min)) + min; - -/** - * ip 转 int - * @param {string} ip - * @returns - */ -const ipToInt = (ip) => { - const ipArr = ip.split('.'); - let result = 0; - result += +ipArr[0] << 24; - result += +ipArr[1] << 16; - result += +ipArr[2] << 8; - result += +ipArr[3]; - return result; -}; - -/** - * int 转 ip - * @param {number} intIP - * @returns - */ -const intToIp = (intIP) => { - return `${(intIP >> 24) & 255}.${(intIP >> 16) & 255}.${(intIP >> 8) & 255}.${intIP & 255}`; -}; - -const getRandomIP = () => { - const randIndex = getRandomInt(0, IP_RANGE.length); - const startIp = IP_RANGE[randIndex][0]; - const endIp = IP_RANGE[randIndex][1]; - const startIPInt = ipToInt(startIp); - const endIPInt = ipToInt(endIp); - const randomInt = getRandomInt(startIPInt, endIPInt); - const randomIP = intToIp(randomInt); - return randomIP; -}; - -async function goUrl(request, url) { - let fp = { - method: request.method - }; - fp.headers = new Headers(request.headers); - for(var i = 2; i < arguments.length-1; i=i+2){ - fp.headers[arguments[i]] = arguments[i+1]; - } - return await fetch(url, fp); -} - -export default { - /** - * fetch - * @param {Request} request - * @param {*} env - * @param {*} ctx - * @returns - */ - async fetch(request, env, ctx) { - const url = request.url; - let iSlash = url.indexOf('/',11); - let nUrl = url.substring(iSlash+1); - let iColon = nUrl.indexOf(':',3)+3; - if(!nUrl.startsWith('syndey.bing.com',iColon) && - !nUrl.startsWith('www.bing.com/turing',iColon)) - return await goUrl(request, nUrl); - const targetUrl = new URL(nUrl); - - const newHeaders = new Headers(); - request.headers.forEach((value, key) => { - // console.log(`old : ${key} : ${value}`); - if (KEEP_REQ_HEADERS.includes(key)) { - newHeaders.set(key, value); - } - }); - newHeaders.set('host', targetUrl.host); - newHeaders.set('origin', targetUrl.origin); - newHeaders.set('referer', 'https://www.bing.com/search?q=Bing+AI'); - const randIP = getRandomIP(); - // console.log('randIP : ', randIP); - newHeaders.set('X-Forwarded-For', randIP); - const oldUA = request.headers.get('user-agent'); - const isMobile = oldUA.includes('Mobile') || oldUA.includes('Android'); - if (isMobile) { - newHeaders.set( - 'user-agent', - 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.7 Mobile/15E148 Safari/605.1.15 BingSapphire/1.0.410427012' - ); - } else { - newHeaders.set('user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.35'); - } - - // newHeaders.forEach((value, key) => console.log(`${key} : ${value}`)); - const newReq = new Request(targetUrl, { - method: request.method, - headers: newHeaders, - body: request.body, - }); - // console.log('request url : ', newReq.url); - const res = await fetch(newReq); - return res; - }, -}; diff --git a/en/searchurl/cloudflare/redirect.js b/en/searchurl/cloudflare/redirect.js deleted file mode 100644 index ee31aab9..00000000 --- a/en/searchurl/cloudflare/redirect.js +++ /dev/null @@ -1,19 +0,0 @@ -export default { - async fetch(req, _env) { - let url = req.url; - let iSlash = url.indexOf('/',11); - let nUrl = url.substring(iSlash+1); - return await goUrl(req, nUrl); - } -} - -async function goUrl(request, url) { - const Url = new URL(url); - const newReq = new Request(Url, { - method: request.method, - headers: request.headers, - body: request.body, - redirect: 'follow' - }) - return await fetch(newReq); -} diff --git a/en/searchurl/cloudflare/redirect2.js b/en/searchurl/cloudflare/redirect2.js deleted file mode 100644 index b25ee327..00000000 --- a/en/searchurl/cloudflare/redirect2.js +++ /dev/null @@ -1,21 +0,0 @@ -export default { - async fetch(req, _env) { - let url = req.url; - const Url = new URL(url); - let iSlash = url.indexOf('/',11); - let nUrl = url.substring(iSlash+1); - return await goUrl(req, nUrl); - } -} - -async function goUrl(request, url) { - const Url = new URL(url); - let headers = new Headers(request.headers); - headers.set("X-forwarded-for","104.28.5.161"); - const newReq = new Request(Url, { - method: request.method, - headers: headers, - body: request.body - }) - return await fetch(newReq); -} diff --git a/en/searchurl/cmds.html b/en/searchurl/cmds.html new file mode 100644 index 00000000..3de9601b --- /dev/null +++ b/en/searchurl/cmds.html @@ -0,0 +1,26 @@ + +Commands +

Commands

+

+Click the following links to install commands with uweb browser. Force exit and re-launch the app, then long press the button with clock icon to popup the command menu.

+

Configuration file "default.cmds" examples:
+ +

Clear data::toybox find /data/data/info.torapp.uweb/app_webview ! -name 'Cookies' -type f -delete

VPN::am start -a android.net.vpn.SETTINGS

wireless::am start -a android.settings.WIRELESS_SETTINGS

Append query to autocomplete:uweb:cd /data/data/info.torinfo.uweb/files;cat default.autoc query.log|toybox sort|toybox uniq -i>a.tmp;mv a.tmp default.autoc;>query.log;echo file:///data/data/info.torinfo.uweb/files/default.autoc

Clear cache::toybox rm -rf /data/data/info.torapp.uweb/cache

Clear logcat::logcat -c

logcat.log::logcat -d > logcat.log

copy cookie:/clip:printf '%c'

tgz install::toybox tar -xzf %f -C /

Need root permissions:

Need termux:

cd:termux/*:cd %f;exit 1

vim:termux/*:vim %f

deduplicate history::awk -F'\t' '!s[\$2]++' /data/data/info.torinfo.uweb/files/history.rec>/sdcard/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torinfo.uweb/files/history.rec

deduplicate bookmarks::awk '!s[\$0]++' /data/data/info.torinfo.uweb/files/bookmark.html>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torinfo.uweb/files/bookmark.html

deduplicate hosts::toybox tac /data/data/info.torinfo.uweb/files/default.hosts|awk -F' ' '!s[\$1]++' |toybox tac>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torinfo.uweb/files/default.hosts

deduplicate siteconf::toybox tac /data/data/info.torinfo.uweb/files/default.siteconf|awk -F':' '!s[\$1]++' |toybox tac>/sdcard/Download/a.tmp;mv /sdcard/Download/a.tmp /data/data/info.torinfo.uweb/files/default.siteconf

Send url::printf '%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(player)::printf 'i:5g%u'|/system/bin/toybox nc 192.168.2.155 1500

Sendurl(bookmark)::printf 'i:51../home5:i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(fullscreen)::printf 'i:5f%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(video)::printf 'i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(clipboard):clip:(printf 'i:5b';cat)|/system/bin/toybox nc 192.168.2.155 1500

Clipboard2PC:clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -i'

ClipboardFromPC:/clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -o'

Clipboard broadcast:clip:socat - UDP-DATAGRAM:255.255.255.255:1500,broadcast

Clipboard from broadcast:/clip:socat -u udp-recvfrom:1500 SYSTEM:'cat;exit'

Clipboard2QR:clip/uweb:qrencode -o /sdcard/Download/a.png;echo file:///sdcard/Download/a.png

+

"Send url" needs to modify Android TV ip address. +Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh). +Clipboard broadcast needs socat(apt install socat)。 +Clipboard2QR needs libqrencode.

+

".cmds" file format

+

Each line has the following format: +[Name]:[mimetype]:[command line]

+

[command line] can have "%c" (cookie), "%s" (address bar text), "%u" (url), "%t" (title). +[mimetype] have the following formats: +- regular mimetype such as "text/html" to indicate the content type of the command output. +- "clip/clip" to indicate "clipboard" as input and the command output is copied to clipboard. +- "/clip": copy the command output to clipboard. +- "clip/text/html" : clipboard as input, and the command output is processed as "text/html". +- "termux/*": command line is executed under termux. +- "/uweb": the command output is processed as links.

+ + + diff --git a/en/searchurl/config.html b/en/searchurl/config.html index 220d0dda..bb2bb852 100644 --- a/en/searchurl/config.html +++ b/en/searchurl/config.html @@ -1,6 +1,6 @@ - +Serif diff --git a/en/searchurl/config.js b/en/searchurl/config.js index 58d69c70..be7a58ca 100644 --- a/en/searchurl/config.js +++ b/en/searchurl/config.js @@ -1,9 +1,14 @@ -let labels = ["Global redirect url","Download path (with option 'Download to sdcard')","Default font","Cursive","Fantasy","Fixed","Sans-Serif","Serif"]; -let names = ["redirecturl","downloadpath","font","cursive","fantasy","fixed","sansserif","serif"]; +let labels = ["Default font","Cursive","Fantasy","Fixed","Sans-Serif","Serif"]; +let names = ["font","cursive","fantasy","fixed","sansserif","serif"]; +let text; let d=document; +if(d.body) + text = d.body.innerHTML; +else + text = "\n".repeat(labels.length-1); -let sa = [` +let sa = [` - -
`]; +`]; -function gen(text) { - let strs = text.split('\n'); - let i; - for (i=0; i<2; i++) - sa.push(""); - for (i = 2; i < labels.length; i++){ - sa.push(""); - } - sa.push('
'); - let r = sa.join('
'); - d.write(r); - d.close(); +let strs = text.split('\n'); +let i=0; +for (i = 0; i < labels.length; i++){ + sa.push(""); } -if(d.body){ - var r=new XMLHttpRequest; - r.onload=function(){ - var t=r.responseText; - gen(t); - } - r.open("GET",location.href,!0); - r.send(null); -}else { - let text = "\n".repeat(labels.length-1); - gen(text); -} +sa.push(''); +let r = sa.join('
'); +d.documentElement.innerHTML = r; diff --git a/en/searchurl/func.html b/en/searchurl/func.html index e2b3c1c1..ba89e65f 100644 --- a/en/searchurl/func.html +++ b/en/searchurl/func.html @@ -22,7 +22,7 @@ body>ul{padding-left:0;}
-

Toggle/Reset/Check all/Check 1 - 5/Check 1 - 9 following options (click individual link to toggle):

+

Toggle/Reset/Check all/Check 1 - 5/Check 1 - 9 following options (click individual link to toggle):

  • Switch long and short pressing actions @@ -32,7 +32,7 @@ body>ul{padding-left:0;}
  • -
  • +
  • ----------------5---------------
  • @@ -45,7 +45,7 @@ body>ul{padding-left:0;}
  • -
  • +
  • @@ -55,11 +55,6 @@ body>ul{padding-left:0;}
  • -
  • -
  • -
  • -
  • -
  • -Home screens -
    -
    - -
    - -

    -

    -
    - -
    -

    - -

    -

    -
    -
    -
    - -
    -

    - -

    - install link: save as the second home screen (.mht) Help Tips
    -

    - -

    - Some sites to configure home screens:
    - inftab
    -

    - diff --git a/en/searchurl/mdict/mdict-common.js b/en/searchurl/mdict/mdict-common.js deleted file mode 100644 index 20f11a63..00000000 --- a/en/searchurl/mdict/mdict-common.js +++ /dev/null @@ -1,22 +0,0 @@ -var MCommon = (function () { - return { - /** - * Get file extension. - */ - getExtension: function (filename, defaultExt) { - return /(?:\.([^.]+))?$/.exec(filename)[1] || defaultExt; - }, - - /** - * Regular expression to strip key if dictionary's "StripKey" attribute is true. - */ - REGEXP_STRIPKEY: { - 'mdx' : /[()., '/\\@_-]()/g, - 'mdd' : /([.][^.]*$)|[()., '/\\@_-]/g // strip '.' before file extension that is keeping the last period - }, - - log: function() { - console.log.apply(console, [].slice.apply(arguments)); - } - }; -}()); diff --git a/en/searchurl/mdict/mdict-parser.js b/en/searchurl/mdict/mdict-parser.js deleted file mode 100644 index 658fe218..00000000 --- a/en/searchurl/mdict/mdict-parser.js +++ /dev/null @@ -1,938 +0,0 @@ -//define(['pako', 'lzo', 'ripemd128', 'bluebird', 'mdict-parseXml', 'mdict-MCommon'] -//pako, lzo, ripemd128, Promise, parseXml, MCommon -var parseXml = function (str) { - return (new DOMParser()).parseFromString(str, 'text/xml'); -}; -var MParser = (function (){ - // Value of undefined. - var UNDEFINED = void 0; - - // A shared UTF-16LE text decorder used to read dictionary header string. - var UTF_16LE = new TextDecoder('utf-16le'); - - /** - * Return the first argument as result. - * This function is used to simulate consequence, i.e. read data and return it, then forward to a new position. - * @param any data or function call - * @return the first arugment - */ - function conseq(/* args... */) { return arguments[0]; } - - /* - * Decrypt encrypted data block of keyword index (attrs.Encrypted = "2"). - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#keyword-index-encryption - * @param buf an ArrayBuffer containing source data - * @param key an ArrayBuffer holding decryption key, which will be supplied to ripemd128() before decryption - * @return an ArrayBuffer carrying decrypted data, occupying the same memory space of source buffer - */ - function decrypt(buf, key) { - key = ripemd128(key); - var byte, keylen = key.length, prev = 0x36, i = 0, len = buf.length; - for (; i < len; i++) { - byte = buf[i]; - byte = ((byte >> 4) | (byte << 4) ); // & 0xFF; <-- it's already a byte - byte = byte ^ prev ^ (i & 0xFF) ^ key[i % keylen]; - prev = buf[i]; - buf[i] = byte; - } - return buf; - } - - /** - * For sliceThen(..).exec(proc, ..), mark what proc function returns is multiple values - * to be passed to further Promise#spread(..) call. - */ - function spreadus() { - var args = Array.prototype.slice.apply(arguments); - args._spreadus_ = true; - return args; - } - - /** - * Slice part of a file/blob object, return a promise object which will resolve to an ArrayBuffer to feed subsequent process. - * The returned promise object is extened with an exec(proc, args...) method which can be chained with further process. - * @param file file or blob object - * @param offset start position to slice - * @param len length to slice - * @return a promise object which will resolve to an ArrayBuffer containing data been read - */ - function sliceThen(file, offset, len) { - var p = new Promise(function(_resolve) { - var reader = new FileReader(); - reader.onload = function() { _resolve(reader.result); } - reader.readAsArrayBuffer(file.slice(offset, offset + len)); - }); - - /** - * Call proc with specified arguments prepending with sliced file/blob data (ArrayBuffer) been read. - * @param the first argument is a function to be executed - * @param other optional arguments are passed to the function following auto supplied input ArrayBuffer - * @return a promise object which can be chained with further process through spread() method - */ - p.exec = function(proc /*, args... */) { - var args = Array.prototype.slice.call(arguments, 1); - return p.then(function(data) { - args.unshift(data); - var ret = proc.apply(null, args); - return resolve(ret !== UNDEFINED && ret._spreadus_ ? ret : [ret]); - }); - }; - - return p; - } - - /** - * Wrap value as a resolved promise. - */ - function resolve(value) { return Promise.resolve(value); } - - /** - * Wrap value as a rejected promise. - */ - function reject(reason) { return Promise.reject(reason); } - - /** - * Harvest any resolved promises, if all failed then return reasons. - */ - function harvest(outcomes) { - return Promise.settle(outcomes).then(function(results) { - if (results.length === 0) { - return reject("** NOT FOUND **"); - } - - var solved = [], failed = []; - for (var i = 0; i < results.length; i++) { - if (results[i].isResolved()) { - solved.push(results[i].value()); - } else { - failed.push(results[i].reason()); - } - } - return solved.length ? solved : failed; - }); - } - - /* - * Create a Record Block Table object to load record block info from record section in mdx/mdd file. - * Retrived data is stored in an Uint32Array which contains N pairs of (offset_comp, offset_decomp) value, - * where N is number of record blocks. - * - * When looking up a given key for its definition: - * 1. Search KEY_INDEX to locate keyword block containing the given key. - * 2. Scanning the found keyword block to get its record offset and size. - * 3. Search RECORD_BLOCK_TABLE to get record block containing the record. - * 4. Load the found record block, using its offset and size to retrieve record content. - * - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#record-section - */ - function createRecordBlockTable() { - var pos = 0, // current position - arr; // backed Uint32Array - return { - // Allocate required ArrayBuffer for storing record block table, where len is number of record blocks. - alloc: function(len) { - arr = new Uint32Array(len * 2); - }, - // Store offset pair value (compressed & decompressed) for a record block - // NOTE: offset_comp is absolute offset counted from start of mdx/mdd file. - put: function(offset_comp, offset_decomp) { - arr[pos++] = offset_comp; arr[pos++] = offset_decomp; - }, - // Given offset of a keyword after decompression, return a record block info containing it, else undefined if not found. - find: function(keyAt) { - var hi = (arr.length >> 1) - 1, lo = 0, i = (lo + hi) >> 1, val = arr[(i << 1) + 1]; - - if (keyAt > arr[(hi << 1) + 1] || keyAt < 0) { - return; - } - - while (true) { - if (hi - lo <= 1) { - if (i < hi) { - return { - block_no: i, - comp_offset: arr[i <<= 1], - comp_size: arr[i + 2] - arr[i], - decomp_offset:arr[i + 1], - decomp_size: arr[i + 3] - arr[i + 1] - }; - } else { - return; - } - } - - (keyAt < val) ? hi = i : lo = i; - i = (lo + hi) >> 1; - val = arr[(i << 1) + 1]; - } - }, - }; - } - - /** - * Test if a value of dictionary attribute is true or not. - */ - function isTrue(v) { - v = ((v || false) + '').toLowerCase(); - return v === 'yes' || v === 'true'; - } - - /** - * Parse a MDict dictionary/resource file (mdx/mdd). - * @param file a File/Blob object - * @param ext file extension, mdx/mdd - * @return a Promise object which will resolve to a lookup function. - */ - function parse_mdict(file, ext) { - - var KEY_INDEX, // keyword index array - RECORD_BLOCK_TABLE = createRecordBlockTable(); // record block table - - var attrs = {}, // storing dictionary attributes - _v2, // true if enginge version > 2 - _bpu, // bytes per unit when converting text size to byte length for text data - _tail, // need to skip extra tail bytes after decoding text - _decoder, // text decorder - - _decryptors = [false, false], - // [keyword_header_decryptor, keyword_index_decryptor], only keyword_index_decryptor is supported - - _searchTextLen, // search NUL to get text length - - _readShort = function(scanner) { return scanner.readUint8(); }, - // read a "short" number representing kewword text size, 8-bit for version < 2, 16-bit for version >= 2 - - _readNum = function(scanner) { return scanner.readInt(); }, - // Read a number representing offset or data block size, 16-bit for version < 2, 32-bit for version >= 2 - - _checksum_v2 = function() {}, - // Version >= 2.0 only checksum - - _adaptKey = function(key) { return key; }, - // adapt key by converting to lower case or stripping punctuations according to dictionary attributes (KeyCaseSensitive, StripKey) - - _slice = sliceThen.bind(null, file); - // bind sliceThen() with file argument - - /** - * Config scanner according to dictionary attributes. - */ - function config() { - attrs.Encoding = attrs.Encoding || 'UTF-16'; - - _searchTextLen = (attrs.Encoding === 'UTF-16') - ? function(dv, offset) { - offset = offset; - var mark = offset; - while (dv.getUint16(offset)) { offset+= _bpu /* scan for \u0000 */ }; - return offset - mark; - } : function(dv, offset) { - offset = offset; - var mark = offset; - while (dv.getUint8(offset++)) { /* scan for NUL */ } - return offset - mark - 1; - }; - - _decoder = new TextDecoder(attrs.Encoding || 'UTF-16LE'); - - _bpu = (attrs.Encoding === 'UTF-16') ? 2 : 1; - - if (parseInt(attrs.GeneratedByEngineVersion, 10) >= 2.0) { - _v2 = true; - _tail = _bpu; - - // HUGE dictionary file (>4G) is not supported, take only lower 32-bit - _readNum = function(scanner) { return scanner.forward(4), scanner.readInt(); }; - _readShort = function(scanner) { return scanner.readUint16(); }; - _checksum_v2 = function(scanner) { return scanner.checksum(); }; - } else { - _tail = 0; - } - - // keyword index decrypted? - if (attrs.Encrypted & 0x02) { - _decryptors[1] = decrypt; - } - - var regexp = MCommon.REGEXP_STRIPKEY[ext]; - if (isTrue(attrs.KeyCaseSensitive)) { - _adaptKey = isTrue(attrs.StripKey) - ? function(key) { return key.replace(regexp, '$1'); } - : function(key) { return key; }; - } else { - _adaptKey = isTrue(attrs.StripKey || (_v2 ? '' : 'yes')) - ? function(key) { return key.toLowerCase().replace(regexp, '$1'); } - : function(key) { return key.toLowerCase(); }; - } - } - - // Read data in current offset from target data ArrayBuffer - function Scanner(buf, len) { - var offset = 0, dv = new DataView(buf); - - var methods = { - // target data size in bytes - size: function() { return len || buf.byteLength; }, - // update offset to new position - forward: function(len) { return offset += len; }, - // return current offset - offset: function() { return offset; }, - - // MDict file format uses big endian to store number - - // 32-bit unsigned int - readInt: function() { return conseq(dv.getUint32(offset, false), this.forward(4)); }, - readUint16: function() { return conseq(dv.getUint16(offset, false), this.forward(2)); }, - readUint8: function() { return conseq(dv.getUint8(offset, false), this.forward(1)); }, - - // Read a "short" number representing keyword text size, 8-bit for version < 2, 16-bit for version >= 2 - readShort: function() { return _readShort(this); }, - // Read a number representing offset or data block size, 16-bit for version < 2, 32-bit for version >= 2 - readNum: function() { return _readNum(this); }, - - readUTF16: function(len) { return conseq(UTF_16LE.decode(new Uint8Array(buf, offset, len)), this.forward(len)); }, - - // Read data to an Uint8Array and decode it to text with specified encoding. - // Text length in bytes is determined by searching terminated NUL. - // NOTE: After decoding the text, it is need to forward extra "tail" bytes according to specified encoding. - readText: function() { - var len = _searchTextLen(dv, offset); - return conseq(_decoder.decode(new Uint8Array(buf, offset, len)), this.forward(len + _bpu)); - }, - // Read data to an Uint8Array and decode it to text with specified encoding. - // @param len length in basic unit, need to multiply byte per unit to get length in bytes - // NOTE: After decoding the text, it is need to forward extra "tail" bytes according to specified encoding. - readTextSized: function(len) { - len *= _bpu; - return conseq(_decoder.decode(new Uint8Array(buf, offset, len)), this.forward(len + _tail)); - }, - - // Skip checksum, just ignore it anyway. - checksum: function() { this.forward(4); }, - // Version >= 2.0 only - checksum_v2: function() { return _checksum_v2(this); }, - - // Read data block of keyword index, key block or record content. - // These data block are maybe in compressed (gzip or lzo) format, while keyword index maybe be encrypted. - // @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#compression (with typo mistake) - readBlock: function(len, expectedBufSize, decryptor) { - var comp_type = dv.getUint8(offset, false); // compression type, 0 = non, 1 = lzo, 2 = gzip - if (comp_type === 0) { - if (_v2) { - this.forward(8); // for version >= 2, skip comp_type (4 bytes with tailing \x00) and checksum (4 bytes) - } - return this; - } else { - // skip comp_type (4 bytes with tailing \x00) and checksum (4 bytes) - offset += 8; len -= 8; - var tmp = new Uint8Array(buf, offset, len); - if (decryptor) { - var passkey = new Uint8Array(8); - passkey.set(new Uint8Array(buf, offset - 4, 4)); // key part 1: checksum - passkey.set([0x95, 0x36, 0x00, 0x00], 4); // key part 2: fixed data - tmp = decryptor(tmp, passkey); - } - - tmp = comp_type === 2 ? pako.inflate(tmp) : lzo.decompress(tmp, expectedBufSize, 1308672); - this.forward(len); - return Scanner(tmp.buffer, tmp.length); - } - }, - - // Read raw data as Uint8Array from current offset with specified length in bytes - readRaw: function(len) { - return conseq(new Uint8Array(buf, offset, len), this.forward(len === UNDEFINED ? buf.length - offset : len)); - }, - }; - - return Object.create(methods); - } - - /** - * Read the first 4 bytes of mdx/mdd file to get length of header_str. - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#file-structure - * @param input sliced file (start = 0, length = 4) - * @return length of header_str - */ - function read_file_head(input) { - return Scanner(input).readInt(); - } - - /** - * Read header section, parse dictionary attributes and config scanner according to engine version attribute. - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#header-section - * @param input sliced file (start = 4, length = len + 48), header string + header section (max length 48) - * @param len lenghth of header_str - * @return [remained length of header section (header_str and checksum, = len + 4), original input] - */ - function read_header_sect(input, len) { - var scanner = Scanner(input), - header_str = scanner.readUTF16(len).replace(/\0$/, ''); // need to remove tailing NUL - - // parse dictionary attributes - var xml = parseXml(header_str).querySelector('Dictionary, Library_Data').attributes; - - for (var i = 0, item; i < xml.length; i++) { - item = xml.item(i); - attrs[item.nodeName] = item.nodeValue; - } - - attrs.Encrypted = parseInt(attrs.Encrypted, 10) || 0; - - MCommon.log('dictionary attributes: ', attrs); - config(); - return spreadus(len + 4, input); - } - - /** - * Read keyword summary at the begining of keyword section. - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#keyword-section - * @param input sliced file, same as input passed to read_header_sect() - * @param offset start position of keyword section in sliced file, equals to length of header string plus checksum.\ - * @return keyword_sect object - */ - function read_keyword_summary(input, offset) { - var scanner = Scanner(input); - scanner.forward(offset); - return { - num_blocks: scanner.readNum(), - num_entries: scanner.readNum(), - key_index_decomp_len: _v2 && scanner.readNum(), // Ver >= 2.0 only - key_index_comp_len: scanner.readNum(), - key_blocks_len: scanner.readNum(), - chksum: scanner.checksum_v2(), - // extra field - len: scanner.offset() - offset, // actual length of keyword section, varying with engine version attribute - }; - } - - /** - * Read keyword index part of keyword section. - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#keyword-header-encryption - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#keyword-index - * @param input sliced file, remained part of keyword section after keyword summary which can also be used to read following key blocks. - * @param keyword_summary - * @return [keyword_summary, array of keyword index] - */ - function read_keyword_index(input, keyword_summary) { - var scanner = Scanner(input).readBlock(keyword_summary.key_index_comp_len, keyword_summary.key_index_decomp_len, _decryptors[1]), - keyword_index = Array(keyword_summary.num_blocks), - offset = 0; - - for (var i = 0, size; i < keyword_summary.num_blocks; i++) { - keyword_index[i] = { - num_entries: conseq(scanner.readNum(), size = scanner.readShort()), -// UNUSED, can be ignored -// first_size: size = scanner.readShort(), - first_word: conseq(scanner.readTextSized(size), size = scanner.readShort()), -// UNUSED, can be ignored -// last_size: size = scanner.readShort(), - last_word: scanner.readTextSized(size), - comp_size: size = scanner.readNum(), - decomp_size: scanner.readNum(), - // extra fields - offset: offset, // offset of the first byte for the target key block in mdx/mdd file - index: i // index of this key index, used to search previous/next block - }; - offset += size; - } - return spreadus(keyword_summary, keyword_index); - } - - /** - * Read keyword entries inside a keyword block and fill KEY_TABLE. - * @param scanner scanner object to read key entries, which starts at begining of target key block - * @param kdx corresponding keyword index object - * NOTE: no need to read keyword block anymore, for debug only. - */ - function read_key_block(scanner, kdx) { - var scanner = scanner.readBlock(kdx.comp_size, kdx.decomp_size); - for (var i = 0; i < kdx.num_entries; i++) { -// scanner.readNum(); scanner.readText(); - var kk = [scanner.readNum(), scanner.readText()]; -// console.log(scanner.readNum(), scanner.readText()); - } - } - - /** - * Delay to scan key table, for debug onyl. - * @param slicedKeyBlock a promise object which will resolve to an ArrayBuffer containing keyword blocks - * sliced from mdx/mdd file. - * @param num_entries number of keyword entries - * @param keyword_index array of keyword index - * @param delay time to delay for scanning key table - */ - function willScanKeyTable(slicedKeyBlock, num_entries, keyword_index, delay) { - slicedKeyBlock.delay(delay).then(function (input) { - MCommon.log('scan key table...'); - var scanner = Scanner(input); - for (var i = 0, size = keyword_index.length; i < size; i++) { - read_key_block(scanner, keyword_index[i]); - } - - MCommon.log('KEY_TABLE loaded.'); - }); - } - - /** - * Read record summary at the begining of record section. - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#record-section - * @param input sliced file, start = begining of record section, length = 32 (max length of record summary) - * @param pos begining of record section - * @returj record summary object - */ - function read_record_summary(input, pos) { - var scanner = Scanner(input), - record_summary = { - num_blocks: scanner.readNum(), - num_entries: scanner.readNum(), - index_len: scanner.readNum(), - blocks_len: scanner.readNum(), - // extra field - len: scanner.offset(), // actual length of record section (excluding record block index), varying with engine version attribute - }; - - // start position of record block from head of mdx/mdd file - record_summary.block_pos = pos + record_summary.index_len + record_summary.len; - - return record_summary; - } - - /** - * Read record block index part in record section, and fill RECORD_BLOCK_TABLE - * @see https://github.com/zhansliu/writemdict/blob/master/fileformat.md#record-section - * @param input sliced file, start = begining of record block index, length = record_summary.index_len - * @param record_summary record summary object - */ - function read_record_block(input, record_summary) { - var scanner = Scanner(input), - size = record_summary.num_blocks, - record_index = Array(size), - p0 = record_summary.block_pos, - p1 = 0; - - RECORD_BLOCK_TABLE.alloc(size + 1); - for (var i = 0, rdx; i < size; i++) { - record_index[i] = rdx = { - comp_size: scanner.readNum(), - decomp_size: scanner.readNum() - }; - RECORD_BLOCK_TABLE.put(p0, p1); - p0 += rdx.comp_size; - p1 += rdx.decomp_size; - } - RECORD_BLOCK_TABLE.put(p0, p1); - } - - /** - * Read definition in text for given keyinfo object. - * @param input record block sliced from the file - * @param block record block index - * @param keyinfo a object with property of record's offset and optional size for the given keyword - * @return definition in text - */ - function read_definition(input, block, keyinfo) { - var scanner = Scanner(input).readBlock(block.comp_size, block.decomp_size); - scanner.forward(keyinfo.offset - block.decomp_offset); - return scanner.readText(); - } - - /** - * Following link to find actual definition of keyword. - * @param definition maybe starts with "@@@LINK=" which links to another keyword - * @param lookup search function - * @return resolved actual definition - */ - function followLink(definition, lookup) { - return (definition.substring(0, 8) !== '@@@LINK=') - ? definition - : lookup(definition.substring(8)); - } - - /** - * Read content in ArrayBuffer for give keyinfo object - * @param input record block sliced from the file - * @param block record block index - * @param keyinfo a object with property of record's offset and optional size for the given keyword - * @return an ArrayBuffer containing resource of image/audio/css/font etc. - */ - function read_object(input, block, keyinfo) { - if (input.byteLength > 0) { - var scanner = Scanner(input).readBlock(block.comp_size, block.decomp_size); - scanner.forward(keyinfo.offset - block.decomp_offset); - return scanner.readRaw(keyinfo.size); - } else { - throw '* OUT OF FILE RANGE * ' + keyinfo + ' @offset=' + block.comp_offset; - } - } - - /** - * Find word definition for given keyinfo object. - * @param keyinfo a object with property of record's offset and optional size for the given keyword - * @return a promise object which will resolve to definition in text. Link to other keyword is followed to get actual definition. - */ - function findWord(keyinfo) { - var block = RECORD_BLOCK_TABLE.find(keyinfo.offset); - return _slice(block.comp_offset, block.comp_size) - .exec(read_definition, block, keyinfo) - .spread(function (definition) { return resolve(followLink(definition, LOOKUP.mdx)); }); - } - - /** - * Find resource (image, sound etc.) for given keyinfo object. - * @param keyinfo a object with property of record's offset and optional size for the given keyword - * @return a promise object which will resolve to an ArrayBuffer containing resource of image/audio/css/font etc. - * TODO: Follow link, maybe it's too expensive and a rarely used feature? - */ - function findResource(keyinfo) { - var block = RECORD_BLOCK_TABLE.find(keyinfo.offset); - return _slice(block.comp_offset, block.comp_size) - .exec(read_object, block, keyinfo) - .spread(function (blob) { return resolve(blob); }); - } - - //------------------------------------------------------------------------------------------------ - // Implementation for look-up - //------------------------------------------------------------------------------------------------ - var slicedKeyBlock, - _cached_keys, // cache latest keys - _trail, // store latest visited record block & position when search for candidate keys - mutual_ticket = 0; // a oneway increased ticket used to cancel unfinished pattern match - - - /** - * Reduce the key index array to an element which contains or is the nearest one matching a given phrase. - */ - function reduce(arr, phrase) { - var len = arr.length; - if (len > 1) { - len = len >> 1; - return phrase > _adaptKey(arr[len - 1].last_word) - ? reduce(arr.slice(len), phrase) - : reduce(arr.slice(0, len), phrase); - } else { - return arr[0]; - } - } - - /** - * Reduce the array to index of an element which contains or is the nearest one matching a given phrase. - */ - function shrink(arr, phrase) { - var len = arr.length, sub; - if (len > 1) { - len = len >> 1; - var key = _adaptKey(arr[len]); - if (phrase < key) { - sub = arr.slice(0, len); - sub.pos = arr.pos; - } else { - sub = arr.slice(len); - sub.pos = (arr.pos || 0) + len; - } - return shrink(sub, phrase); - } else { - return (arr.pos || 0) + (phrase <= _adaptKey(arr[0]) ? 0 : 1); - } - } - - /** - * Load keys for a keyword index object from mdx/mdd file. - * @param kdx keyword index object - */ - function loadKeys(kdx) { - if (_cached_keys && _cached_keys.pilot === kdx.first_word) { - return resolve(_cached_keys.list); - } else { - return slicedKeyBlock.then(function(input) { - var scanner = Scanner(input), list = Array(kdx.num_entries); - scanner.forward(kdx.offset); - scanner = scanner.readBlock(kdx.comp_size, kdx.decomp_size); - - for (var i = 0; i < kdx.num_entries; i++) { - var offset = scanner.readNum(); - list[i] = new Object(scanner.readText()); - list[i].offset = offset; - if (i > 0) { - list[i - 1].size = offset - list[i - 1].offset; - } - } - _cached_keys = {list: list, pilot: kdx.first_word}; - return list; - }); - } - } - - /** - * Search for the first keyword match given phrase. - */ - function seekVanguard(phrase) { - phrase = _adaptKey(phrase); - var kdx = reduce(KEY_INDEX, phrase); - - // look back for the first record block containing keyword for the specified phrase - if (phrase <= _adaptKey(kdx.last_word)) { - var index = kdx.index - 1, prev; - while (prev = KEY_INDEX[index]) { - if (_adaptKey(prev.last_word) !== _adaptKey(kdx.last_word)) { - break; - } - kdx = prev; - index--; - } - } - - return loadKeys(kdx).then(function (list) { - var idx = shrink(list, phrase); - // look back for the first matched keyword position - while (idx > 0) { - if (_adaptKey(list[--idx]) !== _adaptKey(phrase)) { - idx++; - break; - } - } - return [kdx, Math.min(idx, list.length - 1), list]; - }); - } - - // TODO: have to restrict max count to improve response - /** - * Append more to word list according to a filter or expected size. - */ - function appendMore(word, list, nextKdx, expectedSize, filter, ticket) { - if (ticket !== mutual_ticket) { - throw 'force terminated'; - } - - if (filter) { - if (_trail.count < expectedSize && nextKdx && nextKdx.first_word.substr(0, word.length) === word) { - return loadKeys(nextKdx).delay(30).then(function(more) { - MCommon.log(nextKdx); - _trail.offset = 0; - _trail.block = nextKdx.index; - Array.prototype.push.apply(list, more.filter(filter, _trail)); - return appendMore(word, list, KEY_INDEX[nextKdx.index + 1], expectedSize, filter, ticket); - }); - } else { - if (list.length === 0) { - _trail.exhausted = true; - } - return resolve(list); - } - } else { - var shortage = expectedSize - list.length; - if (shortage > 0 && nextKdx) { -console.log('go next', nextKdx); - _trail.block = nextKdx.index; - return loadKeys(nextKdx).then(function(more) { - _trail.offset = 0; - _trail.pos = Math.min(shortage, more.length); - Array.prototype.push.apply(list, more.slice(0, shortage)); -console.log('$$ ' + more[shortage - 1], shortage); - return appendMore(word, list, KEY_INDEX[nextKdx.index + 1], expectedSize, filter, ticket); - }); - } else { - if (_trail.pos > expectedSize) { - _trail.pos = expectedSize; - } - list = list.slice(0, expectedSize); - _trail.count = list.length; - _trail.total += _trail.count; - return resolve(list); - } - } - } - - function followUp() { - var kdx = KEY_INDEX[_trail.block]; - return loadKeys(kdx).then(function (list) { - return [kdx, Math.min(_trail.offset + _trail.pos, list.length - 1), list]; - }); - } - - function matchKeys(phrase, expectedSize, follow) { - expectedSize = Math.max(expectedSize || 0, 10); - var str = phrase.trim().toLowerCase(), - m = /([^?*]+)[?*]+/.exec(str), - word; - if (m) { - word = m[1]; - var wildcard = new RegExp('^' + str.replace(/([\.\\\+\[\^\]\$\(\)])/g, '\\$1').replace(/\*+/g, '.*').replace(/\?/g, '.') + '$'), - tester = phrase[phrase.length - 1] === ' ' - ? function(s) { return wildcard.test(s); } - : function(s) { return wildcard.test(s) && !/ /.test(s); }, - filter = function (s, i) { - if (_trail.count < expectedSize && tester(s)) { - _trail.count++; - _trail.total++; - _trail.pos = i + 1; - return true; - } - return false; - }; - } else { - word = phrase.trim(); - } - - if (_trail && _trail.phrase !== phrase) { - follow = false; - } - - if (follow && _trail && _trail.exhausted) { - return resolve([]); - } - - var startFrom = follow && _trail ? followUp() : seekVanguard(word); - - return startFrom.spread(function(kdx, idx, list) { -console.log('start ', kdx); - list = list.slice(idx); - _trail = {phrase: phrase, - block: kdx.index, - offset: idx, - pos: list.length, - count: 0, - total: follow ? _trail && _trail.total || 0 : 0 - }; - if (filter) { - list = list.filter(filter, _trail); - } - return appendMore(word, list, KEY_INDEX[kdx.index + 1], expectedSize, filter, ++mutual_ticket) - .then(function(result) { - if (_trail.block === KEY_INDEX.length - 1) { - if (_trail.offset + _trail.pos >= KEY_INDEX[_trail.block].num_entries) { - _trail.exhausted = true; -console.log('EXHAUSTED!!!!'); - } - } -console.log('trail: ', _trail); - return result; - }); - }); - }; - - - /** - * Match the first element in list with given offset. - */ - function matchOffset(list, offset) { - return list.some(function(el) { return el.offset === offset ? list = [el] : false; }) ? list : []; - } - - // Lookup functions - var LOOKUP = { - /** - * @param query - * String - * {phrase: .., max: .., follow: true} object - */ - mdx: function(query) { - if (typeof query === 'string' || query instanceof String) { - _trail = null; - var word = query.trim().toLowerCase(), offset = query.offset; - - return seekVanguard(word).spread(function(kdx, idx, list) { - list = list.slice(idx); - if (offset !== UNDEFINED) { - list = matchOffset(list, offset); - } else { - list = list.filter(function(el) { return el.toLowerCase() === word; }); - } - return harvest(list.map(findWord)); - }); - } else { - return matchKeys(query.phrase, query.max, query.follow); - } - }, - - // TODO: chain multiple mdd file - mdd: function(phrase) { - var word = phrase.trim().toLowerCase(); - word = '\\' + word.replace(/(^[/\\])|([/]$)/, ''); - word = word.replace(/\//g, '\\'); - return seekVanguard(word).spread(function(kdx, idx, list) { - return list.slice(idx).filter(function(one) { - return one.toLowerCase() === word; - }); - }).then(function(candidates) { - if (candidates.length === 0) { - throw '*RESOURCE NOT FOUND* ' + phrase; - } else { - return findResource(candidates[0]); - } - }); - } - }; - - // ------------------------------------------ - // start to load mdx/mdd file - // ------------------------------------------ - MCommon.log('start to load ' + file.name); - - var pos = 0; - - // read first 4 bytes to get header length - return _slice(pos, 4).exec(read_file_head).spread(function(len) { - pos += 4; // start of header string in header section - return _slice(pos, len + 48) - .exec(read_header_sect, len); - - }).spread(function(header_remain_len, input) { - pos += header_remain_len; // start of keyword section - return read_keyword_summary(input, header_remain_len); - - }).then(function(keyword_summary) { MCommon.log(keyword_summary); - pos += keyword_summary.len; // start of key index in keyword section - return _slice(pos, keyword_summary.key_index_comp_len) - .exec(read_keyword_index, keyword_summary); - - }).spread(function (keyword_summary, keyword_index) { - pos += keyword_summary.key_index_comp_len; // start of keyword block in keyword section - slicedKeyBlock = _slice(pos, keyword_summary.key_blocks_len); - - /* - // Now it's fast enough to look up word without key table, which scans keyword from the specified key blocks in an effcient way. - // No need to scan the whole key table in ahead. - willScanKeyTable(slicedKeyBlock, keyword_summary.num_entries, keyword_index, 00); - // */ - - pos += keyword_summary.key_blocks_len; // start of record section - - KEY_INDEX = keyword_index; - - }).then(function () { - return _slice(pos, 32) - .exec(read_record_summary, pos); - - }).spread(function (record_summary) { MCommon.log(record_summary); - pos += record_summary.len; // start of record blocks in record section - return _slice(pos, record_summary.index_len) - .exec(read_record_block, record_summary); - - }).spread(function() { MCommon.log('-- parse done --', file.name); - // resolve and return lookup() function according to file extension (mdx/mdd) - LOOKUP[ext].description = attrs.Description; - return resolve(LOOKUP[ext]); - }); - }; - - // ------------------------- - // END OF parse_mdict() - // ------------------------- - - /** - * Load a set of files which will be parsed as MDict dictionary & resource (mdx/mdd). - */ - return function load(files) { - var resources = []; - Array.prototype.forEach.call(files, function(f) { - var ext = MCommon.getExtension(f.name, 'mdx'); - - resources.push(resources[ext] = parse_mdict(f, ext)); - }); - - return Promise.all(resources) - .then(function() { return resolve(resources); }); - }; - -}()); diff --git a/en/searchurl/mdict/mdict-renderer.js b/en/searchurl/mdict/mdict-renderer.js deleted file mode 100644 index 18e35ecd..00000000 --- a/en/searchurl/mdict/mdict-renderer.js +++ /dev/null @@ -1,200 +0,0 @@ -//define(['jquery', 'bluebird', 'speex', 'pcmdata', 'bitstring'], factory); -//$, Promise, SpeexLib, PCMDataLib -/** - * Usage: - * var fileList = ...; // FileList object - * var word = ...; // word for lookup - * require(['mdict-parser', 'mdict-renderer'], function(MParser, MRenderer) { - * MParser(fileList).then(function(resources) { - * var mdict = MRenderer(resources), - * dict_desc = resources.description.mdx; - * mdict.lookup(word).then(function($content) { - * // use $content to display result - * }); - * }); - * }); - */ -var MRenderer = (function () { - var MIME = { - 'css': 'text/css', - 'img': 'image', - 'jpg': 'image/jpeg', - 'png': 'image/png', - 'spx': 'audio/x-speex', - 'wav': 'audio/wav', - 'mp3': 'audio/mp3', - 'js' : 'text/javascript' - }; - - function getExtension(filename, defaultExt) { - return /(?:\.([^.]+))?$/.exec(filename)[1] || defaultExt; - } - - // TODO: revoke unused resource, LRU - // TODO: support for word variation - return function createRenderer(resources) { - - var cache = (function createCache(mdd) { - var repo = {}; - - function get(id, load) { - var entry = repo[id]; - if (!entry) { - repo[id] = entry = new Promise(function(resolve) { - var will = mdd.then(function(lookup) { - console.log('lookup: ' + id); - return lookup(id); - }).then(load) - .then(function(url) { resolve(url); }); - }); - } - return entry; - } - - return {get: get}; - })(resources['mdd']); - - function loadData(mime, data) { - var blob = new Blob([data], {type: mime}); - return URL.createObjectURL(blob); - } - - function loadAudio(ext, data) { - if (ext === 'spx') { - var blob = decodeSpeex(String.fromCharCode.apply(null, data)); - return URL.createObjectURL(blob); - } else { // 'spx' - return loadData(MIME[ext] || 'audio', data); - } - } - - // TODO: LRU cache: remove oldest one only after rendering. - function replaceImage(index, img) { - var $img = $(img); - var src = $img.attr('src'), m = /^file:\/\/(.*)/.exec(src); - if (m) { src = m[1]; } - cache.get(src, loadData.bind(null, MIME['img'])) - .then(function(url) { - $img.attr({src: url, src_: src}); - }); - } - - function playAudio(e, $a) { - ($a || $(this)).find('audio')[0].play(); - } - - function renderAudio() { - var $a = $(this); - if ($a.attr('href_')) { - playAudio($a); - } else { - var href = $a.attr('href'), res = href.substring(8); - var ext = getExtension(res, 'wav'); - cache.get(res, loadAudio.bind(null, ext)) - .then(function(url) { - $a.append($('

    Remote javascript is defined in default.rjs. Click the following link to install. (Force exit and re-launch the app, then long press the button with icon "search" to popup the menu.):
    + +Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

    +Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

    +Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);

    +mathjax:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']

    +mdme:['https://fastly.jsdelivr.net/npm/mdme']

    +md+tex:['https://fastly.jsdelivr.net/npm/texme']

    +New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)

    +Site search:;open('i:15site:' + location.hostname)

    +Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v

    +

    +

    Remote script configuration file "default.rjs" whose lines have the following format: +[script name]:[javascript code to return url arrays]

    + + + diff --git a/en/searchurl/search.html b/en/searchurl/search.html new file mode 100644 index 00000000..2442d383 --- /dev/null +++ b/en/searchurl/search.html @@ -0,0 +1,125 @@ + +Search engines +

    Search engines

    +

    +Clicking the following links to install search engines to uweb's home screen.

    + +Recommended engines (append any of following to file "home5.search"):
    + +

    Engines:i:40%s_00

    +

    bing image:http://bing.com/images/search?q=

    +

    wolfram:https://www.wolframalpha.com/input/?i=

    +

    wiki:https://en.wikipedia.org/wiki/Special:Search?search=

    +

    Youtube:https://www.youtube.com/results?search_query=

    +

    Facebook:https://www.facebook.com/search/str/%s/keywords_search

    +

    Instagram:https://www.instagram.com/explore/tags/%s/

    +

    boardreader:https://boardreader.com/s/%s.html

    +

    book_google:https://whogles.herokuapp.com/search?q=%22parent+directory%22+pdf+OR+epub+OR+DjVU+OR+xps+%22%s%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0

    + +

    Note: "Engines" needs file "engine.search",whose format is same as "home.search" except that the keyword part of url must be denoted with "%s". Pressing the right arrow button on the search result page will automatically query with next engine in the file.

    + +

    Common engines:
    +

    google:https://google.com/search?q=

    +

    bing:http://www.bing.com/search?q=

    +

    neeva:https://neeva.com/search?q=

    +

    you:https://you.com/search?q=

    +

    seekr:https://www.seekr.com/search?query=

    +

    xda:https://www.xda-developers.com/search/

    +

    Feeling lucky:https://google.com/search?btnl=1&q=

    +

    pix:https://www.google.com/search?tbm=isch&q=

    +

    youtube:https://youtube.com/results?search_query=

    +

    news:https://news.search.yahoo.com/search/news?p=

    +

    stock:https://finance.yahoo.com/quote/

    +

    amazon:https://www.amazon.com/s/?field-keywords=

    +

    weather:https://www.wunderground.com/cgi-bin/findweather/getForecast?query=

    +

    IMDB:https://www.imdb.com/find?q=

    +

    film review:https://www.rottentomatoes.com/search/?search=

    +

    goodreads:https://www.goodreads.com/search?query=

    +

    audible:http://www.audible.com/search?sort=review-rank&advsearchKeywords=

    +

    audiobay:http://audiobookbay.nl/?s=

    +

    +language:
    +

    OED:https://www.oed.com/LIBRARY?dest=https%3A%2F%2Fwww.oed.com%2Fsearch%3FsearchType%3Ddictionary%26q%3D%s%26_searchBtn%3DSearch&acc_id=65585&library_card=12363257

    +

    webster1913:https://www.websters1913.com/words/

    +

    merriam-webster:https://www.merriam-webster.com/dictionary/

    +

    dictionary:https://www.dictionary.com/browse/

    +

    freedictionary:https://www.thefreedictionary.com/

    +

    wordreference:https://www.wordreference.com/definition/

    +

    vocabulary:https://www.vocabulary.com/dictionary/

    +

    etymology:https://www.etymonline.com/search?q=

    +

    powerthesaurus:https://www.powerthesaurus.org/%s/synonyms

    +

    macmillanthesaurus:https://www.macmillanthesaurus.com/search/?auto=complete&q=

    +

    lword:https://lword.top/word.html#

    +

    ludwig:https://ludwig.guru/s/

    +

    webster:https://www.merriam-webster.com/dictionary/

    +

    googledict:http://googledictionary.freecollocation.com/meaning?word=

    +

    freetts_ru:https://freetts.com/Home/PlayAudio?Language=ru-RU&Voice=ru-RU-Standard-A&id=undefined&type=0&TextMessage=

    +

    freetts_ar:https://freetts.com/Home/PlayAudio?Language=ar-XA&Voice=ar-XA-Standard-A&id=undefined&type=0&TextMessage=

    +

    +Science:
    +

    britannica:https://www.britannica.com/search?query=

    +

    mathRef:https://reference.wolfram.com/search/?q=

    +

    mathSE:https://math.stackexchange.com/search?q=

    +

    phySE:https://physics.stackexchange.com/search?q=

    +

    physicsForum:https://www.physicsforums.com/search/2195918/?q=

    +

    chemSE:https://chemistry.stackexchange.com/search?q=

    +

    chem:https://www.ncbi.nlm.nih.gov/pccompound?term=

    +

    proofwiki:https://proofwiki.org/w/index.php?search=

    +

    physics:http://www.physics.org/explore-results-all.asp?q=

    +

    biology:https://www.biologyonline.com/dictionary/

    +

    nist chem:https://webbook.nist.gov/cgi/cbook.cgi?Formula=

    +

    chemiday:https://chemiday.com/search/?lang=en&q=

    +

    chem.libretexts:https://chem.libretexts.org/Special:Search?q=

    +

    bio.libretexts:https://bio.libretexts.org/Special:Search?q=

    +

    phys.libretexts:https://phys.libretexts.org/Special:Search?q=

    +

    med.libretexts:https://med.libretexts.org/Special:Search?q=

    +

    math.libretexts:https://math.libretexts.org/Special:Search?q=

    +

    stats.libretexts:https://stats.libretexts.org/Special:Search?q=

    +

    geo.libretexts:https://geo.libretexts.org/Special:Search?q=

    +

    eng.libretexts:https://eng.libretexts.org/Special:Search?q=

    +

    biz.libretexts:https://biz.libretexts.org/Special:Search?q=

    +

    human.libretexts:https://human.libretexts.org/Special:Search?q=

    +

    socialsci.libretexts:https://socialsci.libretexts.org/Special:Search?q=

    +

    workforce.libretexts:https://workforce.libretexts.org/Special:Search?q=

    +

    +Engines that can use as documentation:
    +

    oscobo:https://www.oscobo.com/search.php?q=

    +

    teoma:https://www.teoma.com/web?q=

    +

    lycos:https://search.lycos.com/web/?q=

    +

    technorati:http://technorati.com/search/index.php?q=

    +

    qwant:https://lite.qwant.com/?q=

    +

    swisscows:https://swisscows.com/web?query=

    +

    duck:https://duckduckgo.com/?q=

    +

    mojeek:https://www.mojeek.com/search?q=

    +

    gigablast:https://www.gigablast.com/search?c=main&qlangcountry=en-us&q=

    +

    yandex:https://yandex.com/search/?text=

    +

    searx:https://searchx.mobi/?q=

    +

    +Cloud storage:
    +

    +Scholar:
    +

    sweetsearch:https://sweetsearch.com/search?q=

    +

    refseek:https://www.refseek.com/search?q=

    +

    google scholar:https://scholar.google.com/scholar?q=

    +

    semanticscholar:https://www.semanticscholar.org/search?sort=relevance&q=

    +

    +Developer:
    +

    git:https://github.com/search?type=Repositories&q=

    +

    man:http://man.cx/

    +

    code:http://searchcode.com/?q=

    +

    symbolhound:http://symbolhound.com/?q=

    +

    vector:https://vector.me/search/

    +

    jsdelivr:http://www.jsdelivr.com/?query=

    +

    greasyfork:https://greasyfork.org/en/scripts?sort=updated&q=

    +

    +app:
    +

    App store:market://search?q=

    +

    +local engines(May need termux customized edition and tools like bc,gnuplot etc.):
    +

    bc:d:text/html:echo \'%s\'|bc -l -q:

    +

    2D plot:d:image/svg+xml:gnuplot -e \'set term svg;set output; plot %s\':

    +

    3D plot:d:image/svg+xml:gnuplot -e \'set term svg;set output; splot %s\':

    +

    + + + diff --git a/en/searchurl/sitejs/www.bing.com.js b/en/searchurl/sitejs/www.bing.com.js deleted file mode 100644 index e225d448..00000000 --- a/en/searchurl/sitejs/www.bing.com.js +++ /dev/null @@ -1,15 +0,0 @@ -{ - const oFetch = window.fetch; - window.fetch = function(url,options){ - if("https://www.bing.com/turing/conversation/create"==url){ - url = "https://mybing2.xn--xyza.top/Create"; - options = { - credentials: 'include', - headers:{}, - }; - } - return oFetch(url,options) - .then((res)=>{return res;}) - .catch((err)=>{return err;}); - } -} diff --git a/en/searchurl/template/config.html b/en/searchurl/template/config.html deleted file mode 100644 index 6e61767a..00000000 --- a/en/searchurl/template/config.html +++ /dev/null @@ -1,25 +0,0 @@ -%1% -%2% -%3% -%4% -%5% -%6% -%7% -%8% - - - - - - - - - - - - - - - - - diff --git a/en/searchurl/template/webdav.html b/en/searchurl/template/webdav.html deleted file mode 100644 index 8390b910..00000000 --- a/en/searchurl/template/webdav.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - diff --git a/en/searchurl/txt/cmds.cfg b/en/searchurl/txt/cmds.cfg deleted file mode 100644 index 6fc68d74..00000000 --- a/en/searchurl/txt/cmds.cfg +++ /dev/null @@ -1,2 +0,0 @@ -open clipboard link:clip/uweb:/system/bin/toybox grep -m1 -Eo '(http|https)://[^ "'\'']+' -code editor:text/html:printf "
    Run