开源 小工具 解决下 Onetab 的备份, 附一个 Tauri 的跨平台 App [Onetab Re] 用于增强阅览

## 解决问题
- Onetab 使用的频次有点过分, 某天打开之后报 Memory Out...
- Onetab 的导出太简陋了, 连时间戳也不带
- Onetab 自身的数据稳定性问题, 把所有数据保存在 indexDB 的一个键里...
- 备份完用浏览器构建导入还是会崩溃 (所以打了个 Tauri 的包)
## 备份方法
~~*由于我 Rust 还没学完, 请辛苦下 node 手动操作*~~
1. 访问文末 repo 下载 release 的安装包安装 and 安装`node`
2. 安装后打开软件的 scripts 目录, 为其中的`package`文件添加.json 文件后缀
3. 在终端(由于安装在系统目录, 可能需要管理员权限)中打开 scripts 目录
4. (可选) 修改 js 脚本配置, 对应使用版本, 默认为 win 平台的 Edge 下 Edge 商店的 Onetab
5. 在终端运行 `npm install` 安装依赖, 然后运行 `npm start`, 获得备份文件
6. 运行软件本体, 即可原样查看 Onetab 数据
### 小贴士
- macOS 下请先展开 `Onetab Re.app`, scripts 目录在`Onetab Re.app/Contents/Resources/scripts`
- Chrome 和 Edge 版本不同可能导致路径有变化, 请在浏览器地址栏输入`chrome://version`或者`edge://version`查看完整的用户目录位置核对后使用
- 仅需备份数据的朋友可以直接点 [这里]( https://github.com/endcloud/onetab_restore_tauri/blob/master/src-tauri/scripts/handle_onetab.js) 查看脚本代码
## 狠狠地表扬一下 Copilot
tnnd, 连不同平台的文件路径都能猜出来, 太离谱了.
`}P\)@2XF`A`W3.png)
## todo
- 通过 Rust 处理备份流程, 避免额外安装 nodejs
- 适配一下亮色主题
- 搜索栏历史记录
- 网页的 ico
- 云同步 webDAV
- 数据分析 词云 NLP
## 已基于 GPL v3 开源
仓库地址: [onetab_restore_tauri]( https://github.com/endcloud/onetab_restore_tauri/)
欢迎体验并提交 bug, 也欢迎 pr/fork/star.
#Onetab ### #scripts #https #endcloud #onetab #tauri #安装 #备份 #Edge

## 解决问题
- Onetab 使用的频次有点过分, 某天打开之后报 Memory Out...
- Onetab 的导出太简陋了, 连时间戳也不带
- Onetab 自身的数据稳定性问题, 把所有数据保存在 indexDB 的一个键里...
- 备份完用浏览器构建导入还是会崩溃 (所以打了个 Tauri 的包)
## 备份方法
~~*由于我 Rust 还没学完, 请辛苦下 node 手动操作*~~
1. 访问文末 repo 下载 release 的安装包安装 and 安装`node`
2. 安装后打开软件的 scripts 目录, 为其中的`package`文件添加.json 文件后缀
3. 在终端(由于安装在系统目录, 可能需要管理员权限)中打开 scripts 目录
4. (可选) 修改 js 脚本配置, 对应使用版本, 默认为 win 平台的 Edge 下 Edge 商店的 Onetab
5. 在终端运行 `npm install` 安装依赖, 然后运行 `npm start`, 获得备份文件
6. 运行软件本体, 即可原样查看 Onetab 数据
### 小贴士
- macOS 下请先展开 `Onetab Re.app`, scripts 目录在`Onetab Re.app/Contents/Resources/scripts`
- Chrome 和 Edge 版本不同可能导致路径有变化, 请在浏览器地址栏输入`chrome://version`或者`edge://version`查看完整的用户目录位置核对后使用
- 仅需备份数据的朋友可以直接点 [这里]( https://github.com/endcloud/onetab_restore_tauri/blob/master/src-tauri/scripts/handle_onetab.js) 查看脚本代码
## 狠狠地表扬一下 Copilot
tnnd, 连不同平台的文件路径都能猜出来, 太离谱了.
`}P\)@2XF`A`W3.png)
## todo
- 通过 Rust 处理备份流程, 避免额外安装 nodejs
- 适配一下亮色主题
- 搜索栏历史记录
- 网页的 ico
- 云同步 webDAV
- 数据分析 词云 NLP
## 已基于 GPL v3 开源
仓库地址: [onetab_restore_tauri]( https://github.com/endcloud/onetab_restore_tauri/)
欢迎体验并提交 bug, 也欢迎 pr/fork/star.
#Onetab ### #scripts #https #endcloud #onetab #tauri #安装 #备份 #Edge
UserScript: 右键点击 GitHub Notification 直接打开项目主页
[>> GreasyFork 地址]( https://greasyfork.org/zh-CN/scripts/450324-github-notification-right-click-to-repo-page)
因为关注的项目比较多,有时候看到通知都不知道是干啥的了,简单写了个脚本,分享一下。
#GreasyFork #https #greasyfork #org #zh #CN #scripts #450324 #github #notification
[>> GreasyFork 地址]( https://greasyfork.org/zh-CN/scripts/450324-github-notification-right-click-to-repo-page)
因为关注的项目比较多,有时候看到通知都不知道是干啥的了,简单写了个脚本,分享一下。
#GreasyFork #https #greasyfork #org #zh #CN #scripts #450324 #github #notification
[Tampermonkey] 技术远离政治:去除技术网站政治相关横幅、通知、摘要
# 简介
* 移除政治相关条幅或替换为社会主义核心价值观;
* 替换政治相关 Logo 为原版 Logo ;
* 去除政治相关通知。

# 资源
* Github:[https://github.com/duanluan/tampermonkey-scripts/tree/main/core-socialist-values]( https://github.com/duanluan/tampermonkey-scripts/tree/main/core-socialist-values)
* Greasy Fork:[https://greasyfork.org/zh-CN/scripts/440854]( https://greasyfork.org/zh-CN/scripts/440854)
* OpenUserJS:[https://openuserjs.org/scripts/duanluan/技术远离政治]( https://openuserjs.org/scripts/duanluan/%E6%8A%80%E6%9C%AF%E8%BF%9C%E7%A6%BB%E6%94%BF%E6%B2%BB)
# v1.2.0 已支持列表
* [React]( https://reactjs.org/):条幅
* [Angular]( https://angular.io/):通知
* [Junit]( https://junit.org/junit5/):Logo
* [CodeceptJS]( https://codecept.io/):条幅
* [GitHub]( https://github.com/):通知
* [NestJS]( https://docs.nestjs.com/):条幅
* [Ember]( https://emberjs.com/):条幅
* [Electron]( https://www.electronjs.org/):条幅
* [Jenkins]( https://www.jenkins.io/):Logo 、摘要
* [Svelte]( https://svelte.dev/):Logo 、底部条幅
* [Svelte Material UI]( https://sveltematerialui.com/):条幅
* [Syncthing]( https://syncthing.net/):条幅
#https #条幅 #com #org #scripts #Logo #duanluan #E6% #github #io
# 简介
* 移除政治相关条幅或替换为社会主义核心价值观;
* 替换政治相关 Logo 为原版 Logo ;
* 去除政治相关通知。

# 资源
* Github:[https://github.com/duanluan/tampermonkey-scripts/tree/main/core-socialist-values]( https://github.com/duanluan/tampermonkey-scripts/tree/main/core-socialist-values)
* Greasy Fork:[https://greasyfork.org/zh-CN/scripts/440854]( https://greasyfork.org/zh-CN/scripts/440854)
* OpenUserJS:[https://openuserjs.org/scripts/duanluan/技术远离政治]( https://openuserjs.org/scripts/duanluan/%E6%8A%80%E6%9C%AF%E8%BF%9C%E7%A6%BB%E6%94%BF%E6%B2%BB)
# v1.2.0 已支持列表
* [React]( https://reactjs.org/):条幅
* [Angular]( https://angular.io/):通知
* [Junit]( https://junit.org/junit5/):Logo
* [CodeceptJS]( https://codecept.io/):条幅
* [GitHub]( https://github.com/):通知
* [NestJS]( https://docs.nestjs.com/):条幅
* [Ember]( https://emberjs.com/):条幅
* [Electron]( https://www.electronjs.org/):条幅
* [Jenkins]( https://www.jenkins.io/):Logo 、摘要
* [Svelte]( https://svelte.dev/):Logo 、底部条幅
* [Svelte Material UI]( https://sveltematerialui.com/):条幅
* [Syncthing]( https://syncthing.net/):条幅
#https #条幅 #com #org #scripts #Logo #duanluan #E6% #github #io
[Tampermonkey/油猴] V2EX 主题回复增强
# 简介
因为 V2EX 的主题回复之间没有关联,所以想知道发生了什么还得 Ctrl + F 搜索被艾特的人说了什么。
点击“@xxx”的链接即可打开右侧“xxx 说了什么?”的弹窗,而且弹窗中的“@xxx”仍可点击。

# 资源
* Github:[https://github.com/duanluan/tampermonkey-scripts/tree/main/v2ex-replies-pro]( https://github.com/duanluan/tampermonkey-scripts/tree/main/v2ex-replies-pro)
* Greasy Fork:[https://greasyfork.org/zh-CN/scripts/451752]( https://greasyfork.org/zh-CN/scripts/451752)
* OpenUserJS:[https://openuserjs.org/scripts/duanluan/V2EX_主题回复增强]( https://openuserjs.org/scripts/duanluan/V2EX_%E4%B8%BB%E9%A2%98%E5%9B%9E%E5%A4%8D%E5%A2%9E%E5%BC%BA)
#https #scripts #duanluan #org #E5% #V2EX #xxx #com #弹窗 #github
# 简介
因为 V2EX 的主题回复之间没有关联,所以想知道发生了什么还得 Ctrl + F 搜索被艾特的人说了什么。
点击“@xxx”的链接即可打开右侧“xxx 说了什么?”的弹窗,而且弹窗中的“@xxx”仍可点击。

# 资源
* Github:[https://github.com/duanluan/tampermonkey-scripts/tree/main/v2ex-replies-pro]( https://github.com/duanluan/tampermonkey-scripts/tree/main/v2ex-replies-pro)
* Greasy Fork:[https://greasyfork.org/zh-CN/scripts/451752]( https://greasyfork.org/zh-CN/scripts/451752)
* OpenUserJS:[https://openuserjs.org/scripts/duanluan/V2EX_主题回复增强]( https://openuserjs.org/scripts/duanluan/V2EX_%E4%B8%BB%E9%A2%98%E5%9B%9E%E5%A4%8D%E5%A2%9E%E5%BC%BA)
#https #scripts #duanluan #org #E5% #V2EX #xxx #com #弹窗 #github
[求教]lsp-pyright 该如何配置虚拟环境?
目前的问题:
sublime + LSP + lsp-pyright
不能够正确找到虚拟环境中 python 解析器的路径. 使用的仍旧是默认 python.exe
所以不能够引入虚拟环境中的包.
在 lsp-pyright 自定义配置中写入了:
{
"venvPath": ".\\venv\\Scripts\\python.exe",
"venv": "venv"
}
通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.
PS: 我尝试过 venvPath 路径的多种写法.
"venvPath": "./venv/Scripts/python.exe",
"venvPath": "python 的绝对路径"
问题依旧..
尝试过通过项目内的 pyrightconfig.json 配置.
或者 Preferences -> Packages settings -> LSP -> Server -> lsp-pyright
中写入如上配置:
求指点....
#python #venvPath #venv #lsp #pyright #exe #虚拟环境 #LSP #解析器 #Scripts
目前的问题:
sublime + LSP + lsp-pyright
不能够正确找到虚拟环境中 python 解析器的路径. 使用的仍旧是默认 python.exe
所以不能够引入虚拟环境中的包.
在 lsp-pyright 自定义配置中写入了:
{
"venvPath": ".\\venv\\Scripts\\python.exe",
"venv": "venv"
}
通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.
PS: 我尝试过 venvPath 路径的多种写法.
"venvPath": "./venv/Scripts/python.exe",
"venvPath": "python 的绝对路径"
问题依旧..
尝试过通过项目内的 pyrightconfig.json 配置.
或者 Preferences -> Packages settings -> LSP -> Server -> lsp-pyright
中写入如上配置:
求指点....
#python #venvPath #venv #lsp #pyright #exe #虚拟环境 #LSP #解析器 #Scripts
油猴脚本恢复黑白网页为彩色
https://greasyfork.org/zh-CN/scripts/399478-%E6%88%91%E8%A6%81%E5%BD%A9%E8%89%B2
我要彩色
恢复黑白网页为彩色
本版本优势
更轻的内存占用
更快的反应速度,中间无任何延迟
#E8% #彩色 #https #greasyfork #org #zh #CN #scripts #399478 #-%
https://greasyfork.org/zh-CN/scripts/399478-%E6%88%91%E8%A6%81%E5%BD%A9%E8%89%B2
我要彩色
恢复黑白网页为彩色
本版本优势
更轻的内存占用
更快的反应速度,中间无任何延迟
#E8% #彩色 #https #greasyfork #org #zh #CN #scripts #399478 #-%
撸了个简单的脚本用来快速屏蔽 v 站用户
潜水的时候经常能看到这种需求,于是就写了个小脚本。安装后可以直接在用户评论区域屏蔽用户,而无需进入用户主页。
https://greasyfork.org/zh-CN/scripts/456939-v2ex-%E5%BF%AB%E9%80%9F%E5%B1%8F%E8%94%BD%E7%94%A8%E6%88%B7
#E5% #94% #用户 #https #greasyfork #org #zh #CN #scripts #456939
潜水的时候经常能看到这种需求,于是就写了个小脚本。安装后可以直接在用户评论区域屏蔽用户,而无需进入用户主页。
https://greasyfork.org/zh-CN/scripts/456939-v2ex-%E5%BF%AB%E9%80%9F%E5%B1%8F%E8%94%BD%E7%94%A8%E6%88%B7
#E5% #94% #用户 #https #greasyfork #org #zh #CN #scripts #456939
zsh autocomplete suggestion 问题
我的项目里有个 docs 命令,根目录也有 docs 文件夹
```js
"scripts": {
"docs": "pnpm -C docs dev"
},
```
当我在命令输入
```bash
pnpm docs
```
按下回车,zsh 就会补全为
```bash
pnpm docs/
```

尝试把`zsh-autosuggestions`插件关掉也没用,不改 scripts 命令能解决这个问题吗
#docs #pnpm #scripts #bash #zsh #命令 #根目录 #补全 #插件 #js
我的项目里有个 docs 命令,根目录也有 docs 文件夹
```js
"scripts": {
"docs": "pnpm -C docs dev"
},
```
当我在命令输入
```bash
pnpm docs
```
按下回车,zsh 就会补全为
```bash
pnpm docs/
```

尝试把`zsh-autosuggestions`插件关掉也没用,不改 scripts 命令能解决这个问题吗
#docs #pnpm #scripts #bash #zsh #命令 #根目录 #补全 #插件 #js