Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkmm committed Jan 14, 2024
1 parent 50ffdc4 commit a101859
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 97 deletions.
96 changes: 5 additions & 91 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,5 @@
# Changelog

## 0.3.2 2024-01

## 0.3.1 2023-12-06

* [Support `Dock Plugin` and `Command Palette` on mobile](https://github.com/siyuan-note/siyuan/issues/9926)

## 0.3.0 2023-12-05

* Upgrade Siyuan to 0.9.0
* Support more platforms

## 0.2.9 2023-11-28

* [Add plugin method `openMobileFileById`](https://github.com/siyuan-note/siyuan/issues/9738)


## 0.2.8 2023-11-15

* [`resize` cannot be triggered after dragging to unpin the dock](https://github.com/siyuan-note/siyuan/issues/9640)

## 0.2.7 2023-10-31

* [Export `Constants` to plugin](https://github.com/siyuan-note/siyuan/issues/9555)
* [Add plugin `app.appId`](https://github.com/siyuan-note/siyuan/issues/9538)
* [Add plugin event bus `switch-protyle`](https://github.com/siyuan-note/siyuan/issues/9454)

## 0.2.6 2023-10-24

* [Deprecated `loaded-protyle` use `loaded-protyle-static` instead](https://github.com/siyuan-note/siyuan/issues/9468)

## 0.2.5 2023-10-10

* [Add plugin event bus `open-menu-doctree`](https://github.com/siyuan-note/siyuan/issues/9351)

## 0.2.4 2023-09-19

* Supports use in windows
* [Add plugin function `transaction`](https://github.com/siyuan-note/siyuan/issues/9172)

## 0.2.3 2023-09-05

* [Add plugin function `transaction`](https://github.com/siyuan-note/siyuan/issues/9172)
* [Plugin API add openWindow and command.globalCallback](https://github.com/siyuan-note/siyuan/issues/9032)

## 0.2.2 2023-08-29

* [Add plugin event bus `destroy-protyle`](https://github.com/siyuan-note/siyuan/issues/9033)
* [Add plugin event bus `loaded-protyle-dynamic`](https://github.com/siyuan-note/siyuan/issues/9021)

## 0.2.1 2023-08-21

* [Plugin API add getOpenedTab method](https://github.com/siyuan-note/siyuan/issues/9002)
* [Plugin API custom.fn => custom.id in openTab](https://github.com/siyuan-note/siyuan/issues/8944)

## 0.2.0 2023-08-15

* [Add plugin event bus `open-siyuan-url-plugin` and `open-siyuan-url-block`](https://github.com/siyuan-note/siyuan/pull/8927)


## 0.1.12 2023-08-01

* Upgrade siyuan to 0.7.9

## 0.1.11

* [Add `input-search` event bus to plugins](https://github.com/siyuan-note/siyuan/issues/8725)


## 0.1.10

* [Add `bind this` example for eventBus in plugins](https://github.com/siyuan-note/siyuan/issues/8668)
* [Add `open-menu-breadcrumbmore` event bus to plugins](https://github.com/siyuan-note/siyuan/issues/8666)

## 0.1.9

* [Add `open-menu-xxx` event bus for plugins ](https://github.com/siyuan-note/siyuan/issues/8617)

## 0.1.8

* [Add protyleSlash to the plugin](https://github.com/siyuan-note/siyuan/issues/8599)
* [Add plugin API protyle](https://github.com/siyuan-note/siyuan/issues/8445)

## 0.1.7

* [Support build js and json](https://github.com/siyuan-note/plugin-sample/pull/8)

## 0.1.6

* add `fetchPost` example
# 0.0.1
- init
# 0.0.2
- make observer observing smaller range
- (performance improve)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siyuan_doctree_compress",
"version": "0.3.2",
"version": "0.0.2",
"type": "module",
"description": "compress your doctree as the % you defined",
"repository": "",
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan_doctree_compress",
"author": "zxkmm",
"url": "https://github.com/zxkmm/siyuan_doctree_compress",
"version": "0.0.1",
"version": "0.0.2",
"minAppVersion": "2.12.1",
"backends": [
"windows",
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class siyuan_doctree_compress extends Plugin {
try {
const compressionPercentage = (await this.settingUtils.get("Slider"));
if ((await this.settingUtils.get("mainSwitch"))) {
const doctreeBbserver = new MutationObserver(mutations => {
const doctreeObserver = new MutationObserver(mutations => {
handleDomChanges();
});

Expand All @@ -75,12 +75,12 @@ export default class siyuan_doctree_compress extends Plugin {
// doctreeBbserver.observe(document, config);
//
document.querySelectorAll('.fn__flex-column').forEach(element => {
doctreeBbserver.observe(element, config);
doctreeObserver.observe(element, config);
});
//

function handleDomChanges() {
console.log("dom changed");//DBG
// console.log("dom changed");//DBG

const elements = document.querySelectorAll('.b3-list-item__toggle');

Expand All @@ -95,7 +95,7 @@ export default class siyuan_doctree_compress extends Plugin {
element.style.paddingLeft = `${compressedPadding}px`;

element.setAttribute('data-compressed', 'true'); //mark as compressed prevent nested compression
console.log("compressed" + element);//DBG
// console.log("compressed" + element);//DBG
}
});
}
Expand Down

0 comments on commit a101859

Please sign in to comment.