user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file.
+
CSS/JS for domains, similar to uweb, but use sitejs/[domain].js or sitecss/[domain].css, not [domain root].js/css.
customizable.
Note: Usually electron apps are heavyweight as they use browsers for simple things. Ebrowser uses core chromium effectively and very lightweight. Recommend to install electron separately.
@@ -149,7 +150,7 @@ npm install ebrowser
Javascript at three levels
-
Web page: urls like "javascript:" or bookmarklet command ":bml" run in web page.
+
Web page: url like "javascript:" or bookmarklet command ":bml" runs in web page.
Browser (or renderer process) :
":bjs" to execute the following js code at browser level.
diff --git a/en/index.xml b/en/index.xml
index e8a8d00..9ca7acc 100644
--- a/en/index.xml
+++ b/en/index.xml
@@ -6,7 +6,7 @@
Recent content on uweb browser: unlimited powerHugoen
- Sat, 29 Jun 2024 08:47:08 +0800
+ Sat, 29 Jun 2024 21:05:42 +0800Text selection/processing
@@ -216,7 +216,7 @@
/en/ebrowserreadme/
Mon, 01 Jan 0001 00:00:00 +0000/en/ebrowserreadme/
- Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).
lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file. customizable. Note: Usually electron apps are heavyweight as they use browsers for simple things.
+ Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).
lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file. CSS/JS for domains, similar to uweb, but use sitejs/[domain].
diff --git a/en/sitemap.xml b/en/sitemap.xml
index f0d3431..247fee2 100644
--- a/en/sitemap.xml
+++ b/en/sitemap.xml
@@ -71,7 +71,7 @@
/>
/en/
- 2024-06-29T08:47:08+08:00
+ 2024-06-29T21:05:42+08:00/en/ebrowserreadme/
- 2024-06-29T08:47:08+08:00
+ 2024-06-29T21:05:42+08:00/en/mirrors/2024-06-18T23:17:17+08:00
@@ -539,7 +539,7 @@
/>
/en/unlist/
- 2024-06-29T08:47:08+08:00
+ 2024-06-29T21:05:42+08:00/en/ebrowserreadme/
Mon, 01 Jan 0001 00:00:00 +0000/en/ebrowserreadme/
- Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).
lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file. customizable. Note: Usually electron apps are heavyweight as they use browsers for simple things.
+ Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).
lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file. CSS/JS for domains, similar to uweb, but use sitejs/[domain].
diff --git a/misc/ebrowser/README.md b/misc/ebrowser/README.md
index dc3fffe..8530fc4 100644
--- a/misc/ebrowser/README.md
+++ b/misc/ebrowser/README.md
@@ -6,6 +6,7 @@ Ebrowser is designed with the philosophy of [Android uweb browser](https://githu
- keyboard friendly with vim-style keymaps and command line support in address bar.
- [global redirection](https://uweb.surge.sh/en/redirect/index.html#) to bypass censorship.
- user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file.
+- CSS/JS for domains, similar to [uweb](https://jamesfengcao.gitlab.io/uweb/en/sitejs/index.html), but use sitejs/[domain].js or sitecss/[domain].css, not [domain root].js/css.
- customizable.
Note: Usually electron apps are heavyweight as they use browsers for simple things. Ebrowser uses core chromium effectively and very lightweight. Recommend to install electron separately.
@@ -99,7 +100,7 @@ The other commands are defined in "mapkeys.json", which will map keys to address
- "uas.json" : name-useragent pairs
#### Javascript at three levels
-- Web page: urls like "javascript:" or bookmarklet command ":bml" run in web page.
+- Web page: url like "javascript:" or bookmarklet command ":bml" runs in web page.
- Browser (or renderer process) :
- ":bjs" to execute the following js code at browser level.
- "!xx" evaluates "xx.js", which could manipulate address bar etc.
diff --git a/misc/ebrowser/index.html b/misc/ebrowser/index.html
index 079c87b..3decf85 100644
--- a/misc/ebrowser/index.html
+++ b/misc/ebrowser/index.html
@@ -69,6 +69,10 @@ You should have received a copy of the GNU General Public License along with thi
var historyFile = path.join(__dirname,'history.rec');
var bHistory = false;
var bQueryHistory = false;
+ let sitecssP = path.join(__dirname,"sitecss");
+ let sitejsP = path.join(__dirname,"sitejs");
+ var bDomainJS = fs.existsSync(sitejsP);
+ var bDomainCSS = fs.existsSync(sitecssP);
var autocMode = 0; //0 for substring, 1 for startsWith
const BML_head = "(async ()=>{let d=document;async function _loadJs(u){var a=d.createElement('script');a.type='text/javascript';a.async=false;a.src=u;d.body.appendChild(a);await new Promise(resolve=>a.onload=resolve)}";
const BML_tail = "})()";
@@ -136,20 +140,52 @@ You should have received a copy of the GNU General Public License along with thi
iTab = i;
tabs.children[iTab].classList.add('curWV');
}
+ async function loadJSFile(tab,jsF){
+ if(fs.existsSync(jsF)){
+ try {
+ let js = await fs.promises.readFile(jsF,'utf8');
+ tab.executeJavaScript(js,false);
+ }catch(e){}
+ }
+ }
+ function cbStartLoading(e){
+ if(!bDomainCSS) return;
+ let tab = e.target;
+ let domain = new URL(tab.getURL()).hostname;
+ let jsF = path.join(sitecssP, domain+".js");
+ loadJSFile(tab,jsF);
+ jsF = path.join(sitecssP, domain+".css");
+ if(fs.existsSync(jsF)){
+ (async ()=>{
+ try {
+ let css = await fs.promises.readFile(jsF,'utf8');
+ tab.insertCSS(css);
+ }catch(e){}
+ })();
+ }
+ }
function cbFinishLoad(e){
let tab = e.target;
+ let url = tab.getURL();
+ if(bHistory){
+ let histItem = tab.getTitle()+" "+url+"\n";
+ fs.appendFile(historyFile, histItem, (err) => {});
+ }
let js = tab.dataset.jsonce;
if(js){
tab.dataset.jsonce = null;
tab.executeJavaScript(js,false);
}
- if(!bHistory) return;
- let histItem = tab.getTitle()+" "+tab.getURL()+"\n";
- fs.appendFile(historyFile, histItem, (err) => {});
+ if(bDomainJS){
+ let domain = new URL(url).hostname;
+ let jsF = path.join(sitejsP, domain+".js");
+ loadJSFile(tab,jsF);
+ }
}
function initTab(tab){
tab.allowpopups = true;
tab.addEventListener('did-finish-load',cbFinishLoad);
+ tab.addEventListener('did-start-loading',cbStartLoading);
}
function newTab(){
var tab = document.createElement('webview');
diff --git a/misc/ebrowser/package.json b/misc/ebrowser/package.json
index ff19579..0dfdf97 100644
--- a/misc/ebrowser/package.json
+++ b/misc/ebrowser/package.json
@@ -1,4 +1,4 @@
-{"version":"1.0.44",
+{"version":"1.0.45",
"name": "ebrowser",
"description": "The keyboard-friendly minimal suckless web browser",
"main": "webview.js",
diff --git a/misc/ebrowser/sitecss/baidu.com.css b/misc/ebrowser/sitecss/baidu.com.css
new file mode 100644
index 0000000..5d80809
--- /dev/null
+++ b/misc/ebrowser/sitecss/baidu.com.css
@@ -0,0 +1 @@
+.ec_wise_ad,.ec_wise_pp,.na-like-container{transform:scale(0)!important;display:none!important}
diff --git a/misc/ebrowser/sitejs/mypikpak.net.js b/misc/ebrowser/sitejs/mypikpak.net.js
new file mode 100644
index 0000000..25fa219
--- /dev/null
+++ b/misc/ebrowser/sitejs/mypikpak.net.js
@@ -0,0 +1,12 @@
+(function() {
+ const originFetch = fetch;
+ window.fetch = (...arg) => {
+ if (arg[0].indexOf('area_accessible') > -1) {
+ return new Promise(() => {
+ throw new Error();
+ });
+ } else {
+ return originFetch(...arg);
+ }
+ }
+})();
diff --git a/sitemap.xml b/sitemap.xml
index 1c0ba2f..8463ee1 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -4,7 +4,7 @@
/en/sitemap.xml
- 2024-06-29T08:47:08+08:00
+ 2024-06-29T21:05:42+08:00
From f3ea0239295887a0a71952efcba398d474efcea4 Mon Sep 17 00:00:00 2001
From: James Feng Cao
Date: Sat, 29 Jun 2024 22:04:44 +0800
Subject: [PATCH 3/3] update AI engines
---
misc/ebrowser/index.html | 5 ++++-
misc/ebrowser/search.json | 2 +-
sitemap.xml | 2 +-
zh/index.xml | 4 ++--
zh/search/index.html | 5 +++--
zh/sitemap.xml | 6 +++---
zh/topposts/index.xml | 4 ++--
7 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/misc/ebrowser/index.html b/misc/ebrowser/index.html
index 3decf85..5eddc6b 100644
--- a/misc/ebrowser/index.html
+++ b/misc/ebrowser/index.html
@@ -151,7 +151,10 @@ You should have received a copy of the GNU General Public License along with thi
function cbStartLoading(e){
if(!bDomainCSS) return;
let tab = e.target;
- let domain = new URL(tab.getURL()).hostname;
+ let domain;
+ try{
+ domain = new URL(tab.getURL()).hostname;
+ }catch(e){return;}
let jsF = path.join(sitecssP, domain+".js");
loadJSFile(tab,jsF);
jsF = path.join(sitecssP, domain+".css");
diff --git a/misc/ebrowser/search.json b/misc/ebrowser/search.json
index b2feb87..429a0c6 100644
--- a/misc/ebrowser/search.json
+++ b/misc/ebrowser/search.json
@@ -17,7 +17,7 @@
"git":"https://github.com/search?type=Repositories&q=%s",
"gt":"https://kkgithub.com/search?type=Repositories&q=%s",
"360":"https://so.360.com/s?q=%s",
- "tg":"i:0/js/hash2textarea.js:https://www.tiangong.cn/#%s",
+ "tg":"https://www.tiangong.cn/result?q=%s",
"cg":"i:0/js/hash2textarea.js:https://chatglm.cn/main/detail#%s",
"s100":"i:0/js/hash2input.js:https://www.sou100.com/#%s",
"csdn":"i:0/js/hash2textarea.js:https://chat.csdn.net#%s",
diff --git a/sitemap.xml b/sitemap.xml
index 8463ee1..ea0286f 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -11,7 +11,7 @@
/zh/sitemap.xml
- 2024-06-29T16:47:18+08:00
+ 2024-06-29T22:03:52+08:00
diff --git a/zh/index.xml b/zh/index.xml
index 44db5eb..a995370 100644
--- a/zh/index.xml
+++ b/zh/index.xml
@@ -6,7 +6,7 @@
Recent content on 超微浏览器: 威、快、高效、极致优化Hugozh
- Sat, 29 Jun 2024 16:47:18 +0800
+ Sat, 29 Jun 2024 22:03:52 +0800操作选中(富)文本/元素
@@ -55,7 +55,7 @@
/zh/search/
Thu, 28 Jul 2022 00:00:00 +0000/zh/search/
- 超微浏览器下点击搜索引擎配置链接可自动添加到主屏。
AI引擎:
gitcode:https://gitcode.com/aisearch?q=
metaso:https://metaso.cn/?q=
kaisou:https://kaisouai.com?q=
360AI:https://so.360.com/s?q=
CSDN:https://chat.csdn.net?q=
gc-copilot:i:0/js/hash2textarea.js:https://gitcode.com/ai-copilot/#%s
tiangong:i:0/js/hash2textarea.js:https://www.tiangong.cn/#%s
xunfei:i:0/js/hash2textarea.js:https://xinghuo.xfyun.cn/desk#%s
baiduAI:i:0/js/hash2editable.js:https://chat.baidu.com/#%s
chatglm:i:0/js/hash2textarea.js:https://chatglm.cn/main/detail#%s
doubao:i:0/js/hash2textarea.js:https://www.doubao.com/chat/#%s
baichuan:i:0/js/hash2textarea.js:https://www.baichuan-ai.com/chat#%s
bocha:i:0/js/hash2textarea.js:https://bochaai.com/#%s
sou100:i:0/js/hash2input.js:https://www.sou100.com/#%s
miku:i:0/js/hash2textarea.js:https://www.hellomiku.com#%s
镜像:
google:i:0mhttps://loud-moth-21.deno.dev/:https://google.com/search?q=%s
推荐引擎(将下面文本添加到home5.search中):
顺序:i:40%s_00
apkdl:https://apkdl.in/app/search?q=
apkbog:https://www.apkbog.com/en/apks/search/
知乎:https://www.zhihu.com/search?type=content&q=
bilibili:https://m.bilibili.com/search?keyword=
抖音:https://www.douyin.com/search/%s?source=normal_search
高德地图:https://ditu.amap.com/search?query=
京东:https://search.jd.com/Search?enc=utf-8&keyword=
淘宝:https://taobao.com/search?q=
苏宁:https://m.suning.com/search/%s/
拼多多:http://mobile.yangkeduo.com/search_result.html?search_key=
优惠券:http://mall.yhm11.com/index.php?r=l&kw=
百度图片:http://image.baidu.com/search/index?tn=baiduimage&word=
bing图片:http://bing.com/images/search?q=
搜狗表情:https://pic.sogou.com/pic/emo/searchList.jsp?keyword=
微信:https://weixin.sogou.com/weixin?type=2&s_from=input&query=
大百科全书:http://h.bkzx.cn/search?sublibId=2&query=
wolfram:https://www.wolframalpha.com/input/?i=
bookmarkearth:https://www.bookmarkearth.com/s/search?q=
答案答案:https://daandaan.com/search?q=
问答库:https://m.asklib.com/s/
ACG:http://www.acgsou.com/?bound=content&local=1&keyword=
动漫花园:https://share.dmhy.org/topics/list?keyword=
末日动漫:https://share.acgnx.se/search.php?keyword=
慢慢买:http://s.manmanbuy.com/default.aspx?key=
购物党:https://gwdang.com/search?s_product=
快搜比价:https://ks.pconline.com.cn/product.shtml?q=
比一比价:http://www.b1bj.com/s.aspx?key=
盒子比价:http://www.boxz.com/search/
buzz:https://search.buzz.im/?search=
toplinks:https://www.toplinks.cc/s/?keyword=
注:顺序搜索需文件engine.search,格式与home5.search相同,但其中url关键词部分必须用“%s”标识。用此引擎搜索的网页按前进键自动用下一引擎搜索。
除了批量添加引擎外,超微可以将任意支持搜索的网址添加为搜索引擎。方法如下:
访问网站并搜索。 按菜单键,没有的话可长按底部工具条前进按钮弹出菜单。 选择"添加为搜索引擎",对话框中将出现的地址适当编辑。不少网址后半部分为用"&"分割的等式,将包含搜索条目的等式移动到最后,删除搜索条目本身,其余等式可删可留。若无等式,一般在网址中直接删除搜索条目本身即可。 常用引擎,供用户查漏添加:
google:https://google.com/search?q=
必应:https://www.bing.com/search?q=
必应CN:https://cn.bing.com/search?q=
百度:https://m.baidu.com/s?wd=
Fsou:https://fsoufsou.com/search?q=
seekr:https://www.seekr.com/search?query=
sese:https://sese.yyj.moe/search?q=
you:https://you.com/search?q=
神马:http://m.sm.cn/s?q=
夸克:https://quark.sm.cn/s?q=
无追:https://www.wuzhuiso.com/s?q=
360:http://www.so.com/s?q=
搜狗:https://m.sogou.com/web?query=
+ 超微浏览器下点击搜索引擎配置链接可自动添加到主屏。
AI引擎:
tiangong:https://www.tiangong.cn/result?q=
gitcode:https://gitcode.com/aisearch?q=
metaso:https://metaso.cn/?q=
kaisou:https://kaisouai.com?q=
360AI:https://so.360.com/s?q=
CSDN:https://chat.csdn.net?q=
十号AI:https://retardphobia.moebh.org/ui/search?mode=1&q=
gc-copilot:i:0/js/hash2textarea.js:https://gitcode.com/ai-copilot/#%s
xunfei:i:0/js/hash2textarea.js:https://xinghuo.xfyun.cn/desk#%s
baiduAI:i:0/js/hash2editable.js:https://chat.baidu.com/#%s
chatglm:i:0/js/hash2textarea.js:https://chatglm.cn/main/detail#%s
doubao:i:0/js/hash2textarea.js:https://www.doubao.com/chat/#%s
baichuan:i:0/js/hash2textarea.js:https://www.baichuan-ai.com/chat#%s
bocha:i:0/js/hash2textarea.js:https://bochaai.com/#%s
sou100:i:0/js/hash2input.js:https://www.sou100.com/#%s
miku:i:0/js/hash2textarea.js:https://www.hellomiku.com#%s
镜像:
google:i:0mhttps://loud-moth-21.deno.dev/:https://google.com/search?q=%s
推荐引擎(将下面文本添加到home5.search中):
顺序:i:40%s_00
apkdl:https://apkdl.in/app/search?q=
apkbog:https://www.apkbog.com/en/apks/search/
知乎:https://www.zhihu.com/search?type=content&q=
bilibili:https://m.bilibili.com/search?keyword=
抖音:https://www.douyin.com/search/%s?source=normal_search
高德地图:https://ditu.amap.com/search?query=
京东:https://search.jd.com/Search?enc=utf-8&keyword=
淘宝:https://taobao.com/search?q=
苏宁:https://m.suning.com/search/%s/
拼多多:http://mobile.yangkeduo.com/search_result.html?search_key=
优惠券:http://mall.yhm11.com/index.php?r=l&kw=
百度图片:http://image.baidu.com/search/index?tn=baiduimage&word=
bing图片:http://bing.com/images/search?q=
搜狗表情:https://pic.sogou.com/pic/emo/searchList.jsp?keyword=
微信:https://weixin.sogou.com/weixin?type=2&s_from=input&query=
大百科全书:http://h.bkzx.cn/search?sublibId=2&query=
wolfram:https://www.wolframalpha.com/input/?i=
bookmarkearth:https://www.bookmarkearth.com/s/search?q=
答案答案:https://daandaan.com/search?q=
问答库:https://m.asklib.com/s/
ACG:http://www.acgsou.com/?bound=content&local=1&keyword=
动漫花园:https://share.dmhy.org/topics/list?keyword=
末日动漫:https://share.acgnx.se/search.php?keyword=
慢慢买:http://s.manmanbuy.com/default.aspx?key=
购物党:https://gwdang.com/search?s_product=
快搜比价:https://ks.pconline.com.cn/product.shtml?q=
比一比价:http://www.b1bj.com/s.aspx?key=
盒子比价:http://www.boxz.com/search/
buzz:https://search.buzz.im/?search=
toplinks:https://www.toplinks.cc/s/?keyword=
注:顺序搜索需文件engine.search,格式与home5.search相同,但其中url关键词部分必须用“%s”标识。用此引擎搜索的网页按前进键自动用下一引擎搜索。
除了批量添加引擎外,超微可以将任意支持搜索的网址添加为搜索引擎。方法如下:
访问网站并搜索。 按菜单键,没有的话可长按底部工具条前进按钮弹出菜单。 选择"添加为搜索引擎",对话框中将出现的地址适当编辑。不少网址后半部分为用"&"分割的等式,将包含搜索条目的等式移动到最后,删除搜索条目本身,其余等式可删可留。若无等式,一般在网址中直接删除搜索条目本身即可。 常用引擎,供用户查漏添加:
google:https://google.com/search?q=
必应:https://www.bing.com/search?q=
必应CN:https://cn.bing.com/search?q=
百度:https://m.baidu.com/s?wd=
Fsou:https://fsoufsou.com/search?q=
seekr:https://www.seekr.com/search?query=
sese:https://sese.yyj.moe/search?q=
you:https://you.com/search?q=
神马:http://m.sm.cn/s?q=
夸克:https://quark.sm.cn/s?q=
无追:https://www.wuzhuiso.com/s?q=
360:http://www.so.com/s?q=html5应用
diff --git a/zh/search/index.html b/zh/search/index.html
index 44ad5d1..b16d93d 100644
--- a/zh/search/index.html
+++ b/zh/search/index.html
@@ -49,13 +49,14 @@