Skip to content

Commit

Permalink
Deploy to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 21, 2023
0 parents commit ac24ccd
Show file tree
Hide file tree
Showing 10 changed files with 1,084 additions and 0 deletions.
154 changes: 154 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<div align="center">
<img alt="icon" src="https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-webview/public/icon.png" style="width: 8em; height: 8em;">

---
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Zuoqiu-Yingyi/siyuan-plugin-webview?include_prereleases&style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases/latest)
[![GitHub License](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/blob/main/LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/commits/main)
![GitHub repo size](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)
![hits](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-webview.svg)
[![GitHub all releases](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-webview/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases)

---
[简体中文](./README_zh_CN.md) \| English

---
</div>

# SiYuan Webpage View

A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that allows you to browse web pages in a tab or new window like a browser.

## PREVIEW

![preview image](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-webview/public/preview.png)

## INTRODUCTION

### Function Introduction

- Open hyperlinks in SiYuan Note new tabs (desktop only)
- Open hyperlinks in a new window
- Open the SiYuan Note editor in a new window
- Block reference context menu
- Hyperlink context menu

### Setting Introduction

After installing this plugin, click <kbd>SiYuan Settings</kbd> > <kbd>Marketplace</kbd> > <kbd>Downloaded</kbd> > <kbd>Plugins</kbd> > <kbd>Web View (this plugin)</kbd> > <kbd>Settings</kbd> button to open the plugin's settings panel.

- General Settings
- `User-Agent field (User-Agent, UA)`
- This is an input field.
- Default content: `<empty>`
- For details on this field, please refer to [User-Agent - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent).
- Users can browse web pages using a custom UA to replace the default UA.
- This option can only be used on desktop devices.
- When opening hyperlinks in a tab
- When opening hyperlinks in a new window
- When the input field is empty, the default UA `SiYuan/x.y.z https://b3log.org/siyuan Electron` will be used.
- `x.y.z` is the current version number of SiYuan.
- `Web Page Background`
- This is an input field
- Default content: `transparent`
- User can define the background color or background image of the web page.
- For details on this field, please refer to [background - CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/background).
- `Reset Settings Options`
- This is a button.
- Resets all settings options to their default settings.
- After clicking this button, a confirmation dialog will pop up.
- Clicking the confirmation dialog button will reset all options for this plugin to their default settings, and the current interface will be automatically refreshed.
- Open in a Tab
- `General Settings`
- `Enable`
- This is a switch.
- Default status: *on*
- Once turned on, it enables the feature to **open hyperlinks in a tab**.
- Due to the security restrictions of the browser, this feature can only be used on desktop devices.
- `Editor Hyperlinks`
- This is a switch.
- Default status: *on*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Once turned on, clicking on hyperlinks in the editor will open them in a new tab.
- `Other Hyperlinks`
- This is a switch.
- Default status: *on*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Once turned on, clicking on hyperlinks outside of the editor will open them in a new tab.
- For example, clicking on hyperlinks in the export preview page.
- `Protocol`
- This is a group of switches.
- Default status: *all on*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Only active network protocols can be opened in a tab.
- Other protocols/inactive protocols can be opened with the default program.
- `Shortcut Keys`
- This is a group of switches.
- Default status: *left mouse button single click*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Configures the keyboard shortcut needed to open hyperlinks in a tab.
- Open in a Window
- `General Settings`
- `Enable`
- This is a switch.
- Default status: *on*
- Once turned on, it enables the feature to **open hyperlinks in a new window**.
- `Editor Hyperlinks`
- This is a switch.
- Default status: *on*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Once turned on, clicking on hyperlinks in the editor with the middle mouse button will open them in a new window.
- `Other Hyperlinks`
- This is a switch.
- Default status: *off*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Once turned on, clicking on hyperlinks outside of the editor with the middle mouse button will open them in a new window.
- For example, clicking on hyperlinks in the export preview page.
- The hyperlink will also be opened with the default browser.
- `Protocol`
- This is a group of switches.
- Default status: *all on*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Only active network protocols can be opened in a new window.
- Inactive protocols will not respond.
- Clicking on the `siyuan://` protocol will open the SiYuan Note editor in a new window and jump to the specified block.
- `Shortcut Keys`
- This is a group of switches.
- Default status: *middle mouse button click*
- Only available when the `Enable` switch in the `General Settings` tab is turned on.
- Configures the keyboard shortcuts needed to open hyperlinks in a new window.
- `SiYuan Editor`
- `Enable`
- This is a switch.
- Default status: *on*
- Once turned on, it enables the feature to **open the SiYuan editor in a new window**.
- Clicking on elements in the SiYuan interface with the configured keyboard shortcut will open the SiYuan editor in a new window and jump to the corresponding position.
- Clickable elements include:
- `Block`: any block in the editor
- `Block Icon`: the icon displayed when hovering over a block with the mouse
- `Block Reference`: inline element block reference
- `Breadcrumb`: each item in the breadcrumb
- `Document Title`: the title area of the document
- `Outline`: each item in the outline panel
- `Document Tree`: each item in the document tree
- `Backlink Panel`: each item in the backlink panel
- `Floating Preview Window`: the title bar of the floating preview window.
- `Desktop Editor`
- This is a button.
- Clicking it will open a desktop SiYuan editor in a new window.
- `Mobile Editor`
- This is a button.
- Clicking it will open a mobile SiYuan editor in a new window.
- `Focus`
- This is a switch.
- Default status: *off*
- Once turned on, when the SiYuan editor is opened in a new window, the corresponding block will be focused.
- `Editor Type`
- This is a drop-down selector.
- Default status: *Mobile Editor*
- You can choose which type of SiYuan editor to open in a new window.

## CHANGELOG

[CHANGELOG.md](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/blob/main/CHANGELOG.md)
154 changes: 154 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<div align="center">
<img alt="图标" src="https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-webview/public/icon.png" style="width: 8em; height: 8em;">

---
[![GitHub 最新发行版本 (最新一次发行/预发行)](https://img.shields.io/github/v/release/Zuoqiu-Yingyi/siyuan-plugin-webview?include_prereleases&style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases/latest)
[![GitHub 最新发行时间](https://img.shields.io/github/release-date/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases/latest)
[![GitHub 许可证](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/blob/main/LICENSE)
[![GitHub 最后一次提交时间](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/commits/main)
![GitHub 仓库大小](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-webview?style=flat-square)
![查看次数](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-webview.svg)
[![GitHub 发行版本下载次数](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-webview/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/releases)

---
简体中文 \| [English](./README.md)

---
</div>

# 思源网页视图

一个可以让你像浏览器一样在标签页或者新窗口中浏览网页的[思源笔记](https://github.com/siyuan-note/siyuan)插件。

## 预览

![预览图片](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-webview/public/preview.png)

## 介绍

### 功能介绍

- 在思源笔记新标签页中打开超链接 (仅限桌面端)
- 在新窗口中打开超链接
- 在新窗口中打开思源笔记编辑器
- 块引用右键菜单
- 超链接右键菜单

### 设置项介绍

安装本插件后可以点击 <kbd>思源设置</kbd> \> <kbd>集市</kbd> \> <kbd>已下载</kbd> \> <kbd>插件</kbd> \> <kbd>网页视图(本插件)</kbd> 的 <kbd>设置</kbd> 按钮打开本插件的设置面板

- 常规设置
- `用户代理字段 (User-Agent, UA)`
- 这是一个输入框
- 默认内容: *\<\>*
- 该字段详情请参考 [User-Agent - HTTP | MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/User-Agent)
- 用户可以在浏览网页时使用自定义的 UA 替代默认的 UA
- 该选项仅在桌面端可以使用
- 在标签页打开超链接
- 在新窗口打开超链接
- 输入框为空时,将使用默认的 UA `SiYuan/x.y.z https://b3log.org/siyuan Electron`
- `x.y.z` 为思源当前版本号
- `网页背景`
- 这是一个输入框
- 默认内容: `transparent`
- 用户可以在这里定义网页的背景颜色或背景图片
- 该字段详情请参考 [background - CSS:层叠样式表 | MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/background)
- `重置设置选项`
- 这是一个按钮
- 重置所有设置选项为默认选项
- 点击该按钮后会弹出确认对话框
- 点击对话框确认按钮后会重置本插件所有选项为默认选项, 之后会自动刷新当前界面
- 打开页签
- `常规设置`
- `启用`
- 这是一个开关
- 默认状态: *打开*
- 开关打开后启用 **在标签页中打开超链接** 功能
- 由于浏览器的安全限制,该功能仅在桌面端可以使用
- `编辑器超链接`
- 这是一个开关
- 默认状态: *打开*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 开关打开后可以通过点击编辑器中的超链接在标签页中打开超链接
- `其他超链接`
- 这是一个开关
- 默认状态: *打开*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 开关打开后可以通过点击不在编辑器中的超链接在标签页中打开超链接
- 例如点击导出预览页面的超链接
- `协议`
- 这是一组开关
- 默认状态: *全部打开*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 仅激活的网络协议可以在标签页中打开
- 其他协议/未激活的协议可以使用默认程序打开
- `快捷键`
- 这是一组开关
- 默认状态: *鼠标左键单点击*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 配置在标签页打开超链接所需使用的按键组合
- 打开窗口
- `常规设置`
- `启用`
- 这是一个开关
- 默认状态: *打开*
- 开关打开后启用 **在新窗口中打开超链接** 功能
- `编辑器超链接`
- 这是一个开关
- 默认状态: *打开*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 开关打开后可以通过鼠标中键点击编辑器中的超链接在新窗口中打开超链接
- `其他超链接`
- 这是一个开关
- 默认状态: *关闭*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 开关打开后可以通过鼠标中键点击编辑器中的超链接在新窗口中打开超链接
- 例如点击导出预览页面的超链接
- 会同时通过默认浏览器打开超链接
- `协议`
- 这是一组开关
- 默认状态: *全部打开*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 仅激活的网络协议可以在新窗口中打开
- 其他协议/未激活的协议不响应
- 点击 `siyuan://` 协议会在新窗口打开思源编辑器并跳转到指定的块
- `快捷键`
- 这是一组开关
- 默认状态: *鼠标中键点击*
- 仅在 `常规设置` 页签中的 `启用` 开关打开后生效
- 配置在新窗口打开超链接所需使用的按键组合
- `思源编辑器`
- `启用`
- 这是一个开关
- 默认状态: *打开*
- 开关打开后启用 **新窗口打开思源编辑器** 功能
- 使用按键组合点击思源界面中的元素可以在新窗口中打开思源编辑器并跳转到对应的位置
- 可点击的元素
- ``: 编辑器中任意的块
- `块标`: 鼠标悬浮在块上时显示的块标
- `块引用`: 行内元素块引用
- `面包屑`: 面包屑中的每一项
- `文档标题`: 文档的标题区域
- `大纲`: 大纲面板中的每一项
- `文档树`: 文档树中的每一项
- `反链面板`: 反链面板中的每一项
- `悬浮预览窗口`: 悬浮预览窗口的标题栏
- `桌面端编辑器`
- 这是一个按钮
- 点击后可以在新窗口打开一个桌面端思源编辑器
- `移动端编辑器`
- 这是轧钢按钮
- 点击后可以在新窗口打开一个移动端思源编辑器
- `聚焦`
- 这是一个开关
- 默认状态: *关闭*
- 开关打开后在新窗口打开思源编辑器时会聚焦对应的块
- `编辑器类型`
- 这是一个下拉选择器
- 默认状态: *移动端编辑器*
- 可以选择在新窗口打开的思源编辑器类型

## 更改日志

[CHANGELOG.md](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview/blob/main/CHANGELOG.md)
Loading

0 comments on commit ac24ccd

Please sign in to comment.