Skip to content

Commit

Permalink
[update] 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyraft committed Jul 8, 2022
1 parent 17166e2 commit 35b0320
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ div.codehilite > pre
```

## 改动日志
- [1.2.8] 更新mermaid版本到9.1.3, 改进toast样式.
- [1.2.7] 更新mermaid版本到8.14.0, 支持GitHub原生mermaid下载.
- [1.2.6] 更新mermaid版本到8.13.8, 优化配置页交互与样式.
- [1.2.5] 更新mermaid版本到8.13.5. 修复bitbucket预览问题.
Expand All @@ -80,7 +81,8 @@ div.codehilite > pre

- [x] 自动化测试套件
- [x] 下载github原生mermaid
- [ ] 改进toast样式
- [x] 改进toast样式
- [ ] 修复github下载toast重复问题(分离渲染,contextmenu,toast脚本,仅contextmenu脚本需要allFrames执行)
- [ ] 增加hover菜单,用于下载/复制code
- [ ] ...

Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mermaid Previewer

## github has natively supported mermaid since 2022-02-14 (except gist) [link](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/)
## github has natively supported mermaid since 2022-02-14 [link](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/)

A chrome extension for previewing and exporting mermaid in github/bitbucket.

Expand All @@ -15,19 +15,15 @@ Right-click on the rendered mermaid image and select "Export png" to export the
## Support list

- [x] GitHub
- [x] gist(need to match *.md)
- [x] gist comment
- [x] native mermaid download
- [x] ...
- [x] mermaid export
- [x] Bitbucket
- [x] readme
- [x] markdown preview
- [x] edit preview
- [x] ...
- [x] mermaid picture export.
- [x] mermaid export.
- [x] Provide custom exclusion list and rule list configuration capabilities.


At the same time, the following pages with dom structure are supported:
```html
<pre lang="mermaid">
Expand Down Expand Up @@ -64,7 +60,8 @@ div.codehilite > pre
```

## Changelog
- [1.2.7] Update mermaid version to 8.14.0, support GitHub native mermaid download
- [1.2.8] Update mermaid version to 9.1.3, fix repeat toast & modify toast style.
- [1.2.7] Update mermaid version to 8.14.0, support GitHub native mermaid download.
- [1.2.6] Update mermaid version to 8.13.8, optimize configuration page interaction and style.
- [1.2.5] Update mermaid version to 8.13.5, fix preview issue of Bitbucket.
- [1.2.4] Added popup options page, providing domain exclusion and dom selector configuration.
Expand All @@ -80,7 +77,8 @@ div.codehilite > pre

- [x] autotest suit.
- [x] download for GitHub native mermaid.
- [ ] modify toast style.
- [x] modify toast style.
- [ ] Fix github download toast duplication problem (separate rendering, contextmenu, toast script, only contextmenu script needs allFrames to execute)
- [ ] added hover menu for downloading/copying code.
- [ ] ...

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mermaid-previewer",
"version": "1.2.7",
"version": "1.2.8",
"description": "Preview and export mermaid in github/bitbucket.",
"directories": {
"test": "test"
Expand Down
4 changes: 2 additions & 2 deletions src/content/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const svgToPng = async (svgContainer, callback) => {
const imgDom = document.createElement("img");
imgDom.setAttribute(
"src",
"data:image/svg+xml;base64," + btoa(decodeURI(encodeURIComponent(svgData)))
"data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(svgData)))
);

const canvasDom = document.createElement("canvas");
Expand All @@ -34,7 +34,7 @@ const svgToPng = async (svgContainer, callback) => {
* 监听Toast类型的message
*/
const watchToastMessage = async () => {
if (!window.mermaidPreviewerHadWatchToast) {
if (!window.mermaidPreviewerHadWatchToast && !inIframe()) {
// noinspection JSUnresolvedVariable
chrome.runtime.onMessage.addListener(async (message) => {
if (message?.type === MESSAGE_TYPE_TOAST) {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Mermaid Previewer",
"description": "Preview and export mermaid in github/bitbucket.",
"version": "1.2.7",
"version": "1.2.8",
"manifest_version": 3,
"background": {
"service_worker": "src/worker/background.js"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const toast = async (text, level) => {

Toastify({
text: text,
duration: 13000,
duration: 5000,
style: css.style,
close: true,
position: "center",
Expand Down

0 comments on commit 35b0320

Please sign in to comment.